mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-26 21:04:37 +08:00
added test case for pthread_mutexattr_init being passed a null pointer.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user