summaryrefslogtreecommitdiffstats
path: root/testsuites
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
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')
-rw-r--r--testsuites/psxtests/ChangeLog5
-rw-r--r--testsuites/psxtests/configure.ac3
-rw-r--r--testsuites/psxtests/psx05/init.c18
-rw-r--r--testsuites/psxtests/psx05/psx05.scn1
4 files changed, 27 insertions, 0 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index 145cc21879..742daee2cb 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxfile01/test.c, psxstat/test.c, psxtime/test.c: Eliminate test
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index b29992d2d7..f03abeae83 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -24,6 +24,9 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
+RTEMS_ENABLE_COVERAGE
+AM_CONDITIONAL([HAS_COVERAGE],[test $RTEMS_HAS_COVERAGE = "yes"])
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
psx01/Makefile
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 ***