added test case for pthread_attr_getscope being passed a NULL contentionscope

This commit is contained in:
Joel Sherrill
1996-08-14 19:30:49 +00:00
parent 4e63ae5ae2
commit ff53a6d4fa
2 changed files with 8 additions and 0 deletions

View File

@@ -178,6 +178,10 @@ void *POSIX_Init(
status = pthread_attr_getscope( NULL, &scope );
assert( status == EINVAL );
puts( "Init: pthread_attr_getscope - EINVAL (NULL scope)" );
status = pthread_attr_getscope( &attr, NULL );
assert( status == EINVAL );
puts( "Init: pthread_attr_getscope - EINVAL (not initialized attr)" );
status = pthread_attr_getscope( &destroyed_attr, &scope );
assert( status == EINVAL );

View File

@@ -178,6 +178,10 @@ void *POSIX_Init(
status = pthread_attr_getscope( NULL, &scope );
assert( status == EINVAL );
puts( "Init: pthread_attr_getscope - EINVAL (NULL scope)" );
status = pthread_attr_getscope( &attr, NULL );
assert( status == EINVAL );
puts( "Init: pthread_attr_getscope - EINVAL (not initialized attr)" );
status = pthread_attr_getscope( &destroyed_attr, &scope );
assert( status == EINVAL );