diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-18 00:39:25 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-18 00:39:25 +0000 |
commit | b7681c6b12edb712755dcbbad2011b63680053d1 (patch) | |
tree | 0344678890ed0facc509becbf3b275681d368a11 | |
parent | 2009-05-17 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-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.
-rw-r--r-- | testsuites/psxtests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxrwlock01/psxrwlock01.scn | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxrwlock01/test.c | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 54ce74d8e3..9055a0dd67 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,8 @@ +2009-05-17 Joel Sherrill <joel.sherrill@oarcorp.com> + + * psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for + NULL attribute pointer on init. + 2009-05-17 Joel Sherrill <joel.sherrill@OARcorp.com> * psxsem01/Makefile.am, psxsem01/init.c, psxsem01/psxsem01.scn, 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 ); |