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 | |
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')
-rw-r--r-- | testsuites/psxtests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/psxtests/psx05/init.c | 9 | ||||
-rw-r--r-- | testsuites/psxtests/psx05/psx05.scn | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 7a5052dde9..cab66b1aca 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,5 +1,9 @@ 2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com> + * psx05/init.c, psx05/psx05.scn: Add test for bad mutex type. + +2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com> + * psxcleanup/system.h: Fix typo. * Makefile.am, configure.ac: Add new test for exercising pushing and popping a clean up handler without actually executing it. 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" ); diff --git a/testsuites/psxtests/psx05/psx05.scn b/testsuites/psxtests/psx05/psx05.scn index 58351cccd7..8fa3e23fcd 100644 --- a/testsuites/psxtests/psx05/psx05.scn +++ b/testsuites/psxtests/psx05/psx05.scn @@ -36,6 +36,7 @@ Init: pthread_mutex_init - EINVAL (bad priority ceiling) Init: Resetting mutex attributes Init: pthread_mutex_init - ENOSYS (process wide scope) Init: pthread_mutex_init - EINVAL (invalid scope) +Init: pthread_mutex_init - EINVAL (invalid type) Init: Resetting mutex attributes Init: Changing mutex attributes Init: mutex protocol is (1) -- PTHREAD_PRIO_INHERIT |