summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxspin01
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-18 10:54:46 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-18 10:55:24 -0600
commitd0beb9bac4d9f73d07e17be4da2de89facd26042 (patch)
tree0dcb5a7ccf15997e5ad0e7e5f0cff154beebbffd /testsuites/psxtests/psxspin01
parentpowerpc: Add r2 to CPU context (diff)
downloadrtems-d0beb9bac4d9f73d07e17be4da2de89facd26042.tar.bz2
Misc tests: Fix scn files and adjust output
Diffstat (limited to 'testsuites/psxtests/psxspin01')
-rw-r--r--testsuites/psxtests/psxspin01/psxspin01.scn31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxspin01/psxspin01.scn b/testsuites/psxtests/psxspin01/psxspin01.scn
index e69de29bb2..87ea2dbdbb 100644
--- a/testsuites/psxtests/psxspin01/psxspin01.scn
+++ b/testsuites/psxtests/psxspin01/psxspin01.scn
@@ -0,0 +1,31 @@
+*** POSIX SPINLOCK TEST 01 ***
+pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE ) -- EINVAL
+pthread_spin_init( NULL, PTHREAD_PROCESS_SHARED ) -- EINVAL
+pthread_spin_init( &spinlock, 0x1234 ) -- EINVAL
+pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED ) -- EINVAL
+pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK
+pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN
+pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN
+pthread_spin_lock( NULL ) -- EINVAL
+pthread_spin_trylock( NULL ) -- EINVAL
+pthread_spin_unlock( NULL ) -- EINVAL
+pthread_spin_destroy( NULL ) -- EINVAL
+pthread_spin_lock( &spinlock ) -- EINVAL
+pthread_spin_trylock( &spinlock ) -- EINVAL
+pthread_spin_unlock( &spinlock ) -- EINVAL
+pthread_spin_destroy( &spinlock ) -- EINVAL
+pthread_spin_unlock( &Spinlock ) -- already unlocked OK
+pthread_spin_lock( &Spinlock ) -- OK
+pthread_spin_lock( &Spinlock ) -- EDEADLK
+pthread_spin_trylock( &Spinlock ) -- EDEADLK
+pthread_spin_unlock( &Spinlock ) -- OK
+pthread_spin_trylock( &Spinlock ) -- OK
+pthread_spin_unlock( &Spinlock ) -- OK
+pthread_spin_lock( &Spinlock ) from Thread -- OK
+sleep to allow main thread to run
+pthread_spin_lock( &Spinlock ) -- OK
+pthread_spin_unlock( &Spinlock ) from Thread -- OK
+pthread_spin_destroy( &Spinlock ) -- EBUSY
+pthread_spin_unlock( &Spinlock ) -- OK
+pthread_spin_destroy( &Spinlock ) -- OK
+*** END OF POSIX SPINLOCK TEST 01 ***