summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx05
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 22:01:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 22:01:58 +0000
commit824b3d1c9083db327b723e19fb42691e7bc17cdf (patch)
tree7982501c2c5d4398adb63de57755a047ca0ec184 /testsuites/psxtests/psx05
parent2009-07-06 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-824b3d1c9083db327b723e19fb42691e7bc17cdf.tar.bz2
2009-07-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* psx05/init.c, psx05/psx05.scn: Add a couple of invalid Id cases.
Diffstat (limited to 'testsuites/psxtests/psx05')
-rw-r--r--testsuites/psxtests/psx05/init.c12
-rw-r--r--testsuites/psxtests/psx05/psx05.scn10
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c
index 8dcda85802..e587a86e0e 100644
--- a/testsuites/psxtests/psx05/init.c
+++ b/testsuites/psxtests/psx05/init.c
@@ -365,6 +365,18 @@ void *POSIX_Init(
printf( "status = %d\n", status );
assert( status == EDEADLK );
+ puts( "Init: pthread_mutex_lock - EINVAL (NULL id)" );
+ status = pthread_mutex_lock( NULL );
+ if ( status != EINVAL )
+ printf( "status = %d\n", status );
+ assert( status == EINVAL );
+
+ puts( "Init: pthread_mutex_unlock - EINVAL (NULL id)" );
+ status = pthread_mutex_unlock( NULL );
+ if ( status != EINVAL )
+ printf( "status = %d\n", status );
+ assert( status == EINVAL );
+
puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" );
status = pthread_mutex_lock( &Mutex_id );
if ( status != EDEADLK )
diff --git a/testsuites/psxtests/psx05/psx05.scn b/testsuites/psxtests/psx05/psx05.scn
index 65c72a688b..a0a7da50b1 100644
--- a/testsuites/psxtests/psx05/psx05.scn
+++ b/testsuites/psxtests/psx05/psx05.scn
@@ -8,23 +8,27 @@ Init: mutex process shared is (0) -- PTHREAD_PROCESS_PRIVATE
Init: pthread_mutexattr_destroy - SUCCESSFUL
Init: pthread_mutexattr_destroy - EINVAL (NULL attr)
Init: pthread_mutexattr_destroy - EINVAL (not initialized)
+
Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)
Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)
Init: pthread_mutexattr_getpshared - EINVAL (not initialized)
Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)
Init: pthread_mutexattr_setpshared - EINVAL (not initialized)
+
Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)
Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)
Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)
Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)
Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)
Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)
+
Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)
Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)
Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)
Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)
Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)
Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)
+
Init: pthread_mutex_init - EINVAL (NULL mutex_id)
Init: pthread_mutex_init - EINVAL (not initialized attr)
Init: pthread_mutex_init - EINVAL (bad protocol)
@@ -43,6 +47,8 @@ Init: pthread_mutex_init - EBUSY (reinitialize an existing mutex) - skipped
Init: pthread_mutex_trylock - EINVAL (illegal ID)
Init: pthread_mutex_trylock - SUCCESSFUL
Init: pthread_mutex_trylock - EDEADLK (already locked)
+Init: pthread_mutex_lock - EINVAL (NULL id)
+Init: pthread_mutex_unlock - EINVAL (NULL id)
Init: pthread_mutex_lock - EDEADLK (already locked)
Init: Sleep 1 second
Task: pthread_mutex_trylock already locked
@@ -54,17 +60,20 @@ Init: pthread_mutex_timedlock - time out in 1/2 second
Task: mutex acquired
Task: sleep for 2 seconds
Init: pthread_mutex_timedlock - EAGAIN (timeout)
+
Init: pthread_mutex_init - SUCCESSFUL
Init: pthread_mutex_init - EAGAIN (too many)
Init: pthread_mutexattr_destroy - SUCCESSFUL
Init: pthread_mutex_destroy - SUCCESSFUL
Init: pthread_mutex_destroy - EINVAL (invalid id)
+
Init: pthread_mutexattr_init - SUCCESSFUL
Init: pthread_mutex_init - SUCCESSFUL
Init: pthread_mutex_trylock - SUCCESSFUL
Init: pthread_mutex_destroy - EBUSY (already locked)
Init: pthread_mutex_unlock - SUCCESSFUL
Init: pthread_mutex_destroy - SUCCESSFUL
+
Init: pthread_mutexattr_init - SUCCESSFUL
Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)
Init: pthread_mutex_init - SUCCESSFUL
@@ -78,6 +87,7 @@ Task 2: unlock Mutex 2
Task 2: exit
Init: pthread_mutexattr_destroy - SUCCESSFUL
Init: pthread_mutex_destroy - SUCCESSFUL
+
Init: pthread_mutexattr_init - SUCCESSFUL
Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)
Init: pthread_mutex_init - SUCCESSFUL