summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/tests/psxtests/psx10/init.c9
-rw-r--r--testsuites/psxtests/psx10/init.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/c/src/tests/psxtests/psx10/init.c b/c/src/tests/psxtests/psx10/init.c
index 790d7ffcaa..3990d03329 100644
--- a/c/src/tests/psxtests/psx10/init.c
+++ b/c/src/tests/psxtests/psx10/init.c
@@ -23,6 +23,7 @@ void *POSIX_Init(
pthread_t thread_id;
pthread_condattr_t attr;
int pshared;
+ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
puts( "\n\n*** POSIX TEST 10 ***" );
@@ -79,6 +80,14 @@ void *POSIX_Init(
Init_id = pthread_self();
printf( "Init: ID is 0x%08x\n", Init_id );
+ puts( "Init: pthread_cond_init - NULL attr" );
+ status = pthread_cond_init( &cond, NULL );
+ assert( !status );
+
+ puts( "Init: pthread_cond_destroy" );
+ status = pthread_cond_destroy( &cond );
+ assert( !status );
+
/* create a thread */
/*
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
index 790d7ffcaa..3990d03329 100644
--- a/testsuites/psxtests/psx10/init.c
+++ b/testsuites/psxtests/psx10/init.c
@@ -23,6 +23,7 @@ void *POSIX_Init(
pthread_t thread_id;
pthread_condattr_t attr;
int pshared;
+ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
puts( "\n\n*** POSIX TEST 10 ***" );
@@ -79,6 +80,14 @@ void *POSIX_Init(
Init_id = pthread_self();
printf( "Init: ID is 0x%08x\n", Init_id );
+ puts( "Init: pthread_cond_init - NULL attr" );
+ status = pthread_cond_init( &cond, NULL );
+ assert( !status );
+
+ puts( "Init: pthread_cond_destroy" );
+ status = pthread_cond_destroy( &cond );
+ assert( !status );
+
/* create a thread */
/*