From 695dd0b64c962fd0c09c92c89debcfd5cf30d568 Mon Sep 17 00:00:00 2001 From: Mark Johannes Date: Fri, 9 Aug 1996 18:28:21 +0000 Subject: [PATCH] Init: added condattr - destroy, init, set and get cases --- c/src/tests/psxtests/psx10/init.c | 11 ++++++----- testsuites/psxtests/psx10/init.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/c/src/tests/psxtests/psx10/init.c b/c/src/tests/psxtests/psx10/init.c index 90fc53b6f4..790d7ffcaa 100644 --- a/c/src/tests/psxtests/psx10/init.c +++ b/c/src/tests/psxtests/psx10/init.c @@ -54,27 +54,27 @@ void *POSIX_Init( status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE ); assert( !status ); - puts( "Init: pthread_condattr_setpshared - EINVAL - attr" ); status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_setpshared - EINVAL - attr" ); - puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" ); status = pthread_condattr_setpshared( &attr, 0xFFFFFF ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" ); status = pthread_condattr_getpshared( &attr, &pshared ); assert( !status ); - printf( "Init: pthread_condattr_getpshared - %d", pshared ); + printf( "Init: pthread_condattr_getpshared - %d\n", pshared ); - puts( "Init: pthread_condattr_getpshared - EINVAL" ); status = pthread_condattr_getpshared( NULL, &pshared ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_getpshared - EINVAL" ); Init_id = pthread_self(); printf( "Init: ID is 0x%08x\n", Init_id ); @@ -88,7 +88,8 @@ void *POSIX_Init( /* exit this thread */ - pthread_exit( NULL ); + puts( "*** END OF POSIX TEST 5 ***" ); + exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c index 90fc53b6f4..790d7ffcaa 100644 --- a/testsuites/psxtests/psx10/init.c +++ b/testsuites/psxtests/psx10/init.c @@ -54,27 +54,27 @@ void *POSIX_Init( status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE ); assert( !status ); - puts( "Init: pthread_condattr_setpshared - EINVAL - attr" ); status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_setpshared - EINVAL - attr" ); - puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" ); status = pthread_condattr_setpshared( &attr, 0xFFFFFF ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_setpshared - EINVAL - pshared" ); status = pthread_condattr_getpshared( &attr, &pshared ); assert( !status ); - printf( "Init: pthread_condattr_getpshared - %d", pshared ); + printf( "Init: pthread_condattr_getpshared - %d\n", pshared ); - puts( "Init: pthread_condattr_getpshared - EINVAL" ); status = pthread_condattr_getpshared( NULL, &pshared ); if ( status != EINVAL ) printf( "status = %d\n", status ); assert( status == EINVAL ); + puts( "Init: pthread_condattr_getpshared - EINVAL" ); Init_id = pthread_self(); printf( "Init: ID is 0x%08x\n", Init_id ); @@ -88,7 +88,8 @@ void *POSIX_Init( /* exit this thread */ - pthread_exit( NULL ); + puts( "*** END OF POSIX TEST 5 ***" ); + exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ }