summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx03/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/psxtests/psx03/init.c')
-rw-r--r--testsuites/psxtests/psx03/init.c44
1 files changed, 22 insertions, 22 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 */