From c03aeaffbec0f69661222ebaf41577f350fbb88a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 9 Aug 1996 19:50:26 +0000 Subject: [PATCH] added test case for pthread_mutexattr_init being passed a null pointer. --- c/src/tests/psxtests/psx05/init.c | 4 ++++ testsuites/psxtests/psx05/init.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/c/src/tests/psxtests/psx05/init.c b/c/src/tests/psxtests/psx05/init.c index 71340da59e..a6f25fd42b 100644 --- a/c/src/tests/psxtests/psx05/init.c +++ b/c/src/tests/psxtests/psx05/init.c @@ -96,6 +96,10 @@ void *POSIX_Init( /* basic checkout of mutex attributes */ + puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" ); + status = pthread_mutexattr_init( NULL ); + assert( status == EINVAL ); + puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); status = pthread_mutexattr_init( &attr ); assert( !status ); diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 71340da59e..a6f25fd42b 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -96,6 +96,10 @@ void *POSIX_Init( /* basic checkout of mutex attributes */ + puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" ); + status = pthread_mutexattr_init( NULL ); + assert( status == EINVAL ); + puts( "Init: pthread_mutexattr_init - SUCCESSFUL" ); status = pthread_mutexattr_init( &attr ); assert( !status );