summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx04
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-03 18:39:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-03 18:39:11 +0000
commit2819bd17b29f085d2b8f539af8913ca656b6b7ae (patch)
treeabf6769d21e015a6b8e8e3572239c8eeb9fd2ce3 /testsuites/psxtests/psx04
parent2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-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')
-rw-r--r--testsuites/psxtests/psx04/init.c14
-rw-r--r--testsuites/psxtests/psx04/psx04.scn22
2 files changed, 23 insertions, 13 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 );
diff --git a/testsuites/psxtests/psx04/psx04.scn b/testsuites/psxtests/psx04/psx04.scn
index 11c9ed9428..442ba5549c 100644
--- a/testsuites/psxtests/psx04/psx04.scn
+++ b/testsuites/psxtests/psx04/psx04.scn
@@ -1,25 +1,23 @@
-
-
*** POSIX TEST 4 ***
Init's ID is 0x0b010001
+Init: sigwait - EINVAL (NULL set)
+Init: sigwait - EINVAL (NULL set)
Init: sigemptyset - set= 0x00000000
Init: sigfillset - set= 0xffffffff
Init: sigdelset - delete SIGUSR1 set= 0xfeffffff
Init: sigismember - FALSE since SIGUSR1 is not a member
Init: sigismember - TRUE since SIGUSR2 is a member
Init: send SIGUSR1 to process
-Signal: 25 caught by 0xb010001 (1)
Init: Block SIGUSR1
Init: send SIGUSR1 to process
-Signal: 25 caught by 0xb010001 (1)
Init: Block SIGUSR1
-Init: Signals pending 0x00000000
+Init: Signals pending 0x01000000
Init: send SIGUSR1 to process
Init: Signals pending 0x01000000
Init: Unblock SIGUSR1
-Signal: 25 caught by 0xb010001 (2)
+Signal: 25 caught by 0xb010001 (1)
Init: create a thread interested in SIGUSR1
Init: Block SIGUSR1
@@ -29,7 +27,7 @@ Task_1: sleeping for 5 seconds
Init: send SIGUSR1 to process
Init: Signals pending 0x01000000
Init: sleep so the other task can catch signal
-Signal: 25 caught by 0xb010002 (3)
+Signal: 25 caught by 0xb010002 (2)
Task_1: 4 seconds left
Task_1: exit
@@ -39,11 +37,11 @@ Init: 0 seconds left on previous alarm
Init: Firing alarm in 2 seconds
Init: 5 seconds left on previous alarm
Init: Wait 4 seconds for alarm
-Signal: 14 caught by 0xb010001 (4)
+Signal: 14 caught by 0xb010001 (3)
Init: 2 seconds left in sleep
Init: Block SIGUSR1 and SIGUSR2 only
-Init: Previous blocked set was 0x01000000
+Init: Previous blocked set was 0xffffdfff
Init: Current blocked set is 0x03000000
Init: Unblock all signals
Init: Previous blocked set was 0x03000000
@@ -52,13 +50,13 @@ Init: create a thread to send Init SIGUSR1
Init: sigsuspend for any signal
Task_2: sending SIGUSR1
Task_2: exit
-Signal: 25 caught by 0xb010001 (5)
+Signal: 25 caught by 0xb010001 (4)
Init: awakended from sigsuspend status=-0000001
Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO
Init: sleep so the Task_3 can sigqueue SIGUSR1
Task_3: sigqueue SIGUSR1 with value= 25
-Signal_info: 25 caught by 0xb010004 (6) si_signo= 25 si_code= 1 value= 25
+Signal_info: 25 caught by 0xb010004 (5) si_signo= 25 si_code= 1 value= 25
Task_3: sigwaitinfo SIGUSR1 with value= 25
Init: sigqueue occurred
@@ -111,5 +109,3 @@ Init: kill - ESRCH (pid invalid)
Init: kill - EINVAL (signal = 0)
Init: kill - EINVAL (sig invalid)
*** END OF POSIX TEST 4 ***
-Unexpected trap (0x09) at address 0x0201bc74
-data access exception at 0x00000008