summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxmutexattr01
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-21 17:25:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-21 17:25:46 +0000
commit56864ffc1701f409dd9b303265f3c8ffc5a78b27 (patch)
tree20763783fb35e1ffae675e2c89ab8c1b08b7101b /testsuites/psxtests/psxmutexattr01
parent2009-07-21 Roxana Leontie <roxana.leontie@gmail.com> (diff)
downloadrtems-56864ffc1701f409dd9b303265f3c8ffc5a78b27.tar.bz2
2009-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxmutexattr01/init.c: Make test optional if tools do not support posix mutex type attribute.
Diffstat (limited to 'testsuites/psxtests/psxmutexattr01')
-rw-r--r--testsuites/psxtests/psxmutexattr01/init.c6
1 files changed, 6 insertions, 0 deletions
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);