diff options
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxmutexattr01/init.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 4e57b92c16..e88867c07d 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,5 +1,10 @@ 2009-07-21 Joel Sherrill <joel.sherrill@oarcorp.com> + * psxmutexattr01/init.c: Make test optional if tools do not support + posix mutex type attribute. + +2009-07-21 Joel Sherrill <joel.sherrill@oarcorp.com> + * Makefile.am, configure.ac: Add new test to exercise error case for when a task is blocked on a condition variable with one mutex and another task attempts to block on the same condition variable with 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 <errno.h> #include <pthread.h> +#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); |