diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-10-12 00:07:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-10-12 00:07:16 +0000 |
commit | f1887691cdea36127aef6011e579647867d55c73 (patch) | |
tree | 045473d8e48f75523eab6b846516ecf00f47bcbb /testsuites/psxtests/psx05/init.c | |
parent | 2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-f1887691cdea36127aef6011e579647867d55c73.tar.bz2 |
2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx05/init.c, psx05/psx05.scn: Add test for bad mutex type.
Diffstat (limited to 'testsuites/psxtests/psx05/init.c')
-rw-r--r-- | testsuites/psxtests/psx05/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index a36dc9240a..2194f8873d 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -295,6 +295,15 @@ void *POSIX_Init( status = pthread_mutex_init( &Mutex_id, &attr ); assert( status == EINVAL ); + /* bad kind */ + status = pthread_mutexattr_init( &attr ); + assert( !status ); + + puts( "Init: pthread_mutex_init - EINVAL (invalid type)" ); + attr.type = -1; + status = pthread_mutex_init( &Mutex_id, &attr ); + assert( status == EINVAL ); + /* now set up for a success pthread_mutex_init */ puts( "Init: Resetting mutex attributes" ); |