From 56864ffc1701f409dd9b303265f3c8ffc5a78b27 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 21 Jul 2009 17:25:46 +0000 Subject: [PATCH] 2009-07-21 Joel Sherrill * psxmutexattr01/init.c: Make test optional if tools do not support posix mutex type attribute. --- testsuites/psxtests/ChangeLog | 5 +++++ testsuites/psxtests/psxmutexattr01/init.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 4e57b92c16..e88867c07d 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,8 @@ +2009-07-21 Joel Sherrill + + * psxmutexattr01/init.c: Make test optional if tools do not support + posix mutex type attribute. + 2009-07-21 Joel Sherrill * Makefile.am, configure.ac: Add new test to exercise error case for diff --git a/testsuites/psxtests/psxmutexattr01/init.c b/testsuites/psxtests/psxmutexattr01/init.c index e48a80122a..8dda8daa69 100644 --- a/testsuites/psxtests/psxmutexattr01/init.c +++ b/testsuites/psxtests/psxmutexattr01/init.c @@ -13,6 +13,7 @@ #include #include +#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) typedef struct { const char *name; int type; @@ -28,6 +29,7 @@ ToCheck_t TypesToCheck[] = { }; #define TO_CHECK sizeof(TypesToCheck) / sizeof(ToCheck_t) +#endif void *POSIX_Init( void *ignored @@ -40,6 +42,7 @@ void *POSIX_Init( puts( "\n\n*** POSIX MUTEX ATTRIBUTE TEST 1 ***" ); +#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) puts( "Init - pthread_mutexattr_gettype - attr NULL - EINVAL" ); sc = pthread_mutexattr_gettype( NULL, &type ); rtems_test_assert( sc == EINVAL ); @@ -91,6 +94,9 @@ void *POSIX_Init( rtems_test_assert( type == TypesToCheck[i].type ); } } +#else + puts( "POSIX Mutex Attribute Type Not Supported in Tools" ); +#endif puts( "*** END OF POSIX MUTEX ATTRIBUTE TEST 1 ***" ); rtems_test_exit(0);