summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx10/init.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 13:48:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 13:57:53 +0200
commitc030edde3f76f23d6fe64df940a8ca059f0404e6 (patch)
tree20651d2bb3a61821bc7d0cccf93f3851b3109994 /testsuites/psxtests/psx10/init.c
parentposix: Allow PTHREAD_PROCESS_SHARED for barriers (diff)
downloadrtems-c030edde3f76f23d6fe64df940a8ca059f0404e6.tar.bz2
posix: Allow PTHREAD_PROCESS_SHARED for condvar
Close #3137.
Diffstat (limited to 'testsuites/psxtests/psx10/init.c')
-rw-r--r--testsuites/psxtests/psx10/init.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
index a37e14efba..24265ba0ad 100644
--- a/testsuites/psxtests/psx10/init.c
+++ b/testsuites/psxtests/psx10/init.c
@@ -115,6 +115,25 @@ void *POSIX_Init(
rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" );
+/* pshared tests */
+
+ puts( "Init: pthread_cond_init - EINVAL (invalid pshared)" );
+ attr.process_shared = -1;
+ status = pthread_cond_init( &cond, &attr );
+ rtems_test_assert( status == EINVAL );
+
+ puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
+ status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init: pthread_cond_init - OK" );
+ status = pthread_cond_init( &cond, &attr );
+ rtems_test_assert( status == 0 );
+
+ puts( "Init: pthread_cond_destroy - OK" );
+ status = pthread_cond_destroy( &cond );
+ rtems_test_assert( status == 0 );
+
/* initiailize the attribute for the rest of the test */
puts( "Init: pthread_cond_init - attr" );