diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-03 18:39:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-03 18:39:11 +0000 |
commit | 2819bd17b29f085d2b8f539af8913ca656b6b7ae (patch) | |
tree | abf6769d21e015a6b8e8e3572239c8eeb9fd2ce3 /testsuites/psxtests/psx04/init.c | |
parent | 2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-2819bd17b29f085d2b8f539af8913ca656b6b7ae.tar.bz2 |
2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* psx04/init.c, psx04/psx04.scn: Test error cases in sigwait() and
sigtimedwait(). Update screen file.
Diffstat (limited to 'testsuites/psxtests/psx04/init.c')
-rw-r--r-- | testsuites/psxtests/psx04/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c index e09f298101..6286c73708 100644 --- a/testsuites/psxtests/psx04/init.c +++ b/testsuites/psxtests/psx04/init.c @@ -80,6 +80,20 @@ void *POSIX_Init( Init_id = pthread_self(); printf( "Init's ID is 0x%08x\n", Init_id ); + /* generate some easy error cases */ + + status = sigwait( NULL, NULL ); + if ( status != EINVAL ) + printf( "status = %d (%s)\n", status, strerror(status) ); + assert( status == EINVAL ); + puts( "Init: sigwait - EINVAL (NULL set)" ); + + status = sigtimedwait( NULL, NULL, NULL ); + if ( status != -1 ) + printf( "status = %d\n", status ); + assert( errno == EINVAL ); + puts( "Init: sigwait - EINVAL (NULL set)" ); + /* install a signal handler for SIGUSR1 */ status = sigemptyset( &act.sa_mask ); |