summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx05
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-17 17:43:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-17 17:43:35 +0000
commit49325ef13cf5c25f78590e8d4c0fa4a190e985d4 (patch)
tree62b483030051d525f4be9b61cf688c2f4d747e82 /testsuites/psxtests/psx05
parent2009-08-17 Santosh G Vattam <vattam.santosh@gmail.com> (diff)
downloadrtems-49325ef13cf5c25f78590e8d4c0fa4a190e985d4.tar.bz2
2009-08-17 Santosh G Vattam <vattam.santosh@gmail.com>
* configure.ac, psx05/init.c, psx05/psx05.scn: Add test case for initializing a recursize mutex.
Diffstat (limited to 'testsuites/psxtests/psx05')
-rw-r--r--testsuites/psxtests/psx05/init.c18
-rw-r--r--testsuites/psxtests/psx05/psx05.scn1
2 files changed, 19 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c
index 4456516d18..a36dc9240a 100644
--- a/testsuites/psxtests/psx05/init.c
+++ b/testsuites/psxtests/psx05/init.c
@@ -651,6 +651,24 @@ void *POSIX_Init(
printf( "status = %d\n", status );
assert( status == EINVAL );
+ /* mutexinit.c: Initialising recursive mutex */
+
+ puts( "Init: Recursive Mutex" );
+
+ status = pthread_mutex_destroy( &Mutex2_id );
+ if( status )
+ printf( "status mutex destroy:%d\n", status );
+
+ status = pthread_mutexattr_init( &attr );
+ if( status )
+ printf( "status mutexattr:%d\n", status );
+
+ attr.recursive=true;
+ status = pthread_mutex_init( &Mutex2_id, &attr );
+ if ( status )
+ printf( "status recursive mutex :%d\n", status );
+ assert( !status );
+
puts( "*** END OF POSIX TEST 5 ***" );
rtems_test_exit( 0 );
diff --git a/testsuites/psxtests/psx05/psx05.scn b/testsuites/psxtests/psx05/psx05.scn
index a9d11a66e3..58351cccd7 100644
--- a/testsuites/psxtests/psx05/psx05.scn
+++ b/testsuites/psxtests/psx05/psx05.scn
@@ -114,4 +114,5 @@ Task 3: exit
Init: pthread_mutex_getprioceiling- ceiling = 200
Init: pthread_setschedparam - set Init priority to highest
Init: pthread_mutex_lock - EINVAL (priority ceiling violation)
+Init: Recursive Mutex
*** END OF POSIX TEST 5 ***