summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx03
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-08 17:52:53 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-08 17:52:53 +0000
commit2317457e101509ca16a669d99719ae44b0c60599 (patch)
tree76c26f4c12c18c55f067f00e644a28dded70c79b /testsuites/psxtests/psx03
parent2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-2317457e101509ca16a669d99719ae44b0c60599.tar.bz2
2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c, psx03/init.c, psx03/task.c, psx04/init.c, psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c, psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c, psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c, psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c, psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c, psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c, psxcancel01/init.c, psxchroot01/test.c, psxclock/init.c, psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c, psxfile01/test_write.c, psxitimer/init.c, psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c, psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c, psxreaddir/test.c, psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c, psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c, psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c, psxstack01/init.c, psxstat/test.c, psxtime/test.c, psxualarm/init.c: Use rtems_test_assert() consistently instead of system assert(). rtems_test_assert() is designed to integrate into the RTEMS test suite infrastructure.
Diffstat (limited to 'testsuites/psxtests/psx03')
-rw-r--r--testsuites/psxtests/psx03/init.c44
-rw-r--r--testsuites/psxtests/psx03/task.c6
2 files changed, 25 insertions, 25 deletions
diff --git a/testsuites/psxtests/psx03/init.c b/testsuites/psxtests/psx03/init.c
index 40d09fb73a..4efc0d599c 100644
--- a/testsuites/psxtests/psx03/init.c
+++ b/testsuites/psxtests/psx03/init.c
@@ -58,7 +58,7 @@ void *POSIX_Init(
/* install a signal handler */
status = sigemptyset( &act.sa_mask );
- assert( !status );
+ rtems_test_assert( !status );
act.sa_handler = Signal_handler;
act.sa_flags = 0;
@@ -77,17 +77,17 @@ void *POSIX_Init(
/* initialize the signal set we will wait for to SIGUSR1 */
status = sigemptyset( &waitset );
- assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR1 );
- assert( !status );
+ rtems_test_assert( !status );
timeout.tv_sec = 3;
timeout.tv_nsec = 0;
puts( "Init: waiting on any signal for 3 seconds." );
signo = sigtimedwait( &waitset, &siginfo, &timeout );
- assert( signo == -1 );
+ rtems_test_assert( signo == -1 );
if ( errno == EAGAIN )
puts( "Init: correctly timed out waiting for SIGUSR1." );
@@ -105,19 +105,19 @@ void *POSIX_Init(
/* initialize a mask to block SIGUSR2 */
status = sigemptyset( &mask );
- assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR2 );
- assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Block SIGUSR2\n" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- assert( !status );
+ rtems_test_assert( !status );
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
- assert( !status );
+ rtems_test_assert( !status );
/* signal handler is still installed, waitset is still set for SIGUSR1 */
@@ -133,7 +133,7 @@ void *POSIX_Init(
puts( "Init: correctly timed out waiting for SIGUSR1." );
else
printf( "sigtimedwait returned wrong errno - %d\n", errno );
- assert( signo == -1 );
+ rtems_test_assert( signo == -1 );
/*
* wait on SIGUSR1 for 3 seconds, Task_2 will send it to us
@@ -144,7 +144,7 @@ void *POSIX_Init(
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_2, NULL );
- assert( !status );
+ rtems_test_assert( !status );
/* signal handler is still installed, waitset is still set for SIGUSR1 */
@@ -162,38 +162,38 @@ void *POSIX_Init(
puts( "Init: waiting on any signal for 3 seconds." );
signo = sigtimedwait( &waitset, &siginfo, &timeout );
printf( "Init: received (%d) SIGUSR1=%d\n", siginfo.si_signo, SIGUSR1 );
- assert( signo == SIGUSR1 );
- assert( siginfo.si_signo == SIGUSR1 );
- assert( siginfo.si_code == SI_USER );
- assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
+ rtems_test_assert( signo == SIGUSR1 );
+ rtems_test_assert( siginfo.si_signo == SIGUSR1 );
+ rtems_test_assert( siginfo.si_code == SI_USER );
+ rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
/* try out a process signal */
empty_line();
puts( "Init: kill with SIGUSR2." );
status = kill( getpid(), SIGUSR2 );
- assert( !status );
+ rtems_test_assert( !status );
siginfo.si_code = -1;
siginfo.si_signo = -1;
siginfo.si_value.sival_int = -1;
status = sigemptyset( &waitset );
- assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR1 );
- assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR2 );
- assert( !status );
+ rtems_test_assert( !status );
puts( "Init: waiting on any signal for 3 seconds." );
signo = sigtimedwait( &waitset, &siginfo, &timeout );
printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 );
- assert( signo == SIGUSR2 );
- assert( siginfo.si_signo == SIGUSR2 );
- assert( siginfo.si_code == SI_USER );
- assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
+ rtems_test_assert( signo == SIGUSR2 );
+ rtems_test_assert( siginfo.si_signo == SIGUSR2 );
+ rtems_test_assert( siginfo.si_code == SI_USER );
+ rtems_test_assert( siginfo.si_value.sival_int != -1 ); /* rtems does always set this */
/* exit this thread */
diff --git a/testsuites/psxtests/psx03/task.c b/testsuites/psxtests/psx03/task.c
index df3fdaed5d..b4402ee333 100644
--- a/testsuites/psxtests/psx03/task.c
+++ b/testsuites/psxtests/psx03/task.c
@@ -8,7 +8,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,7 +33,7 @@ void *Task_1(
puts( "Task_1: pthread_kill - SIGUSR2 to Init" );
status = pthread_kill( Init_id, SIGUSR2 );
- assert( !status );
+ rtems_test_assert( !status );
pthread_exit( NULL );
@@ -54,7 +54,7 @@ void *Task_2(
puts( "Task_1: pthread_kill - SIGUSR1 to Init" );
status = pthread_kill( Init_id, SIGUSR1 );
- assert( !status );
+ rtems_test_assert( !status );
pthread_exit( NULL );