summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxrwlock01
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-18 00:39:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-18 00:39:25 +0000
commitb7681c6b12edb712755dcbbad2011b63680053d1 (patch)
tree0344678890ed0facc509becbf3b275681d368a11 /testsuites/psxtests/psxrwlock01
parent2009-05-17 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-b7681c6b12edb712755dcbbad2011b63680053d1.tar.bz2
2009-05-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for NULL attribute pointer on init.
Diffstat (limited to 'testsuites/psxtests/psxrwlock01')
-rw-r--r--testsuites/psxtests/psxrwlock01/psxrwlock01.scn2
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxrwlock01/psxrwlock01.scn b/testsuites/psxtests/psxrwlock01/psxrwlock01.scn
index 981020f0ca..5155dcbbb1 100644
--- a/testsuites/psxtests/psxrwlock01/psxrwlock01.scn
+++ b/testsuites/psxtests/psxrwlock01/psxrwlock01.scn
@@ -39,6 +39,8 @@ pthread_rwlockattr_init( &attr ) -- OK
pthread_rwlock_init( &rwlock, &attr ) -- OK
pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN
pthread_rwlock_destroy( &rwlock ) -- OK
+pthread_rwlock_init( &rwlock, NULL ) -- OK
+pthread_rwlock_destroy( &rwlock ) -- OK
pthread_rwlock_init( &RWLock, &attr ) -- OK
pthread_rwlock_tryrdlock(RWLock) -- OK
Init: pthread_create - thread 1 OK
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c
index 270e512a55..a03e032235 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -274,6 +274,15 @@ int main(
status = pthread_rwlock_destroy( &rwlock );
assert( status == 0 );
+ /********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
+ puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
+ status = pthread_rwlock_init( &rwlock, NULL );
+ assert( status == 0 );
+
+ puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
+ status = pthread_rwlock_destroy( &rwlock );
+ assert( status == 0 );
+
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
status = pthread_rwlock_init( &RWLock, &attr );