summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxspin01/test.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-25 08:37:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-25 12:43:54 +0200
commit9ec7d492b951efec32520bff7106e21e16e9c74d (patch)
tree95d49541ccbc8948b757dd1f0100335472d17371 /testsuites/psxtests/psxspin01/test.c
parentscore: Move thread queue MP callout to context (diff)
downloadrtems-9ec7d492b951efec32520bff7106e21e16e9c74d.tar.bz2
posix: Fix pthread_spin_unlock() error status
Close #2719.
Diffstat (limited to 'testsuites/psxtests/psxspin01/test.c')
-rw-r--r--testsuites/psxtests/psxspin01/test.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/testsuites/psxtests/psxspin01/test.c b/testsuites/psxtests/psxspin01/test.c
index f6fda64c75..270cdcfc86 100644
--- a/testsuites/psxtests/psxspin01/test.c
+++ b/testsuites/psxtests/psxspin01/test.c
@@ -146,9 +146,9 @@ int main(
status = pthread_spin_destroy( &spinlock );
rtems_test_assert( status == EINVAL );
- puts( "pthread_spin_unlock( &Spinlock ) -- already unlocked OK" );
+ puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == EPERM );
/* Now some basic locking and unlocking with a deadlock verification */
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
@@ -200,6 +200,11 @@ int main(
*/
mainThreadSpinning = 1;
+
+ puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
+ status = pthread_spin_unlock( &Spinlock );
+ rtems_test_assert( status == EPERM );
+
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
rtems_test_assert( status == 0 );