change log for rtems (2010-10-21)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Oct 21 22:10:58 UTC 2010
*joel*:
2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
* psx02/init.c, psx02/task.c, psx03/init.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, psxitimer/init.c,
psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.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, psxstack02/init.c, psxualarm/init.c: Eliminate
double space after parenthesis on rtems_test_assert().
M 1.321 testsuites/psxtests/ChangeLog
M 1.16 testsuites/psxtests/psx02/init.c
M 1.11 testsuites/psxtests/psx02/task.c
M 1.15 testsuites/psxtests/psx03/init.c
M 1.24 testsuites/psxtests/psx04/init.c
M 1.9 testsuites/psxtests/psx04/task1.c
M 1.8 testsuites/psxtests/psx04/task2.c
M 1.11 testsuites/psxtests/psx04/task3.c
M 1.35 testsuites/psxtests/psx05/init.c
M 1.10 testsuites/psxtests/psx05/task.c
M 1.9 testsuites/psxtests/psx05/task2.c
M 1.8 testsuites/psxtests/psx05/task3.c
M 1.18 testsuites/psxtests/psx06/init.c
M 1.13 testsuites/psxtests/psx06/task.c
M 1.13 testsuites/psxtests/psx06/task2.c
M 1.36 testsuites/psxtests/psx07/init.c
M 1.13 testsuites/psxtests/psx08/init.c
M 1.10 testsuites/psxtests/psx08/task2.c
M 1.7 testsuites/psxtests/psx08/task3.c
M 1.18 testsuites/psxtests/psx09/init.c
M 1.21 testsuites/psxtests/psx10/init.c
M 1.10 testsuites/psxtests/psx10/task.c
M 1.10 testsuites/psxtests/psx10/task2.c
M 1.9 testsuites/psxtests/psx10/task3.c
M 1.14 testsuites/psxtests/psx11/init.c
M 1.11 testsuites/psxtests/psx11/task.c
M 1.16 testsuites/psxtests/psx12/init.c
M 1.5 testsuites/psxtests/psxalarm01/init.c
M 1.9 testsuites/psxtests/psxbarrier01/test.c
M 1.5 testsuites/psxtests/psxcancel01/init.c
M 1.11 testsuites/psxtests/psxchroot01/test.c
M 1.3 testsuites/psxtests/psxitimer/init.c
M 1.5 testsuites/psxtests/psxkey01/task.c
M 1.4 testsuites/psxtests/psxkey02/init.c
M 1.6 testsuites/psxtests/psxkey03/init.c
M 1.16 testsuites/psxtests/psxmount/test.c
M 1.24 testsuites/psxtests/psxmsgq01/init.c
M 1.5 testsuites/psxtests/psxmsgq03/init.c
M 1.9 testsuites/psxtests/psxmsgq04/init.c
M 1.14 testsuites/psxtests/psxrwlock01/test.c
M 1.19 testsuites/psxtests/psxsem01/init.c
M 1.9 testsuites/psxtests/psxsignal01/init.c
M 1.3 testsuites/psxtests/psxsignal01/task1.c
M 1.7 testsuites/psxtests/psxsignal02/init.c
M 1.11 testsuites/psxtests/psxsignal03/init.c
M 1.3 testsuites/psxtests/psxsignal05/init.c
M 1.6 testsuites/psxtests/psxspin01/test.c
M 1.6 testsuites/psxtests/psxspin02/test.c
M 1.7 testsuites/psxtests/psxstack01/init.c
M 1.2 testsuites/psxtests/psxstack02/init.c
M 1.5 testsuites/psxtests/psxualarm/init.c
diff -u rtems/testsuites/psxtests/ChangeLog:1.320 rtems/testsuites/psxtests/ChangeLog:1.321
--- rtems/testsuites/psxtests/ChangeLog:1.320 Fri Oct 8 04:39:35 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 16:22:24 2010
@@ -1,3 +1,21 @@
+2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * psx02/init.c, psx02/task.c, psx03/init.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, psxitimer/init.c,
+ psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
+ psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.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, psxstack02/init.c, psxualarm/init.c: Eliminate
+ double space after parenthesis on rtems_test_assert().
+
2010-10-08 Ralf Corsépius <ralf.corsepius at rtems.org>
* psx07/init.c: Add HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE guard around
diff -u rtems/testsuites/psxtests/psx02/init.c:1.15 rtems/testsuites/psxtests/psx02/init.c:1.16
--- rtems/testsuites/psxtests/psx02/init.c:1.15 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx02/init.c Thu Oct 21 16:22:24 2010
@@ -56,7 +56,7 @@
/* install a signal handler */
status = sigemptyset( &act.sa_mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
act.sa_handler = Signal_handler;
act.sa_flags = 0;
@@ -69,43 +69,43 @@
Signal_occurred = 0;
status = pthread_kill( Init_id, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Signal_occurred = 0;
/* now block the signal, send it, see if it is pending, and unblock it */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Block SIGUSR1\n" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
printf( "Init: send SIGUSR1 to self\n" );
status = pthread_kill( Init_id, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
printf( "Init: Unblock SIGUSR1\n" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1_through_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/*
* Loop for 5 seconds seeing how many signals we catch
@@ -122,10 +122,10 @@
status = nanosleep ( &tv, &tr );
if ( status == -1 ) {
- rtems_test_assert( errno == EINTR );
- rtems_test_assert( tr.tv_nsec || tr.tv_sec );
+ rtems_test_assert( errno == EINTR );
+ rtems_test_assert( tr.tv_nsec || tr.tv_sec );
} else if ( !status ) {
- rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
+ rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
}
printf(
diff -u rtems/testsuites/psxtests/psx02/task.c:1.10 rtems/testsuites/psxtests/psx02/task.c:1.11
--- rtems/testsuites/psxtests/psx02/task.c:1.10 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx02/task.c Thu Oct 21 16:22:24 2010
@@ -32,10 +32,10 @@
for ( i=0 ; i<5 ; i++ ) {
print_current_time( "Task1: ", "" );
status = pthread_kill( Init_id, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
seconds = sleep( 1 );
- rtems_test_assert( !seconds );
+ rtems_test_assert( !seconds );
}
puts( "*** END OF POSIX TEST 2 ***" );
rtems_test_exit( 0 );
diff -u rtems/testsuites/psxtests/psx03/init.c:1.14 rtems/testsuites/psxtests/psx03/init.c:1.15
--- rtems/testsuites/psxtests/psx03/init.c:1.14 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx03/init.c Thu Oct 21 16:22:24 2010
@@ -77,17 +77,17 @@
/* initialize the signal set we will wait for to SIGUSR1 */
status = sigemptyset( &waitset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR1 );
- rtems_test_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 );
- rtems_test_assert( signo == -1 );
+ rtems_test_assert( signo == -1 );
if ( errno == EAGAIN )
puts( "Init: correctly timed out waiting for SIGUSR1." );
@@ -105,19 +105,19 @@
/* initialize a mask to block SIGUSR2 */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Block SIGUSR2\n" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* signal handler is still installed, waitset is still set for SIGUSR1 */
@@ -133,7 +133,7 @@
puts( "Init: correctly timed out waiting for SIGUSR1." );
else
printf( "sigtimedwait returned wrong errno - %d\n", errno );
- rtems_test_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 @@
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* signal handler is still installed, waitset is still set for SIGUSR1 */
@@ -162,38 +162,38 @@
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 );
- 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 */
+ 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 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
siginfo.si_code = -1;
siginfo.si_signo = -1;
siginfo.si_value.sival_int = -1;
status = sigemptyset( &waitset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &waitset, SIGUSR2 );
- rtems_test_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 );
- 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 */
+ 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 -u rtems/testsuites/psxtests/psx04/init.c:1.23 rtems/testsuites/psxtests/psx04/init.c:1.24
--- rtems/testsuites/psxtests/psx04/init.c:1.23 Tue Jul 27 11:38:08 2010
+++ rtems/testsuites/psxtests/psx04/init.c Thu Oct 21 16:22:24 2010
@@ -85,44 +85,44 @@
status = sigwait( NULL, NULL );
if ( status != EINVAL )
printf( "status = %d (%s)\n", status, strerror(status) );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: sigwait - EINVAL (NULL set)" );
status = sigtimedwait( NULL, NULL, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigwait - EINVAL (NULL set)" );
/* install a signal handler for SIGUSR1 */
status = sigemptyset( &act.sa_mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: sigemptyset - set= 0x%08x\n", (unsigned int) act.sa_mask );
/* test sigfillset following the above sigemptyset */
status = sigfillset( &act.sa_mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: sigfillset - set= 0x%08x\n", (unsigned int) act.sa_mask );
/* test sigdelset */
status = sigdelset( &act.sa_mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n",
(unsigned int) act.sa_mask );
/* test sigismember - FALSE */
status = sigismember( &act.sa_mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sigismember - FALSE since SIGUSR1 is not a member" );
/* test sigismember - TRUE */
status = sigismember( &act.sa_mask, SIGUSR2 );
- rtems_test_assert( status );
+ rtems_test_assert( status );
puts( "Init: sigismember - TRUE since SIGUSR2 is a member" );
/* return the set to empty */
@@ -139,7 +139,7 @@
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* end of install a signal handler for SIGUSR1 */
@@ -150,10 +150,10 @@
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1" );
act.sa_handler = Signal_handler;
@@ -168,7 +168,7 @@
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Signal_occurred = 0;
@@ -177,30 +177,30 @@
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: Unblock SIGUSR1" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* now let another task get interrupted by a signal */
@@ -208,33 +208,33 @@
puts( "Init: create a thread interested in SIGUSR1" );
status = pthread_create( &Task1_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can block" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task 1 */
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigpending( &pending_set );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can catch signal" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task 1 */
@@ -245,7 +245,7 @@
/* install a signal handler for SIGALRM and unblock it */
status = sigemptyset( &act.sa_mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
act.sa_handler = Signal_handler;
act.sa_flags = 0;
@@ -253,65 +253,65 @@
sigaction( SIGALRM, &act, NULL );
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGALRM );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Unblock SIGALRM" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* schedule the alarm */
puts( "Init: Firing alarm in 5 seconds" );
remaining = alarm( 5 );
printf( "Init: %d seconds left on previous alarm\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Firing alarm in 2 seconds" );
remaining = alarm( 2 );
printf( "Init: %d seconds left on previous alarm\n", remaining );
- rtems_test_assert( remaining == 5 );
+ rtems_test_assert( remaining == 5 );
puts( "Init: Wait 4 seconds for alarm" );
remaining = sleep( 4 );
printf( "Init: %d seconds left in sleep\n", remaining );
- rtems_test_assert( remaining == 2 );
+ rtems_test_assert( remaining == 2 );
/* test SIG_SETMASK case and returning oset of pthread_sigmask */
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1 and SIGUSR2 only" );
status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* test inquiry about current blocked set with pthread_sigmask */
status = pthread_sigmask( 0, NULL, &oset );
printf( "Init: Current blocked set is 0x%08x\n", (unsigned int) oset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* return blocked mask to no signals blocked */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Unblock all signals" );
status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* test sigsuspend */
@@ -319,14 +319,14 @@
puts( "Init: create a thread to send Init SIGUSR1" );
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sigsuspend for any signal" );
status = sigsuspend( &mask );
- rtems_test_assert( status );
+ rtems_test_assert( status );
printf( "Init: awakended from sigsuspend status=%08d \n", status );
/* test a SIGINFO case, these are signals sent to a process only */
@@ -335,7 +335,7 @@
puts( "Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO" );
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* set action on SIGUSR1 to an info case */
act.sa_handler = Signal_handler;
@@ -346,7 +346,7 @@
puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task 1 */
@@ -355,71 +355,71 @@
/* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* Send SIGUSR1, Task_3 has issued a sigwait */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR1" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Block SIGUSR2" );
status = sigprocmask( SIG_BLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: send SIGUSR2 to process" );
status = kill( getpid(), SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* Suspend for signal that has already be sent */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sigsuspend for any signal" );
status = sigsuspend( &mask );
- rtems_test_assert( status );
+ rtems_test_assert( status );
printf( "Init: awakended from sigsuspend status=%d \n", status );
/* generate error cases for psignal */
@@ -429,156 +429,156 @@
status = sigemptyset( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigemptyset - EINVAL (set invalid)" );
status = sigfillset( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigfillset - EINVAL (set invalid)" );
status = sigaddset( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaddset - EINVAL (set invalid)" );
status = sigaddset( &mask, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaddset - EINVAL (signal = 0)" );
status = sigaddset( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaddset - EINVAL (set invalid)" );
status = sigdelset( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigdelset - EINVAL (set invalid)" );
status = sigdelset( &mask, 0 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" );
status = sigdelset( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigdelset - EINVAL (set invalid)" );
status = sigismember( NULL, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigismember - EINVAL (set invalid)" );
status = sigismember( &mask, 0 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sigismember - SUCCESSFUL (signal = 0)" );
status = sigismember( &mask, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigismember - EINVAL (signal invalid)" );
status = sigaction( 0, &act, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaction - EINVAL (signal = 0)" );
status = sigaction( 999, &act, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaction - EINVAL (signal invalid)" );
status = sigaction( SIGKILL, &act, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigaction - EINVAL (SIGKILL)" );
status = pthread_sigmask( SIG_BLOCK, NULL, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" );
status = pthread_sigmask( 999, &pending_set, NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_sigmask - EINVAL (how invalid)" );
status = sigpending( NULL );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: sigpending - EINVAL (set invalid)" );
timeout.tv_nsec = -1;
status = sigtimedwait( &mask, &info, &timeout );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)" );
timeout.tv_nsec = 0x7fffffff;
status = sigtimedwait( &mask, &info, &timeout );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
status = pthread_kill( Init_id, 999 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_kill - EINVAL (sig invalid)" );
status = pthread_kill( 0, SIGUSR2 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == ESRCH );
+ rtems_test_assert( errno == ESRCH );
puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" );
status = pthread_kill( Init_id, 0 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: pthread_kill - EINVAL (signal = 0)" );
act.sa_handler = SIG_IGN;
act.sa_flags = 0;
sigaction( SIGUSR2, &act, NULL );
status = pthread_kill( Init_id, SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" );
status = kill( INT_MAX, SIGUSR1 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == ESRCH );
+ rtems_test_assert( errno == ESRCH );
puts( "Init: kill - ESRCH (pid invalid)" );
status = kill( getpid(), 0 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: kill - EINVAL (signal = 0)" );
status = kill( getpid(), 999 );
if ( status != -1 )
printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "Init: kill - EINVAL (sig invalid)" );
/* exit this thread */
diff -u rtems/testsuites/psxtests/psx04/task1.c:1.8 rtems/testsuites/psxtests/psx04/task1.c:1.9
--- rtems/testsuites/psxtests/psx04/task1.c:1.8 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task1.c Thu Oct 21 16:22:24 2010
@@ -30,7 +30,7 @@
seconds = sleep( 5 );
printf( "Task_1: %d seconds left\n", seconds );
- rtems_test_assert( seconds );
+ rtems_test_assert( seconds );
/* switch to Init */
diff -u rtems/testsuites/psxtests/psx04/task2.c:1.7 rtems/testsuites/psxtests/psx04/task2.c:1.8
--- rtems/testsuites/psxtests/psx04/task2.c:1.7 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task2.c Thu Oct 21 16:22:24 2010
@@ -28,7 +28,7 @@
printf( "Task_2: sending SIGUSR1\n" );
status = pthread_kill( Init_id, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to Init */
diff -u rtems/testsuites/psxtests/psx04/task3.c:1.10 rtems/testsuites/psxtests/psx04/task3.c:1.11
--- rtems/testsuites/psxtests/psx04/task3.c:1.10 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx04/task3.c Thu Oct 21 16:22:24 2010
@@ -35,24 +35,24 @@
printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int );
status = sigqueue( getpid(), SIGUSR1, value );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* catch signal with sigwaitinfo */
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task_3: sigwaitinfo SIGUSR1 with value= %d\n", value.sival_int );
status = sigwaitinfo( &mask, &info );
/* switch to Init */
- rtems_test_assert( !(status==-1) );
+ rtems_test_assert( !(status==-1) );
printf(
"Task_3: si_signo= %d si_code= %d value= %d\n",
info.si_signo,
@@ -65,17 +65,17 @@
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task_3: sigwait SIGUSR1\n" );
status = sigwait( &mask, &sig );
/* switch to Init */
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task_3: signo= %d\n", sig );
/* catch signal with pause */
@@ -83,17 +83,17 @@
empty_line();
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task_3: pause\n" );
status = pause( );
/* switch to Init */
- rtems_test_assert( !(status==-1) );
+ rtems_test_assert( !(status==-1) );
printf( "Task_3: pause= %d\n", status );
@@ -103,11 +103,11 @@
printf( "Task_3: sending SIGUSR2\n" );
status = pthread_kill( Init_id, SIGUSR2 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task_3: sleep so the Init task can reguest a signal\n" );
remaining = sleep( 1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* end of task 3 */
printf( "Task_3: exit\n" );
diff -u rtems/testsuites/psxtests/psx05/init.c:1.34 rtems/testsuites/psxtests/psx05/init.c:1.35
--- rtems/testsuites/psxtests/psx05/init.c:1.34 Tue Dec 8 11:52:52 2009
+++ rtems/testsuites/psxtests/psx05/init.c Thu Oct 21 16:22:24 2010
@@ -42,7 +42,7 @@
/* protocol */
status = pthread_mutexattr_getprotocol( attr, &protocol );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "%smutex protocol is (%d) -- ", msg, protocol );
switch ( protocol ) {
@@ -57,20 +57,20 @@
break;
default:
puts( "UNKNOWN" );
- rtems_test_assert( 0 );
+ rtems_test_assert( 0 );
break;
}
/* priority ceiling */
status = pthread_mutexattr_getprioceiling( attr, &prioceiling );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "%smutex priority ceiling is %d\n", msg, prioceiling );
/* process shared */
status = pthread_mutexattr_getpshared( attr, &pshared );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "%smutex process shared is (%d) -- ", msg, pshared );
switch ( pshared ) {
case PTHREAD_PROCESS_PRIVATE:
@@ -81,7 +81,7 @@
break;
default:
puts( "UNKNOWN" );
- rtems_test_assert( 0 );
+ rtems_test_assert( 0 );
break;
}
}
@@ -123,7 +123,7 @@
int old_ceiling;
int priority;
- rtems_test_assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
+ rtems_test_assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
Mutex_bad_id = MUTEX_BAD_ID;
puts( "\n\n*** POSIX TEST 5 ***" );
@@ -141,30 +141,30 @@
puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" );
status = pthread_mutexattr_init( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Print_mutexattr( "Init: ", &attr );
/* create an "uninitialized" attribute structure */
status = pthread_mutexattr_init( &destroyed_attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &destroyed_attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" );
status = pthread_mutexattr_destroy( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
status = pthread_mutexattr_destroy( &destroyed_attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* error cases for set and get pshared attribute */
@@ -172,25 +172,25 @@
puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
status = pthread_mutexattr_getpshared( NULL, &pshared );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)" );
status = pthread_mutexattr_getpshared( &attr, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
pshared = PTHREAD_PROCESS_PRIVATE;
puts( "Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)" );
status = pthread_mutexattr_setpshared( NULL, pshared );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
pshared = PTHREAD_PROCESS_PRIVATE;
puts( "Init: pthread_mutexattr_setpshared - EINVAL (not initialized)" );
status = pthread_mutexattr_setpshared( &destroyed_attr, pshared );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* error cases for set and get protocol attribute */
@@ -198,27 +198,27 @@
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)" );
status = pthread_mutexattr_getprotocol( NULL, &protocol );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)" );
status = pthread_mutexattr_getprotocol( &attr, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)" );
status = pthread_mutexattr_getprotocol( &destroyed_attr, &protocol );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)" );
status = pthread_mutexattr_setprotocol( NULL, PTHREAD_PRIO_NONE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)" );
status = pthread_mutexattr_setprotocol( &attr, -1 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)" );
status = pthread_mutexattr_setprotocol( &destroyed_attr, -1 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* error cases for set and get prioceiling attribute */
@@ -226,34 +226,34 @@
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)" );
status = pthread_mutexattr_getprioceiling( NULL, &ceiling );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)" );
status = pthread_mutexattr_getprioceiling( &attr, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)" );
status = pthread_mutexattr_getprioceiling( &destroyed_attr, &ceiling );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)" );
status = pthread_mutexattr_setprioceiling( NULL, 128 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)" );
status = pthread_mutexattr_setprioceiling( &attr, 512 );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)" );
status = pthread_mutexattr_setprioceiling( &destroyed_attr, -1 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* create a thread */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* now try some basic mutex operations */
@@ -261,18 +261,18 @@
puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
status = pthread_mutex_init( NULL, &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* must get around error checks in attribute set routines */
attr.protocol = -1;
puts( "Init: pthread_mutex_init - EINVAL (bad protocol)" );
status = pthread_mutex_init( &Mutex_id, &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* must get around error checks in attribute set routines */
attr.protocol = PTHREAD_PRIO_INHERIT;
@@ -280,56 +280,56 @@
puts( "Init: pthread_mutex_init - EINVAL (bad priority ceiling)" );
status = pthread_mutex_init( &Mutex_id, &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* must get around various error checks before checking bad scope */
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - ENOSYS (process wide scope)" );
attr.process_shared = PTHREAD_PROCESS_SHARED;
status = pthread_mutex_init( &Mutex_id, &attr );
- rtems_test_assert( status == ENOSYS );
+ rtems_test_assert( status == ENOSYS );
puts( "Init: pthread_mutex_init - EINVAL (invalid scope)" );
attr.process_shared = -1;
status = pthread_mutex_init( &Mutex_id, &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* bad kind */
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - EINVAL (invalid type)" );
attr.type = -1;
status = pthread_mutex_init( &Mutex_id, &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* now set up for a success pthread_mutex_init */
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Changing mutex attributes" );
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutexattr_setprioceiling(
&attr,
(sched_get_priority_max(SCHED_FIFO) / 2) + 1
);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Print_mutexattr( "Init: ", &attr );
puts( "Init: Resetting mutex attributes" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/*
* Set the protocol to priority ceiling so the owner check happens
@@ -337,13 +337,13 @@
*/
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex_id, &attr );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/*
* This is not required to be an error and when it is, there are
@@ -355,44 +355,44 @@
status = pthread_mutex_init( &Mutex_id, &attr );
if ( !status )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
#endif
puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" );
status = pthread_mutex_trylock( &Mutex_bad_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_trylock - EDEADLK (already locked)" );
status = pthread_mutex_trylock( &Mutex_id );
if ( status != EDEADLK )
printf( "status = %d\n", status );
- rtems_test_assert( status == EDEADLK );
+ rtems_test_assert( status == EDEADLK );
puts( "Init: pthread_mutex_lock - EINVAL (NULL id)" );
status = pthread_mutex_lock( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_unlock - EINVAL (NULL id)" );
status = pthread_mutex_unlock( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" );
status = pthread_mutex_lock( &Mutex_id );
if ( status != EDEADLK )
printf( "status = %d\n", status );
- rtems_test_assert( status == EDEADLK );
+ rtems_test_assert( status == EDEADLK );
puts( "Init: Sleep 1 second" );
@@ -404,19 +404,19 @@
status = pthread_mutex_unlock( &Mutex_bad_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_unlock - EPERM (not owner)" );
status = pthread_mutex_unlock( &Mutex_id );
if ( status != EPERM )
printf( "status = %d\n", status );
- rtems_test_assert( status == EPERM );
+ rtems_test_assert( status == EPERM );
puts( "Init: pthread_mutex_timedlock - time out in 1/2 second" );
calculate_abstimeout( ×, 0, (TOD_NANOSECONDS_PER_SECOND / 2) );
@@ -424,7 +424,7 @@
status = pthread_mutex_timedlock( &Mutex_id, × );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
puts( "Init: pthread_mutex_timedlock - time out in the past" );
calculate_abstimeout( ×, -1, (TOD_NANOSECONDS_PER_SECOND / 2) );
@@ -432,7 +432,7 @@
status = pthread_mutex_timedlock( &Mutex_id, × );
if ( status != EBUSY )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
/* switch to idle */
@@ -446,23 +446,23 @@
status = pthread_mutex_init( &Mutex2_id, &attr );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - EAGAIN (too many)" );
status = pthread_mutex_init( &Mutex3_id, &attr );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_destroy - EINVAL (invalid id)" );
status = pthread_mutex_destroy( &Mutex_bad_id );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* destroy a busy mutex */
@@ -470,31 +470,31 @@
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_destroy - EBUSY (already locked)" );
status = pthread_mutex_destroy( &Mutex2_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* priority inherit mutex */
@@ -502,26 +502,26 @@
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts(
"Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_INHERIT)"
);
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread at a lower priority */
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* set priority of Task2 to highest priority */
@@ -529,25 +529,25 @@
puts( "Init: pthread_setschedparam - Setting Task2 priority to highest" );
status = pthread_setschedparam( Task2_id, SCHED_FIFO, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switching to Task2 */
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: pthread_getschedparam - priority = %d\n", param.sched_priority);
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
status = pthread_mutexattr_destroy( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
status = pthread_mutex_destroy( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* priority ceiling mutex */
@@ -555,41 +555,41 @@
puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts(
"Init: pthread_mutexattr_setprotocol - SUCCESSFUL (PTHREAD_PRIO_PROTECT)"
);
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_init - SUCCESSFUL" );
status = pthread_mutex_init( &Mutex2_id, &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_mutex_getprioceiling - EINVAL (invalid id)" );
status = pthread_mutex_getprioceiling( &Mutex_bad_id, &ceiling );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)" );
status = pthread_mutex_getprioceiling( &Mutex2_id, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: pthread_mutex_getprioceiling - %d\n", ceiling );
puts( "Init: pthread_mutex_setprioceiling - EINVAL (invalid id)" );
status = pthread_mutex_setprioceiling( &Mutex_bad_id, 200, &old_ceiling );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)" );
status = pthread_mutex_setprioceiling( &Mutex2_id, 512, &old_ceiling );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)" );
status = pthread_mutex_setprioceiling( &Mutex2_id, 128, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* normal cases of set priority ceiling */
@@ -598,23 +598,23 @@
printf( "Init: pthread_mutex_setprioceiling - new ceiling = %d\n", priority );
status = pthread_mutex_setprioceiling( &Mutex2_id, priority, &old_ceiling );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf(
"Init: pthread_mutex_setprioceiling - old ceiling = %d\n",old_ceiling
);
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf(
"Init: pthread_getschedparam - priority = %d\n", param.sched_priority
);
puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
status = pthread_mutex_trylock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf(
"Init: pthread_getschedparam - priority = %d\n", param.sched_priority
);
@@ -622,30 +622,30 @@
/* create a thread at a higher priority */
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* set priority of Task3 to highest priority */
param.sched_priority = --priority;
status = pthread_setschedparam( Task3_id, SCHED_FIFO, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_setschedparam - set Task3 priority to highest" );
/* DOES NOT SWITCH to Task3 */
puts( "Init: Sleep 1 second" );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep( 1 );
/* switch to task 3 */
puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
status = pthread_mutex_unlock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: pthread_mutex_getprioceiling- ceiling = %d\n", ceiling );
/* set priority of Init to highest priority */
@@ -653,14 +653,14 @@
param.sched_priority = sched_get_priority_max(SCHED_FIFO);
status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_setschedparam - set Init priority to highest" );
puts( "Init: pthread_mutex_lock - EINVAL (priority ceiling violation)" );
status = pthread_mutex_lock( &Mutex2_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* mutexinit.c: Initialising recursive mutex */
@@ -678,7 +678,7 @@
status = pthread_mutex_init( &Mutex2_id, &attr );
if ( status )
printf( "status recursive mutex :%d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "*** END OF POSIX TEST 5 ***" );
rtems_test_exit( 0 );
diff -u rtems/testsuites/psxtests/psx05/task.c:1.9 rtems/testsuites/psxtests/psx05/task.c:1.10
--- rtems/testsuites/psxtests/psx05/task.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task.c Thu Oct 21 16:22:24 2010
@@ -31,13 +31,13 @@
status = pthread_mutex_trylock( &Mutex_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
printf( "Task: pthread_mutex_lock unavailable\n" );
status = pthread_mutex_lock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to init */
diff -u rtems/testsuites/psxtests/psx05/task2.c:1.8 rtems/testsuites/psxtests/psx05/task2.c:1.9
--- rtems/testsuites/psxtests/psx05/task2.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task2.c Thu Oct 21 16:22:24 2010
@@ -30,14 +30,14 @@
status = pthread_mutex_lock( &Mutex2_id );
if ( status )
printf( "status =%d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task 2: mutex acquired\n" );
/* switch to init */
printf( "Task 2: unlock Mutex 2\n" );
status = pthread_mutex_unlock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task 2: exit\n" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psx05/task3.c:1.7 rtems/testsuites/psxtests/psx05/task3.c:1.8
--- rtems/testsuites/psxtests/psx05/task3.c:1.7 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx05/task3.c Thu Oct 21 16:22:24 2010
@@ -31,14 +31,14 @@
printf( "Task 3: pthread_mutex_lock unavailable (inherit case)\n" );
status = pthread_mutex_lock( &Mutex2_id );
printf( "Task 3: mutex acquired\n" );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task 3: unlock Mutex 2\n" );
status = pthread_mutex_unlock( &Mutex2_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_getschedparam( pthread_self(), &policy, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Task 3: pthread_getschedparam priority = %d\n", param.sched_priority );
printf( "Task 3: exit\n" );
diff -u rtems/testsuites/psxtests/psx06/init.c:1.17 rtems/testsuites/psxtests/psx06/init.c:1.18
--- rtems/testsuites/psxtests/psx06/init.c:1.17 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/init.c Thu Oct 21 16:22:24 2010
@@ -52,10 +52,10 @@
/* create a couple of threads */
status = pthread_create( &Task_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a key */
@@ -66,31 +66,31 @@
status = pthread_key_create( &Key_id, Key_destructor );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Destructor invoked %d times\n", Destructor_invoked );
puts( "Init: pthread_key_create - EAGAIN (too many keys)" );
status = pthread_key_create( &Key_id, Key_destructor );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
puts( "Init: pthread_setspecific - EINVAL (invalid key)" );
status = pthread_setspecific( (pthread_t) -1, &Data_array[ 0 ] );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_getspecific - EINVAL (invalid key)" );
key_data = pthread_getspecific( (pthread_t) -1 );
- rtems_test_assert( !key_data );
+ rtems_test_assert( !key_data );
puts( "Init: pthread_key_delete - EINVAL (invalid key)" );
status = pthread_key_delete( (pthread_t) -1 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
printf( "Init: Setting the key to %d\n", 0 );
status = pthread_setspecific( Key_id, &Data_array[ 0 ] );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task 1 */
@@ -101,7 +101,7 @@
remaining = sleep( 3 );
if ( remaining )
printf( "seconds remaining = %d\n", remaining );
- rtems_test_assert( !remaining );
+ rtems_test_assert( !remaining );
/* switch to task 1 */
@@ -111,7 +111,7 @@
status = pthread_key_delete( Key_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Destructor invoked %d times\n", Destructor_invoked );
diff -u rtems/testsuites/psxtests/psx06/task.c:1.12 rtems/testsuites/psxtests/psx06/task.c:1.13
--- rtems/testsuites/psxtests/psx06/task.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/task.c Thu Oct 21 16:22:24 2010
@@ -32,14 +32,14 @@
status = pthread_setspecific( Key_id, &Data_array[ 1 ] );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
key_data = pthread_getspecific( Key_id );
printf( "Task_1: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: exitting" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psx06/task2.c:1.12 rtems/testsuites/psxtests/psx06/task2.c:1.13
--- rtems/testsuites/psxtests/psx06/task2.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx06/task2.c Thu Oct 21 16:22:24 2010
@@ -33,14 +33,14 @@
status = pthread_setspecific( Key_id, &Data_array[ 2 ] );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
key_data = pthread_getspecific( Key_id );
printf( "Task_2: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task2: exitting" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psx07/init.c:1.35 rtems/testsuites/psxtests/psx07/init.c:1.36
--- rtems/testsuites/psxtests/psx07/init.c:1.35 Fri Oct 8 04:39:35 2010
+++ rtems/testsuites/psxtests/psx07/init.c Thu Oct 21 16:22:24 2010
@@ -685,7 +685,7 @@
posix_service_failed( status, "pthread_attr_setschedparam");
status = pthread_create( &Task2_id, &attr, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_join( Task2_id, NULL );
posix_service_failed( status, " pthread_join");
diff -u rtems/testsuites/psxtests/psx08/init.c:1.12 rtems/testsuites/psxtests/psx08/init.c:1.13
--- rtems/testsuites/psxtests/psx08/init.c:1.12 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/init.c Thu Oct 21 16:22:24 2010
@@ -33,22 +33,22 @@
puts( "Init: pthread_detach - ESRCH (invalid id)" );
status = pthread_detach( (pthread_t) -1 );
- rtems_test_assert( status == ESRCH );
+ rtems_test_assert( status == ESRCH );
/* detach this thread */
puts( "Init: pthread_detach self" );
status = pthread_detach( pthread_self() );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create thread */
status = pthread_create( &Task1_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_join - ESRCH (invalid id)" );
status = pthread_join( (pthread_t) -1, &return_pointer );
- rtems_test_assert( status == ESRCH );
+ rtems_test_assert( status == ESRCH );
puts( "Init: pthread_join - SUCCESSFUL" );
status = pthread_join( Task1_id, &return_pointer );
@@ -56,7 +56,7 @@
puts( "Init: returned from pthread_join through return" );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( return_pointer == &Task1_id )
puts( "Init: pthread_join returned correct pointer" );
@@ -69,10 +69,10 @@
puts( "Init: creating two pthreads" );
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_join - SUCCESSFUL" );
status = pthread_join( Task2_id, &return_pointer );
@@ -81,7 +81,7 @@
puts( "Init: returned from pthread_join through pthread_exit" );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( return_pointer == &Task2_id )
puts( "Init: pthread_join returned correct pointer" );
diff -u rtems/testsuites/psxtests/psx08/task2.c:1.9 rtems/testsuites/psxtests/psx08/task2.c:1.10
--- rtems/testsuites/psxtests/psx08/task2.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/task2.c Thu Oct 21 16:22:24 2010
@@ -37,13 +37,13 @@
status = pthread_join( Init_id, NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Task_2: join to self task (Init) -- EDEADLK" );
status = pthread_join( pthread_self(), NULL );
if ( status != EDEADLK )
printf( "status = %d\n", status );
- rtems_test_assert( status == EDEADLK );
+ rtems_test_assert( status == EDEADLK );
puts( "Task_2: exitting" );
diff -u rtems/testsuites/psxtests/psx08/task3.c:1.6 rtems/testsuites/psxtests/psx08/task3.c:1.7
--- rtems/testsuites/psxtests/psx08/task3.c:1.6 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx08/task3.c Thu Oct 21 16:22:24 2010
@@ -33,7 +33,7 @@
puts( "Task_3: returned from pthread_join" );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( return_pointer == &Task2_id )
puts( "Task_3: pthread_join returned correct pointer" );
diff -u rtems/testsuites/psxtests/psx09/init.c:1.17 rtems/testsuites/psxtests/psx09/init.c:1.18
--- rtems/testsuites/psxtests/psx09/init.c:1.17 Sat Apr 3 01:07:24 2010
+++ rtems/testsuites/psxtests/psx09/init.c Thu Oct 21 16:22:24 2010
@@ -73,7 +73,7 @@
puts( "Init: pthread_getschedparam - SUCCESSFUL" );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - current priority = %d", priority );
@@ -89,10 +89,10 @@
puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
@@ -102,7 +102,7 @@
for ( passes=0 ; passes <= 3 ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( priority != schedparam.sched_priority ) {
priority = schedparam.sched_priority;
@@ -117,7 +117,7 @@
empty_line();
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
schedparam.sched_ss_repl_period.tv_sec = 0;
schedparam.sched_ss_repl_period.tv_nsec = 500000000; /* 1/2 second */
@@ -133,23 +133,23 @@
puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Initializing mutex attributes for priority ceiling" );
status = pthread_mutexattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Creating a mutex" );
status = pthread_mutex_init( &Mutex_id, &attr );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
@@ -163,11 +163,11 @@
status = pthread_mutex_lock( &Mutex_id );
if ( status )
printf( "status = %d %s\n", status, strerror(status) );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
for ( ; ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( schedparam.sched_priority == LOW_PRIORITY ) {
puts( "ERROR - Init's priority lowered while holding mutex" );
@@ -183,7 +183,7 @@
print_current_time( "Init: ", buffer );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
@@ -198,10 +198,10 @@
status = pthread_mutex_unlock( &Mutex_id );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
@@ -209,14 +209,14 @@
for ( ; ; ) {
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
if ( schedparam.sched_priority == LOW_PRIORITY )
break;
}
status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
priority = schedparam.sched_priority;
sprintf( buffer, " - new priority = %d", priority );
diff -u rtems/testsuites/psxtests/psx10/init.c:1.20 rtems/testsuites/psxtests/psx10/init.c:1.21
--- rtems/testsuites/psxtests/psx10/init.c:1.20 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/init.c Thu Oct 21 16:22:24 2010
@@ -29,61 +29,61 @@
puts( "Init: pthread_condattr_init" );
status = pthread_condattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_condattr_init - EINVAL (attribute invalid)" );
status = pthread_condattr_init( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_condattr_destroy" );
status = pthread_condattr_destroy( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_condattr_destroy - EINVAL (attribute invalid)" );
status = pthread_condattr_destroy( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_condattr_init" );
status = pthread_condattr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE" );
status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_condattr_setpshared - EINVAL (attribute invalid)" );
status = pthread_condattr_setpshared( &attr, 0x7FFF );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_condattr_setpshared - EINVAL (pshared invalid)" );
status = pthread_condattr_getpshared( &attr, &pshared );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
status = pthread_condattr_getpshared( NULL, &pshared );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_condattr_getpshared - EINVAL (attribute invalid)" );
puts( "Init: pthread_cond_init - NULL attr" );
status = pthread_cond_init( &cond, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* error for attribute not initialized */
@@ -91,39 +91,39 @@
status = pthread_cond_init( &cond, &attr_error );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
status = pthread_cond_init( &cond, NULL );
if ( status != ENOMEM )
printf( "status = %d\n", status );
- rtems_test_assert( status == ENOMEM );
+ rtems_test_assert( status == ENOMEM );
puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
puts( "Init: pthread_cond_destroy" );
status = pthread_cond_destroy( &cond );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* error for bad condition variable passed */
status = pthread_cond_destroy( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" );
/* initiailize the attribute for the rest of the test */
puts( "Init: pthread_cond_init - attr" );
status = pthread_cond_init( &Cond1_id, &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* signal task1 with a condition variable */
empty_line();
status = pthread_create( &Task_id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task1 to allow it to wait for a condition variable */
@@ -133,17 +133,17 @@
status = pthread_cond_destroy( &Cond1_id );
if ( status != EBUSY )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
puts( "Init: pthread_cond_destroy - EBUSY (task1 waiting)" );
puts( "Init: pthread_cond_signal" );
status = pthread_cond_signal( &Cond1_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
empty_line();
status = pthread_create( &Task2_id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task1 and task2 to allow them to wait for broadcast signal */
@@ -154,7 +154,7 @@
puts( "Init: pthread_cond_broadcast" );
status = pthread_cond_broadcast( &Cond1_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: sleep - switch to Task_1" );
sleep( 0 );
@@ -162,12 +162,12 @@
/* timedwait case - timeout */
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* set timeout to 3 seconds */
status = clock_gettime( CLOCK_REALTIME, &timeout );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
@@ -175,11 +175,11 @@
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
puts( "Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* remaining error messages */
@@ -190,78 +190,78 @@
status = pthread_cond_signal( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_signal - EINVAL (cond invalid)" );
status = pthread_cond_broadcast( NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_broadcast - EINVAL (cond invalid)" );
/* acquire mutex so errors will occur */
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_cond_wait( NULL, &Mutex_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_wait - EINVAL (cond invalid)" );
status = pthread_cond_timedwait( NULL, &Mutex_id, &timeout );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_timedwait - EINVAL (cond invalid)" );
status = pthread_cond_wait( &Cond1_id, NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_wait - EINVAL (mutex invalid)" );
status = pthread_cond_timedwait( &Cond1_id, NULL, &timeout );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_timedwait - EINVAL (mutex invalid)" );
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, NULL );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_timedwait - EINVAL (abstime NULL)" );
status = clock_gettime( CLOCK_REALTIME, &timeout );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
timeout.tv_sec -= 1;
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* ensure we do not catch a 0 nanosecond boundary */
do {
status = clock_gettime( CLOCK_REALTIME, &timeout );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
timeout.tv_nsec -= 1;
} while ( timeout.tv_nsec < 0);
status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* wait and timedwait without mutex */
@@ -270,26 +270,26 @@
* status = pthread_cond_wait( &Cond1_id, &Mutex_id );
* if ( status != EINVAL )
* printf( "status = %d\n", status );
- * rtems_test_assert( status == EINVAL );
+ * rtems_test_assert( status == EINVAL );
*/
puts( "Init: pthread_cond_wait - EINVAL (mutex not locked before call)" );
/* XXX - this case is commented out in the code pending review
*
* status = clock_gettime( CLOCK_REALTIME, &timeout );
- * rtems_test_assert( !status );
+ * rtems_test_assert( !status );
* timeout.tv_sec += 1;
* status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
* if ( status != EINVAL )
* printf( "status = %d\n", status );
- * rtems_test_assert( status == EINVAL );
+ * rtems_test_assert( status == EINVAL );
*/
puts( "Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)");
empty_line();
status = pthread_create( &Task3_id, NULL, Task_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* switch to task3 to allow it to wait for broadcast signal */
@@ -299,7 +299,7 @@
/* destroy the mutex so Task3 can not acguire at the end of Wait_support */
status = pthread_mutex_destroy( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* signal a condition variable to task3 */
diff -u rtems/testsuites/psxtests/psx10/task.c:1.9 rtems/testsuites/psxtests/psx10/task.c:1.10
--- rtems/testsuites/psxtests/psx10/task.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task.c Thu Oct 21 16:22:25 2010
@@ -31,31 +31,31 @@
printf( "Task_1: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_init( &Mutex_id, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* wait for a condition variable broadcast from Init */
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: task exit" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psx10/task2.c:1.9 rtems/testsuites/psxtests/psx10/task2.c:1.10
--- rtems/testsuites/psxtests/psx10/task2.c:1.9 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task2.c Thu Oct 21 16:22:25 2010
@@ -29,15 +29,15 @@
printf( "Task_2: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_2: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_2: back from pthread_cond_wait release mutex" );
status = pthread_mutex_unlock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_2: task exit" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psx10/task3.c:1.8 rtems/testsuites/psxtests/psx10/task3.c:1.9
--- rtems/testsuites/psxtests/psx10/task3.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx10/task3.c Thu Oct 21 16:22:25 2010
@@ -29,13 +29,13 @@
printf( "Task_3: ID is 0x%08" PRIxpthread_t "\n", Task_id );
status = pthread_mutex_lock( &Mutex_id );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_3: pthread_cond_wait" );
status = pthread_cond_wait( &Cond1_id, &Mutex_id );
if ( status != EINVAL )
printf( "status = %d\n", status );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)");
puts( "Task_3: task exit" );
diff -u rtems/testsuites/psxtests/psx11/init.c:1.13 rtems/testsuites/psxtests/psx11/init.c:1.14
--- rtems/testsuites/psxtests/psx11/init.c:1.13 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx11/init.c Thu Oct 21 16:22:25 2010
@@ -52,7 +52,7 @@
priority_1
);
status = pthread_setschedparam( Init_id, SCHED_FIFO, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
param.sched_priority = priority_2;
@@ -61,7 +61,7 @@
priority_2
);
status = pthread_setschedparam( Init_id, SCHED_RR, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
param.sched_priority = priority_3;
@@ -70,59 +70,59 @@
priority_3
);
status = pthread_setschedparam( Init_id, SCHED_OTHER, ¶m );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread as SCHED_FIFO */
printf(
"Init: create a thread of SCHED_FIFO with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
attr.schedpolicy = SCHED_FIFO;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread as SCHED_RR */
printf( "Init: create a thread of SCHED_RR with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
attr.schedpolicy = SCHED_RR;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* create a thread as SCHED_OTHER */
printf(
"Init: create a thread of SCHED_OTHER with priority %d\n", priority_4 );
status = pthread_attr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
attr.schedpolicy = SCHED_OTHER;
attr.schedparam.sched_priority = priority_4;
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "*** END OF POSIX TEST 11 ***" );
rtems_test_exit( 0 );
diff -u rtems/testsuites/psxtests/psx11/task.c:1.10 rtems/testsuites/psxtests/psx11/task.c:1.11
--- rtems/testsuites/psxtests/psx11/task.c:1.10 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psx11/task.c Thu Oct 21 16:22:25 2010
@@ -50,10 +50,10 @@
struct timespec delay;
status = clock_gettime( CLOCK_REALTIME, &start );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sched_rr_get_interval( getpid(), &delay );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* double the rr interval for confidence */
@@ -69,7 +69,7 @@
for ( ; ; ) {
status = clock_gettime( CLOCK_REALTIME, ¤t );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
diff_timespec( &start, ¤t, &difference );
diff -u rtems/testsuites/psxtests/psx12/init.c:1.15 rtems/testsuites/psxtests/psx12/init.c:1.16
--- rtems/testsuites/psxtests/psx12/init.c:1.15 Sat Apr 3 01:07:24 2010
+++ rtems/testsuites/psxtests/psx12/init.c Thu Oct 21 16:22:25 2010
@@ -63,25 +63,25 @@
puts( "Init: pthread_attr_init - SUCCESSFUL" );
status = pthread_attr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
attr.schedpolicy = -1;
puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* replenish period < budget error */
puts( "Init: pthread_attr_init - SUCCESSFUL" );
status = pthread_attr_init( &attr );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: set scheduling parameter attributes for sporadic server" );
status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
schedparam.sched_ss_repl_period.tv_sec = 1;
schedparam.sched_ss_repl_period.tv_nsec = 0;
@@ -92,14 +92,14 @@
schedparam.sched_ss_low_priority = 100;
status = pthread_attr_setschedparam( &attr, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_create - EINVAL (replenish < budget)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* invalid sched_ss_low_priority error */
@@ -112,11 +112,11 @@
schedparam.sched_ss_low_priority = -1;
status = pthread_attr_setschedparam( &attr, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_create - EINVAL (invalid sched_ss_low_priority)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* create a thread as a sporadic server */
@@ -129,14 +129,14 @@
schedparam.sched_ss_low_priority = sched_get_priority_max( SCHED_FIFO ) - 6;
status = pthread_attr_setschedparam( &attr, &schedparam );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: pthread_create - SUCCESSFUL" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = pthread_join( Task_id, NULL );
- rtems_test_assert( status );
+ rtems_test_assert( status );
/* switch to Task_1 */
diff -u rtems/testsuites/psxtests/psxalarm01/init.c:1.4 rtems/testsuites/psxtests/psxalarm01/init.c:1.5
--- rtems/testsuites/psxtests/psxalarm01/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxalarm01/init.c Thu Oct 21 16:22:25 2010
@@ -70,7 +70,7 @@
/* install a signal handler for SIGALRM and unblock it */
sc = sigemptyset( &act.sa_mask );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
act.sa_handler = Signal_handler;
act.sa_flags = 0;
@@ -78,21 +78,21 @@
sigaction( SIGALRM, &act, NULL );
sc = sigemptyset( &mask );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = sigaddset( &mask, SIGALRM );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init: Unblock SIGALRM" );
sc = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* schedule the alarm */
puts( "Init: Firing alarm in 1 second" );
remaining = alarm( 1 );
printf( "Init: %d seconds left on previous alarm\n", sc );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init: Wait for alarm" );
sleep( 2 );
@@ -100,7 +100,7 @@
puts( "Init: Cancel alarm" );
remaining = alarm( 0 );
printf( "Init: %d seconds left on previous alarm\n", remaining );
- rtems_test_assert( remaining == 0 );
+ rtems_test_assert( remaining == 0 );
puts( "*** END OF POSIX ALARM TEST 01***" );
rtems_test_exit( 0 );
diff -u rtems/testsuites/psxtests/psxbarrier01/test.c:1.8 rtems/testsuites/psxtests/psxbarrier01/test.c:1.9
--- rtems/testsuites/psxtests/psxbarrier01/test.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxbarrier01/test.c Thu Oct 21 16:22:25 2010
@@ -33,7 +33,7 @@
printf( "pthread_barrier_wait( &Barrier ) for thread 0x%08" PRIxpthread_t "\n", id );
status = pthread_barrier_wait( &Barrier );
printf( "pthread_barrier_wait - 0x%08" PRIxpthread_t " released\n", id );
- rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
+ rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
return NULL;
}
@@ -65,155 +65,155 @@
/*************** NULL POINTER CHECKS *****************/
puts( "pthread_barrierattr_init( NULL ) -- EINVAL" );
status = pthread_barrierattr_init( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_setpshared( NULL, private ) -- EINVAL" );
status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_setpshared( NULL, shared ) -- EINVAL" );
status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_getpshared( NULL, &p ) -- EINVAL" );
status = pthread_barrierattr_getpshared( NULL, &p );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_destroy( NULL ) -- EINVAL" );
status = pthread_barrierattr_destroy( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** NOT INITIALIZED CHECKS *****************/
/* cheat visibility */
attr.is_initialized = 0;
puts( "pthread_barrierattr_setpshared( &attr, shared ) -- EINVAL" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_getpshared( &attr, NULL ) -- EINVAL" );
status = pthread_barrierattr_getpshared( &attr, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrierattr_destroy( &attr ) -- EINVAL" );
status = pthread_barrierattr_destroy( &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** ACTUALLY WORK THIS TIME *****************/
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrierattr_setpshared( &attr, private ) -- OK" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
status = pthread_barrierattr_getpshared( &attr, &p );
- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
puts( "pthread_barrierattr_setpshared( &attr, shared ) -- OK" );
status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
status = pthread_barrierattr_getpshared( &attr, &p );
- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
/*************** BAD PSHARED CHECK *****************/
puts( "pthread_barrierattr_setpshared( &attr, private ) -- EINVAL" );
status = pthread_barrierattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** DESTROY/REUSE CHECK *****************/
puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
status = pthread_barrierattr_destroy( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrierattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
status = pthread_barrierattr_getpshared( &attr, &p );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** pthread_barrier_init ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_init( NULL, NULL, 2 ) -- EINVAL" );
status = pthread_barrier_init( NULL, NULL, 2 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* uninitialized attr argument */
puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- EINVAL" );
status = pthread_barrier_init( &barrier, &attr, 2 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* zero count argument */
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrier_init( &barrier, &attr, 0 ) -- EINVAL" );
status = pthread_barrier_init( &barrier, &attr, 0 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* allocating too many */
puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- OK" );
status = pthread_barrier_init( &barrier, NULL, 1 );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- EAGAIN" );
status = pthread_barrier_init( &barrier, NULL, 1 );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
/* clean up */
puts( "pthread_barrier_destroy( &barrier ) -- OK" );
status = pthread_barrier_destroy( &barrier );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
status = pthread_barrierattr_destroy( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** pthread_barrier_destroy ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_destroy( NULL ) -- EINVAL" );
status = pthread_barrier_destroy( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrier_destroy( &bad_barrier ) -- EINVAL" );
status = pthread_barrier_destroy( &bad_barrier );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** pthread_barrier_wait ERROR CHECKs *********/
/* NULL barrier argument */
puts( "pthread_barrier_wait( NULL ) -- EINVAL" );
status = pthread_barrier_wait( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_barrier_wait( &bad_barrier ) -- EINVAL" );
status = pthread_barrier_wait( &bad_barrier );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** ACTUALLY CREATE ONE CHECK *****************/
puts( "pthread_barrierattr_init( &attr ) -- OK" );
status = pthread_barrierattr_init( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- OK" );
status = pthread_barrier_init( &barrier, &attr, 2 );
- rtems_test_assert( status == 0 );
- rtems_test_assert( barrier != 0 );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( barrier != 0 );
puts( "pthread_barrier_destroy( &barrier ) -- OK" );
status = pthread_barrier_destroy( &barrier );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** CREATE THREADS AND LET THEM RELEASE *****************/
puts( "pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS ) -- OK" );
status = pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS );
- rtems_test_assert( status == 0 );
- rtems_test_assert( barrier != 0 );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( barrier != 0 );
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
@@ -221,13 +221,13 @@
if (i == NUMBER_THREADS - 1) {
puts( "pthread_barrier_destroy( &Barrier ) -- EBUSY" );
status = pthread_barrier_destroy( &Barrier );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
}
/* create a thread to block on the barrier */
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, BarrierThread, &ThreadIds[i]);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(1);
}
diff -u rtems/testsuites/psxtests/psxcancel01/init.c:1.4 rtems/testsuites/psxtests/psxcancel01/init.c:1.5
--- rtems/testsuites/psxtests/psxcancel01/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxcancel01/init.c Thu Oct 21 16:22:25 2010
@@ -63,7 +63,7 @@
TSR_status = 0;
status = rtems_timer_fire_after( timer_id, 10, TSR, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
start = rtems_clock_get_ticks_since_boot();
do {
@@ -94,7 +94,7 @@
rtems_build_name( 'T', 'M', '1', ' ' ),
&timer_id
);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
doit( Cancel_duringISR_TSR, "pthread_cancel" );
doit( SetState_duringISR_TSR, "pthread_setcancelstate" );
diff -u rtems/testsuites/psxtests/psxchroot01/test.c:1.10 rtems/testsuites/psxtests/psxchroot01/test.c:1.11
--- rtems/testsuites/psxtests/psxchroot01/test.c:1.10 Mon Aug 9 09:29:33 2010
+++ rtems/testsuites/psxtests/psxchroot01/test.c Thu Oct 21 16:22:25 2010
@@ -40,10 +40,10 @@
{
int fd;
- rtems_test_assert( file );
+ rtems_test_assert( file );
fd = open( file, O_RDWR|O_CREAT, 0777 );
- rtems_test_assert( fd != -1 );
+ rtems_test_assert( fd != -1 );
close( fd );
}
@@ -52,7 +52,7 @@
int status;
struct stat statbuf;
- rtems_test_assert( file );
+ rtems_test_assert( file );
status = stat( file, &statbuf );
@@ -93,13 +93,13 @@
printf( "\n\n*** CHROOT01 TEST ***\n" );
status = mkdir( "/one", 0777);
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = mkdir( "/one/one", 0777);
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = mkdir( "/one/two", 0777);
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
touch( "/one/one.test" );
touch( "/one/two/two.test" );
diff -u rtems/testsuites/psxtests/psxitimer/init.c:1.2 rtems/testsuites/psxtests/psxitimer/init.c:1.3
--- rtems/testsuites/psxtests/psxitimer/init.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxitimer/init.c Thu Oct 21 16:22:25 2010
@@ -26,48 +26,48 @@
/* test getitimer stub */
puts( "getitimer -- bad which - EINVAL " );
status = getitimer( 1234, &itimer );
- rtems_test_assert( status == -1 && errno == EINVAL );
+ rtems_test_assert( status == -1 && errno == EINVAL );
puts( "getitimer -- NULL pointer - EFAULT " );
status = getitimer( ITIMER_REAL, NULL );
- rtems_test_assert( status == -1 && errno == EFAULT );
+ rtems_test_assert( status == -1 && errno == EFAULT );
puts( "getitimer -- ITIMER_REAL - ENOSYS " );
status = getitimer( ITIMER_REAL, &itimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
puts( "getitimer -- ITIMER_VIRTUAL - ENOSYS " );
status = getitimer( ITIMER_VIRTUAL, &itimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
puts( "getitimer -- ITIMER_PROF - ENOSYS " );
status = getitimer( ITIMER_PROF, &itimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
/* test setitimer stub */
puts( "setitimer -- bad which - EINVAL " );
status = setitimer( 1234, &itimer, &otimer );
- rtems_test_assert( status == -1 && errno == EINVAL );
+ rtems_test_assert( status == -1 && errno == EINVAL );
puts( "setitimer -- NULL value pointer - EFAULT " );
status = setitimer( ITIMER_REAL, NULL, &otimer );
- rtems_test_assert( status == -1 && errno == EFAULT );
+ rtems_test_assert( status == -1 && errno == EFAULT );
puts( "setitimer -- NULL value pointer - EFAULT " );
status = setitimer( ITIMER_REAL, &itimer, NULL );
- rtems_test_assert( status == -1 && errno == EFAULT );
+ rtems_test_assert( status == -1 && errno == EFAULT );
puts( "setitimer -- ITIMER_REAL - ENOSYS " );
status = setitimer( ITIMER_REAL, &itimer, &otimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
puts( "setitimer -- ITIMER_VIRTUAL - ENOSYS " );
status = setitimer( ITIMER_VIRTUAL, &itimer, &otimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
puts( "setitimer -- ITIMER_PROF - ENOSYS " );
status = setitimer( ITIMER_PROF, &itimer, &otimer );
- rtems_test_assert( status == -1 && errno == ENOSYS );
+ rtems_test_assert( status == -1 && errno == ENOSYS );
puts( "*** END OF POSIX TEST ITIMER ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxkey01/task.c:1.4 rtems/testsuites/psxtests/psxkey01/task.c:1.5
--- rtems/testsuites/psxtests/psxkey01/task.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey01/task.c Thu Oct 21 16:22:25 2010
@@ -34,14 +34,14 @@
status = pthread_setspecific( Key_id[0], (void *)&Data_array[ 1 ] );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
key_data = pthread_getspecific( Key_id[0] );
printf( "Task_1: Got the key value of %ld\n",
(unsigned long) ((uint32_t *)key_data - Data_array) );
if ( status )
printf( "status = %d\n", status );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Task_1: exitting" );
pthread_exit( NULL );
diff -u rtems/testsuites/psxtests/psxkey02/init.c:1.3 rtems/testsuites/psxtests/psxkey02/init.c:1.4
--- rtems/testsuites/psxtests/psxkey02/init.c:1.3 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey02/init.c Thu Oct 21 16:22:25 2010
@@ -30,13 +30,13 @@
puts( "Init - rtems_workspace_get_information - OK" );
sb = rtems_workspace_get_information( &start );
- rtems_test_assert( sb );
+ rtems_test_assert( sb );
#if 0
printf( "Init - workspace free = %d\n", start.Free.largest );
printf( "Init - workspace free blocks = %d\n", start.Free.number );
#endif
- rtems_test_assert( start.Free.number == 1 );
+ rtems_test_assert( start.Free.number == 1 );
to_alloc = start.Free.largest;
/* find the largest we can actually allocate */
@@ -57,15 +57,15 @@
* Verify heap is still in same shape if we couldn't allocate a task
*/
sb = rtems_workspace_get_information( &info );
- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
puts( "Init - pthread_key_create - ENOMEM" );
while (1) {
sb = rtems_workspace_allocate( to_alloc, &alloced );
- rtems_test_assert( sb );
+ rtems_test_assert( sb );
sc = pthread_key_create( &key, NULL );
@@ -88,9 +88,9 @@
printf( "Init - workspace free/blocks = %d/%d\n",
info.Free.largest, info.Free.number );
#endif
- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
to_alloc -= 8;
if ( to_alloc == 0 )
@@ -105,7 +105,7 @@
*/
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( key );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
puts( "Init - verify workspace has same memory" );
sb = rtems_workspace_get_information( &info );
@@ -113,9 +113,9 @@
printf( "Init - workspace free/blocks = %d/%d\n",
info.Free.largest, info.Free.number );
#endif
- rtems_test_assert( sb );
- rtems_test_assert( info.Free.largest == start.Free.largest );
- rtems_test_assert( info.Free.number == start.Free.number );
+ rtems_test_assert( sb );
+ rtems_test_assert( info.Free.largest == start.Free.largest );
+ rtems_test_assert( info.Free.number == start.Free.number );
puts( "*** END OF TEST KEY 02 ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxkey03/init.c:1.5 rtems/testsuites/psxtests/psxkey03/init.c:1.6
--- rtems/testsuites/psxtests/psxkey03/init.c:1.5 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxkey03/init.c Thu Oct 21 16:22:25 2010
@@ -30,7 +30,7 @@
puts( "Test_Thread - pthread_setspecific - OK" );
sc = pthread_setspecific( Key, key_value );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Test_Thread - pthread_exit to run key destructors - OK" );
return NULL;
@@ -51,21 +51,21 @@
*/
puts( "Init - pthread_key_create with NULL destructor - OK" );
sc = pthread_key_create( &Key, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - pthread_create - OK" );
sc = pthread_create( &thread, NULL, Test_Thread, &sc );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - sleep - let thread run - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( Key );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
/*
* Key with non-NULL destructor
@@ -73,22 +73,22 @@
destructor_ran = false;
puts( "Init - pthread_key_create with non-NULL destructor - OK" );
sc = pthread_key_create( &Key, destructor );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - pthread_create - OK" );
sc = pthread_create( &thread, NULL, Test_Thread, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - sleep - let thread run - OK" );
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - verify destructor did NOT ran" );
- rtems_test_assert( destructor_ran == false );
+ rtems_test_assert( destructor_ran == false );
puts( "Init - pthread_key_delete - OK" );
sc = pthread_key_delete( Key );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
puts( "*** END OF TEST KEY 03 ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxmount/test.c:1.15 rtems/testsuites/psxtests/psxmount/test.c:1.16
--- rtems/testsuites/psxtests/psxmount/test.c:1.15 Tue Jun 1 19:50:37 2010
+++ rtems/testsuites/psxtests/psxmount/test.c Thu Oct 21 16:22:25 2010
@@ -130,23 +130,23 @@
printf("create /b/my_file\n");
fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- rtems_test_assert( fd != 0 );
+ rtems_test_assert( fd != 0 );
close (fd);
printf("Verify /b/my_file\n");
fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO);
- rtems_test_assert( fd != 0 );
+ rtems_test_assert( fd != 0 );
close( fd );
printf("create c/y/my_mount_point/my_dir/d\n");
fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- rtems_test_assert( fd != 0 );
+ rtems_test_assert( fd != 0 );
close (fd);
printf("Verify c/y/my_mount_point/my_dir/d\n");
fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO);
- rtems_test_assert( fd != 0 );
+ rtems_test_assert( fd != 0 );
close( fd );
/*
@@ -160,7 +160,7 @@
"imfs",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("2nd file system successfully mounted at /c/z/my_mount_point \n");
/*
@@ -216,8 +216,8 @@
"nofound",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
/*
* Verify mount with option of -62 fails with EINVAL
@@ -230,8 +230,8 @@
"imfs",
-62,
NULL );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EINVAL );
/*
* Mount a Read Only File system.
@@ -244,7 +244,7 @@
"imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("Read only file system successfully mounted at /c/y/my_mount_point \n");
/*
@@ -253,11 +253,11 @@
printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n");
status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = stat("c/y/my_mount_point/new_dir/..", &statbuf );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*
* Attempt to mount a second file system at a used mount point.
@@ -270,8 +270,8 @@
"imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY);
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY);
/*
* Attempt to mount at a file.
@@ -284,8 +284,8 @@
"imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == ENOTDIR );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOTDIR );
/*
@@ -294,15 +294,15 @@
printf("Create and chdir to /c/y/my_mount_point/mydir\n");
status = mkdir( "/c/y/my_mount_point/mydir", 0777);
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = chdir( "/c/y/my_mount_point/mydir" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
/*
* Chdir to root and verify we can unmount the file system now.
@@ -310,11 +310,11 @@
printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
status = chdir( "/" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("unmount /c/y/my_mount_point \n");
status = unmount( "/c/y/my_mount_point" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*
* Attempt to unmount a directory that does not exist.
@@ -322,8 +322,8 @@
printf("unmount /b/mount_point should fail with EINVAL\n");
status = unmount( "/b/mount_point" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == ENOENT );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == ENOENT );
/*
* Remount the filesystem.
@@ -336,7 +336,7 @@
"imfs",
RTEMS_FILESYSTEM_READ_ONLY,
NULL );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*
* Create a file and directory then open the directory.
@@ -345,24 +345,24 @@
printf("Create and open /c/y/my_mount_point/my_file\n");
fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
- rtems_test_assert( fd != -1 );
+ rtems_test_assert( fd != -1 );
status = close( fd );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("\nmkdir /c/y/my_mount_point/my_dir\n");
status = mkdir( "/c/y/my_mount_point/my_dir", 0x1c0 );
printf("Open /c/y/my_mount_point/my_dir\n");
directory = opendir( "/c/y/my_mount_point/my_dir" );
- rtems_test_assert( directory );
+ rtems_test_assert( directory );
printf("Unmount /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
printf("Close /c/y/my_mount_point/my_dir\n");
status = closedir( directory );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*
* Attempt to unmount a directory that is not a mount point.
@@ -370,8 +370,8 @@
printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n");
status = unmount( "/c/y/my_mount_point/my_dir" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EACCES );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EACCES );
/*
* Verify a file system can not be unmounted with a mounted file system
@@ -385,12 +385,12 @@
"imfs",
RTEMS_FILESYSTEM_READ_WRITE,
NULL );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("unmount /c/y/my_mount_point should fail with EBUSY\n");
status = unmount( "/c/y/my_mount_point" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EBUSY );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EBUSY );
/*
* Verify you cannot create a hard link across mounted file systems.
@@ -398,11 +398,11 @@
printf("Verify a hard link across filesystems fails with EXDEV\n");
status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
- rtems_test_assert( status == -1 );
- rtems_test_assert( errno == EXDEV );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EXDEV );
/*
* Create a symbolic link across mountpoints.
@@ -410,13 +410,13 @@
printf("Verify a symbolic link across file systems works\n");
status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf("unmount /c/y/my_mount_point/my_dir\n");
status = unmount( "/c/y/my_mount_point/my_dir" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*
* Verify symblic link no longer works.
@@ -424,11 +424,11 @@
printf("Verify the symbolic link now fails\n");
status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
- rtems_test_assert( status != 0 );
+ rtems_test_assert( status != 0 );
printf("unmount /c/y/my_mount_point\n");
status = unmount( "/c/y/my_mount_point" );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxmsgq01/init.c:1.23 rtems/testsuites/psxtests/psxmsgq01/init.c:1.24
--- rtems/testsuites/psxtests/psxmsgq01/init.c:1.23 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq01/init.c Thu Oct 21 16:22:25 2010
@@ -130,7 +130,7 @@
else
Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr );
- rtems_test_assert( Test_q[que].mq != (-1) );
+ rtems_test_assert( Test_q[que].mq != (-1) );
}
status = mq_close( Test_q[NUMBER_OF_TEST_QUEUES].mq );
@@ -223,7 +223,7 @@
puts( "Init: mq_open - Create an Existing mq (EEXIST)" );
open_mq[0] = mq_open(
Build_Queue_Name(0), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL );
- rtems_test_assert( open_mq[0] != (-1) );
+ rtems_test_assert( open_mq[0] != (-1) );
n_mq2 = mq_open(
Build_Queue_Name(0), O_CREAT | O_EXCL | O_RDONLY, 0x777, NULL);
@@ -245,8 +245,8 @@
for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; i++) {
open_mq[i] = mq_open(
Build_Queue_Name(i), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL );
- rtems_test_assert( open_mq[i] != (-1) );
- rtems_test_assert( open_mq[i] );
+ rtems_test_assert( open_mq[i] != (-1) );
+ rtems_test_assert( open_mq[i] );
/*XXX - Isn't there a more general check */
/* JRS printf( "mq_open 0x%x %s\n", open_mq[i], Build_Queue_Name(i) ); */
}
@@ -494,7 +494,7 @@
sprintf( err_msg, "%s msg %s size failure", Test_q[ que ].name, ptr->msg );
fatal_int_service_status( status, ptr->size, err_msg );
- rtems_test_assert( !strcmp( message, ptr->msg ) );
+ rtems_test_assert( !strcmp( message, ptr->msg ) );
strcpy( message, "No Message" );
sprintf( err_msg,"%s msg %s size failure", Test_q[ que ].name, ptr->msg );
@@ -683,7 +683,7 @@
puts( "Init: mq_open - Open an existing mq ( same id )" );
n_mq = mq_open( RD_NAME, 0 );
fatal_posix_service_status(
- rtems_test_assert( n_mq == Test_q[RD_QUEUE].mq );
+ rtems_test_assert( n_mq == Test_q[RD_QUEUE].mq );
#endif
}
@@ -704,8 +704,8 @@
fatal_posix_service_status( status, 0, "mq_unlink locked message queue");
n_mq = mq_open( DEFAULT_NAME, DEFAULT_ATTR, 0x777, NULL );
- rtems_test_assert( n_mq != (-1) );
- rtems_test_assert( n_mq != Test_q[ DEFAULT_RW ].mq );
+ rtems_test_assert( n_mq != (-1) );
+ rtems_test_assert( n_mq != Test_q[ DEFAULT_RW ].mq );
status = mq_unlink( DEFAULT_NAME );
@@ -888,10 +888,10 @@
timeout.tv_nsec = 0;
status = sigemptyset( waitset );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( waitset, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
printf( "waiting on any signal for %d seconds.\n", sec );
signo = sigtimedwait( waitset, &siginfo, &timeout );
@@ -1007,7 +1007,7 @@
Start_Test( "multi-thread Task 4 Receive Test" );
status = pthread_create( &id, NULL, Task_4, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: mq_receive - Empty queue changes to non-blocking (EAGAIN)" );
status = mq_receive( Test_q[BLOCKING].mq, message, 100, &priority );
fatal_int_service_status( status, -1, "mq_receive error return status");
@@ -1022,7 +1022,7 @@
Start_Test( "multi-thread Task 1 Test" );
status = pthread_create( &id, NULL, Task_1, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Read_msg_from_que( BLOCKING, 0 ); /* Block until init writes */
print_current_time( "Init: ", "" );
@@ -1036,7 +1036,7 @@
Start_Test( "multi-thread Task 4 Send Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_4, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: mq_send - Full queue changes to non-blocking (EAGAIN)" );
status = mq_send(Test_q[BLOCKING].mq, message, 0, 0 );
fatal_posix_service_status( status, -1, "mq_send error return status");
@@ -1051,7 +1051,7 @@
Start_Test( "multi-thread Task 2 Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_2, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
Show_send_msg_to_que( "Init:", BLOCKING, Priority_Order[0] );
print_current_time( "Init: ", "" );
verify_queues_full( "Init:" );
@@ -1065,7 +1065,7 @@
Start_Test( "multi-thread Task 3 Test" );
fill_message_queues( "Init:" );
status = pthread_create( &id, NULL, Task_3, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: mq_send - Block while thread deletes queue (EBADF)" );
ptr = &Predefined_Msgs[0];
status = mq_send( Test_q[BLOCKING].mq, ptr->msg, ptr->size , ptr->priority );
@@ -1271,7 +1271,7 @@
/* switch to Init */
- rtems_test_assert( 0 );
+ rtems_test_assert( 0 );
return NULL; /* just so the compiler thinks we returned something */
}
diff -u rtems/testsuites/psxtests/psxmsgq03/init.c:1.4 rtems/testsuites/psxtests/psxmsgq03/init.c:1.5
--- rtems/testsuites/psxtests/psxmsgq03/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq03/init.c Thu Oct 21 16:22:25 2010
@@ -55,14 +55,14 @@
if ( Queue == (-1) ) {
perror( "mq_open failed" );
}
- rtems_test_assert( Queue != (-1) );
+ rtems_test_assert( Queue != (-1) );
puts( "Init - send to message queue" );
status = mq_send( Queue, (const char *)&status, sizeof(int), 1 );
if ( status == (-1) ) {
perror( "mq_status failed" );
}
- rtems_test_assert( status != (-1) );
+ rtems_test_assert( status != (-1) );
/*
* Now create the timer we will send to a full queue from.
diff -u rtems/testsuites/psxtests/psxmsgq04/init.c:1.8 rtems/testsuites/psxtests/psxmsgq04/init.c:1.9
--- rtems/testsuites/psxtests/psxmsgq04/init.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxmsgq04/init.c Thu Oct 21 16:22:25 2010
@@ -43,29 +43,29 @@
Queue = mq_open( "Queue", O_CREAT | O_RDWR, 0x777, &attr );
if ( Queue == (-1) )
perror( "mq_open failed" );
- rtems_test_assert( Queue != (-1) );
+ rtems_test_assert( Queue != (-1) );
puts( "Init - Open message queue instance 2 - FAIL - ENFILE " );
second_Queue = mq_open( "Queue2", O_CREAT | O_RDWR, 0x777, &attr );
if ( second_Queue != (-1) )
puts( "mq_open did not failed" );
- rtems_test_assert( second_Queue == (-1) );
- rtems_test_assert( errno == ENFILE );
+ rtems_test_assert( second_Queue == (-1) );
+ rtems_test_assert( errno == ENFILE );
puts( "Init - Unlink message queue instance 1" );
sc = mq_unlink( "Queue" );
if ( sc != 0 )
perror( "mq_unlink failed" );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
puts( "Init - Close message queue instance 1" );
sc = mq_close( Queue );
if ( sc != 0 )
perror( "mq_close failed" );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
sb = rtems_workspace_get_information( &start );
- rtems_test_assert( start.Free.number == 1 );
+ rtems_test_assert( start.Free.number == 1 );
to_alloc = start.Free.largest;
/* find the largest we can actually allocate */
@@ -91,7 +91,7 @@
name = Get_Longest_Name();
while ( attr.mq_msgsize > 0 ) {
sb = rtems_workspace_allocate( to_alloc, &alloced );
- rtems_test_assert( sb );
+ rtems_test_assert( sb );
second_Queue = mq_open(name,O_CREAT | O_RDWR, 0x777, &attr );
@@ -114,13 +114,13 @@
sc = mq_unlink( name );
if ( sc != 0 )
perror( "mq_unlink failed" );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
puts( "Init - Close message queue" );
sc = mq_close( second_Queue );
if ( sc != 0 )
perror( "mq_close failed" );
- rtems_test_assert( sc == 0 );
+ rtems_test_assert( sc == 0 );
puts( "*** END OF POSIX MESSAGE QUEUE TEST 4 ***" );
rtems_test_exit( 0 );
diff -u rtems/testsuites/psxtests/psxrwlock01/test.c:1.13 rtems/testsuites/psxtests/psxrwlock01/test.c:1.14
--- rtems/testsuites/psxtests/psxrwlock01/test.c:1.13 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxrwlock01/test.c Thu Oct 21 16:22:25 2010
@@ -37,11 +37,11 @@
puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" );
status = pthread_rwlock_rdlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK" );
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
return NULL;
}
@@ -54,14 +54,14 @@
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" );
status = pthread_rwlock_wrlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
sleep( 1 );
puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
return NULL;
}
@@ -90,75 +90,75 @@
/*************** NULL POINTER CHECKS *****************/
puts( "pthread_rwlockattr_init( NULL ) -- EINVAL" );
status = pthread_rwlockattr_init( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_setpshared( NULL, private ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_setpshared( NULL, shared ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_getpshared( NULL, &p ) -- EINVAL" );
status = pthread_rwlockattr_getpshared( NULL, &p );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_destroy( NULL ) -- EINVAL" );
status = pthread_rwlockattr_destroy( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** NOT INITIALIZED CHECKS *****************/
/* cheat visibility */
attr.is_initialized = 0;
puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_getpshared( &attr, NULL ) -- EINVAL" );
status = pthread_rwlockattr_getpshared( &attr, NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlockattr_destroy( &attr ) -- EINVAL" );
status = pthread_rwlockattr_destroy( &attr );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** BAD PSHARED CHECK *****************/
puts( "pthread_rwlockattr_setpshared( &attr, private ) -- EINVAL" );
status = pthread_rwlockattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** ACTUALLY WORK THIS TIME *****************/
puts( "pthread_rwlockattr_init( &attr ) -- OK" );
status = pthread_rwlockattr_init( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlockattr_setpshared( &attr, private ) -- OK" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
status = pthread_rwlockattr_getpshared( &attr, &p );
- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- OK" );
status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
status = pthread_rwlockattr_getpshared( &attr, &p );
- rtems_test_assert( status == 0 );
- rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
/*************** DESTROY/REUSE CHECK *****************/
puts( "pthread_rwlockattr_destroy( &attr ) -- OK" );
status = pthread_rwlockattr_destroy( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlockattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
status = pthread_rwlockattr_getpshared( &attr, &p );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** NULL ARGUMENT CHECKS *****************/
abstime.tv_sec = 0;
@@ -166,87 +166,87 @@
puts( "pthread_rwlock_init(NULL, &attr) -- EINVAL" );
status = pthread_rwlock_init(NULL, &attr);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_destroy(NULL) -- EINVAL" );
status = pthread_rwlock_destroy(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_rdlock(NULL) -- EINVAL" );
status = pthread_rwlock_rdlock(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedrdlock( NULL, &abstime) -- EINVAL" );
status = pthread_rwlock_timedrdlock( NULL, &abstime);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
status = pthread_rwlock_timedrdlock( &rwlock, NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_tryrdlock(NULL) -- EINVAL" );
status = pthread_rwlock_tryrdlock(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_wrlock(NULL) -- EINVAL" );
status = pthread_rwlock_wrlock(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedwrlock( NULL, &abstime) -- EINVAL" );
status = pthread_rwlock_timedwrlock( NULL, &abstime );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
status = pthread_rwlock_timedwrlock( &rwlock, NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_trywrlock(NULL) -- EINVAL" );
status = pthread_rwlock_trywrlock(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_unlock(NULL) -- EINVAL" );
status = pthread_rwlock_unlock(NULL);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** BAD ID CHECK *****************/
rwlock = 1;
/* make a valid abstime */
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
status = clock_gettime( CLOCK_REALTIME, &abstime );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
abstime.tv_sec += 5;
puts( "pthread_rwlock_destroy(BadId) -- EINVAL" );
status = pthread_rwlock_destroy(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_rdlock(BadId) -- EINVAL" );
status = pthread_rwlock_rdlock(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedrdlock(BadId, &abstime) -- EINVAL" );
status = pthread_rwlock_timedrdlock( &rwlock, &abstime);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_tryrdlock(BadId) -- EINVAL" );
status = pthread_rwlock_tryrdlock(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_wrlock(BadId) -- EINVAL" );
status = pthread_rwlock_wrlock(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_timedwrlock(BadId, &abstime) -- EINVAL" );
status = pthread_rwlock_timedwrlock( &rwlock, &abstime );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_trywrlock(BadId) -- EINVAL" );
status = pthread_rwlock_trywrlock(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_rwlock_unlock(BadId) -- EINVAL" );
status = pthread_rwlock_unlock(&rwlock);
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/*************** BAD ABSTIME CHECK *****************/
@@ -263,66 +263,66 @@
/*************** ACTUALLY CREATE ONE CHECK *****************/
puts( "pthread_rwlockattr_init( &attr ) -- OK" );
status = pthread_rwlockattr_init( &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlock_init( &rwlock, &attr ) -- OK" );
status = pthread_rwlock_init( &rwlock, &attr );
- rtems_test_assert( status == 0 );
- rtems_test_assert( rwlock != 0 );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( rwlock != 0 );
puts( "pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN" );
status = pthread_rwlock_init( &rwlock, &attr );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
status = pthread_rwlock_destroy( &rwlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
status = pthread_rwlock_init( &rwlock, NULL );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
status = pthread_rwlock_destroy( &rwlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
status = pthread_rwlock_init( &RWLock, &attr );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlock_tryrdlock(RWLock) -- OK" );
status = pthread_rwlock_tryrdlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(1);
}
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(1);
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
status = pthread_rwlock_trywrlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
status = pthread_rwlock_tryrdlock(&RWLock);
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(1);
}
@@ -330,101 +330,101 @@
/* Attempt delete while threads are blocked */
puts( "pthread_rwlock_destroy( &RWLock ) -- EBUSY" );
status = pthread_rwlock_destroy( &RWLock );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
/* now unlock it so the threads can continue */
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(2);
/*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
status = pthread_rwlock_trywrlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
status = pthread_rwlock_trywrlock(&RWLock);
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
for (i=0 ; i<NUMBER_THREADS ; i++ ) {
printf( "Init: pthread_create - thread %d OK\n", i+1 );
status =
pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(1);
}
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
sleep(2);
/*************** TIMEOUT ON RWLOCK ***************/
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
status = clock_gettime( CLOCK_REALTIME, &abstime );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
abstime.tv_sec += 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
abstime.tv_sec += 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
- rtems_test_assert( status == ETIMEDOUT );
+ rtems_test_assert( status == ETIMEDOUT );
/*************** OBTAIN RWLOCK WITH ABSTIME IN PAST ***************/
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK" );
status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** OBTAIN RWLOCK FOR WRITE WITH ABSTIME IN PAST ***************/
status = pthread_rwlock_unlock(&RWLock);
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
abstime.tv_sec -= 1;
puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK" );
status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** DESTROY RWLOCK ***************/
puts( "pthread_rwlock_destroy( &RWLock ) -- OK" );
status = pthread_rwlock_destroy( &RWLock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** OBTAIN A LOCK AND THEN RELEASE IT TWICE ***************/
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
status = pthread_rwlock_init( &rwlock, NULL );
- rtems_test_assert( status == 0 );
- rtems_test_assert( rwlock != 0 );
+ rtems_test_assert( status == 0 );
+ rtems_test_assert( rwlock != 0 );
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
status = pthread_rwlock_unlock( &rwlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
status = pthread_rwlock_unlock( &rwlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** END OF TEST *****************/
puts( "*** END OF POSIX RWLOCK TEST 01 ***" );
diff -u rtems/testsuites/psxtests/psxsem01/init.c:1.18 rtems/testsuites/psxtests/psxsem01/init.c:1.19
--- rtems/testsuites/psxtests/psxsem01/init.c:1.18 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsem01/init.c Thu Oct 21 16:22:25 2010
@@ -178,7 +178,7 @@
puts( "Init: sem_open - sem1 SUCCESSFUL" );
n_sem1 = sem_open( "sem1",O_CREAT, 0777, 1 );
- rtems_test_assert( n_sem1 != SEM_FAILED );
+ rtems_test_assert( n_sem1 != SEM_FAILED );
puts( "Init: sem_destroy - named sem1 - EINVAL" );
status = sem_destroy(n_sem1);
@@ -218,7 +218,7 @@
puts( "Init: sem_open - Open an existing sem ( same id )" );
n_sem2 = sem_open("sem1", 0 );
- rtems_test_assert( n_sem2 == n_sem1 );
+ rtems_test_assert( n_sem2 == n_sem1 );
/*
* Unlink the semaphore, then verify an open of the same name produces a
@@ -231,8 +231,8 @@
puts( "Init: sem_open - Reopen sem1 SUCCESSFUL with a different id" );
n_sem2 = sem_open( "sem1", O_CREAT | O_EXCL, 0777, 1);
- rtems_test_assert( n_sem2 != SEM_FAILED );
- rtems_test_assert( n_sem2 != n_sem1 );
+ rtems_test_assert( n_sem2 != SEM_FAILED );
+ rtems_test_assert( n_sem2 != n_sem1 );
/*
* Validate we can call close on a semaphore opened with sem_open.
@@ -289,7 +289,7 @@
status = sem_unlink("sem2");
fatal_posix_service_status( status, -1, "sem_unlink error return status");
fatal_posix_service_status( errno, ENOENT, "sem_unlink errno ENOENT");
- rtems_test_assert( (status == -1) && (errno == ENOENT) );
+ rtems_test_assert( (status == -1) && (errno == ENOENT) );
/* Try adding in unlinking before closing... (can we still open?) */
diff -u rtems/testsuites/psxtests/psxsignal01/init.c:1.8 rtems/testsuites/psxtests/psxsignal01/init.c:1.9
--- rtems/testsuites/psxtests/psxsignal01/init.c:1.8 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal01/init.c Thu Oct 21 16:22:25 2010
@@ -124,23 +124,23 @@
/* unblock Signal and see if it happened */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGFPE );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGILL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGSEGV );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Unblock SIGUSR1 SIGFPE SIGILL SIGSEGV" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
/* install a signal handler for SIGUSR1 */
Signal_occurred = 0;
diff -u rtems/testsuites/psxtests/psxsignal01/task1.c:1.2 rtems/testsuites/psxtests/psxsignal01/task1.c:1.3
--- rtems/testsuites/psxtests/psxsignal01/task1.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal01/task1.c Thu Oct 21 16:22:25 2010
@@ -30,7 +30,7 @@
seconds = sleep( 5 );
printf( "Task_1: %d seconds left\n", seconds );
- rtems_test_assert( seconds );
+ rtems_test_assert( seconds );
/* switch to Init */
diff -u rtems/testsuites/psxtests/psxsignal02/init.c:1.6 rtems/testsuites/psxtests/psxsignal02/init.c:1.7
--- rtems/testsuites/psxtests/psxsignal02/init.c:1.6 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal02/init.c Thu Oct 21 16:22:25 2010
@@ -35,14 +35,14 @@
sigset_t mask;
sc = sigemptyset( &mask );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = sigaddset( &mask, SIGUSR1 );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
printf( "%s - Unblock SIGUSR1\n", task_name );
sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
}
/*
@@ -137,43 +137,43 @@
puts( "Init - Raise my priority" );
sc = pthread_attr_init( &attr );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
param.sched_priority = 30;
sc = pthread_setschedparam( pthread_self(), SCHED_RR, ¶m );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
for ( i=0, test=Threads ; test->priority != -1 ; i++, test++ ) {
printf( "Init - Create thread %d, priority=%d\n", i, test->priority );
sc = pthread_attr_init( &attr );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_attr_setschedpolicy( &attr, SCHED_RR );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
param.sched_priority = test->priority;
sc = pthread_attr_setschedparam( &attr, ¶m );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_create( &id, &attr, Test_Thread, test );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - sleep - let thread settle - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 50000000;
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
}
puts( "Init - sending SIGUSR1" );
sc = kill( getpid(), SIGUSR1 );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* we are just scheduling the signal, not delivering it */
- rtems_test_assert( Signal_occurred == false );
+ rtems_test_assert( Signal_occurred == false );
puts( "*** END OF POSIX TEST SIGNAL 02 ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxsignal03/init.c:1.10 rtems/testsuites/psxtests/psxsignal03/init.c:1.11
--- rtems/testsuites/psxtests/psxsignal03/init.c:1.10 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal03/init.c Thu Oct 21 16:22:25 2010
@@ -94,35 +94,35 @@
/* build unblocked mask */
sc = sigemptyset( &mask );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_ONE) );
sc = sigaddset( &mask, SIGNAL_ONE );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
if ( !blocked ) {
printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_TWO) );
sc = sigaddset( &mask, SIGNAL_TWO );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
}
/* unblocked signals */
sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* build wait mask */
sc = sigemptyset( &wait_mask );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = sigaddset( &wait_mask, SIGNAL_ONE );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* wait for a signal */
memset( &info, 0, sizeof(info) );
printf( "%s - Wait for %s unblocked\n", name, signal_name(SIGNAL_ONE) );
sigwaitinfo( &wait_mask, &info );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
printf( "%s - siginfo.si_signo=%d\n", name, info.si_signo );
printf( "%s - siginfo.si_code=%d\n", name, info.si_code );
@@ -132,8 +132,8 @@
* "implementation defined" */
printf( "%s - siginfo.si_value=0x%08" PRIxPTR "\n", name, (uintptr_t) info.si_value.sival_ptr );
- rtems_test_assert( info.si_signo == SIGNAL_TWO );
- rtems_test_assert( info.si_code == SI_USER );
+ rtems_test_assert( info.si_signo == SIGNAL_TWO );
+ rtems_test_assert( info.si_code == SI_USER );
printf( "%s - exiting\n", name );
return NULL;
@@ -163,43 +163,43 @@
/* create threads */
sc = pthread_create( &id, NULL, Test_Thread, &falseArg );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_create( &id, NULL, Test_Thread, &trueArg );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - sleep - let threads settle - OK" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - sleep - SignalBlocked thread settle - OK" );
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
printf( "Init - sending %s - deliver to one thread\n",
signal_name(SIGNAL_TWO));
sc = SEND_SIGNAL( SIGNAL_TWO );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
printf( "Init - sending %s - deliver to other thread\n",
signal_name(SIGNAL_TWO));
sc = SEND_SIGNAL( SIGNAL_TWO );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
#if defined(TO_PROCESS)
printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
sc = SEND_SIGNAL( SIGNAL_TWO );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno == EAGAIN );
+ rtems_test_assert( sc == -1 );
+ rtems_test_assert( errno == EAGAIN );
#endif
puts( "Init - sleep - let thread report if it unblocked - OK" );
usleep(500000);
/* we are just sigwait'ing the signal, not delivering it */
- rtems_test_assert( Signal_occurred == true );
+ rtems_test_assert( Signal_occurred == true );
puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxsignal05/init.c:1.2 rtems/testsuites/psxtests/psxsignal05/init.c:1.3
--- rtems/testsuites/psxtests/psxsignal05/init.c:1.2 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxsignal05/init.c Thu Oct 21 16:22:25 2010
@@ -74,7 +74,7 @@
true, /* is_global */
false /* check_blocked */
);
- rtems_test_assert( bc );
+ rtems_test_assert( bc );
puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxspin01/test.c:1.5 rtems/testsuites/psxtests/psxspin01/test.c:1.6
--- rtems/testsuites/psxtests/psxspin01/test.c:1.5 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxspin01/test.c Thu Oct 21 16:22:25 2010
@@ -34,7 +34,7 @@
}
puts( "pthread_spin_lock( &Spinlock ) from Thread -- OK" );
status = pthread_spin_lock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "sleep to allow main thread to run" );
sleep( 1 );
@@ -46,7 +46,7 @@
puts( "pthread_spin_unlock( &Spinlock ) from Thread -- OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
rtems_task_delete( RTEMS_SELF );
}
@@ -73,96 +73,96 @@
puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE ) -- EINVAL" );
status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_init( &spinlock, 0x1234 ) -- EINVAL" );
status = pthread_spin_init( &spinlock, 0x1234 );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
/* This successfully creates one */
puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == EAGAIN );
+ rtems_test_assert( status == EAGAIN );
puts( "pthread_spin_lock( NULL ) -- EINVAL" );
status = pthread_spin_lock( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_trylock( NULL ) -- EINVAL" );
status = pthread_spin_trylock( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_unlock( NULL ) -- EINVAL" );
status = pthread_spin_unlock( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_destroy( NULL ) -- EINVAL" );
status = pthread_spin_destroy( NULL );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
spinlock = 0;
puts( "pthread_spin_lock( &spinlock ) -- EINVAL" );
status = pthread_spin_lock( &spinlock );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_trylock( &spinlock ) -- EINVAL" );
status = pthread_spin_trylock( &spinlock );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_unlock( &spinlock ) -- EINVAL" );
status = pthread_spin_unlock( &spinlock );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_destroy( &spinlock ) -- EINVAL" );
status = pthread_spin_destroy( &spinlock );
- rtems_test_assert( status == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "pthread_spin_unlock( &Spinlock ) -- already unlocked OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* Now some basic locking and unlocking with a deadlock verification */
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_spin_lock( &Spinlock ) -- EDEADLK" );
status = pthread_spin_lock( &Spinlock );
- rtems_test_assert( status == EDEADLK );
+ rtems_test_assert( status == EDEADLK );
puts( "pthread_spin_trylock( &Spinlock ) -- EDEADLK" );
status = pthread_spin_trylock( &Spinlock );
- rtems_test_assert( status == EDEADLK );
+ rtems_test_assert( status == EDEADLK );
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* Try lock/unlock pair */
puts( "pthread_spin_trylock( &Spinlock ) -- OK" );
status = pthread_spin_trylock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* Let another thread lock a spinlock and we contend with it */
@@ -177,10 +177,10 @@
RTEMS_DEFAULT_ATTRIBUTES,
&taskid
);
- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
/* We should be preempted immediately. The thread is expected to:
* + verify we haven't set the main thread spinning flag
* + lock the spinlock
@@ -190,7 +190,7 @@
mainThreadSpinning = 1;
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* The thread wakes up, unlocks spin lock, and deletes itself.
* So when we get back here, about a second has passed and we now
@@ -200,16 +200,16 @@
/* spin lock should be locked when we return so destroying it gives busy */
puts( "pthread_spin_destroy( &Spinlock ) -- EBUSY" );
status = pthread_spin_destroy( &Spinlock );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
/* Unlock it for a normal destroy */
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
status = pthread_spin_destroy( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** END OF TEST *****************/
puts( "*** END OF POSIX SPINLOCK TEST 01 ***" );
diff -u rtems/testsuites/psxtests/psxspin02/test.c:1.5 rtems/testsuites/psxtests/psxspin02/test.c:1.6
--- rtems/testsuites/psxtests/psxspin02/test.c:1.5 Tue Dec 8 15:16:02 2009
+++ rtems/testsuites/psxtests/psxspin02/test.c Thu Oct 21 16:22:25 2010
@@ -28,11 +28,11 @@
puts( "pthread_spin_trylock( &Spinlock ) -- EBUSY" );
status = pthread_spin_trylock( &Spinlock );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == EBUSY );
puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == EPERM );
+ rtems_test_assert( status == EPERM );
rtems_task_delete( RTEMS_SELF );
}
@@ -59,12 +59,12 @@
/* This successfully creates one */
puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* Lock it */
puts( "pthread_spin_lock( &Spinlock ) -- OK" );
status = pthread_spin_lock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/* Create a helper task */
rstatus = rtems_task_create(
@@ -75,20 +75,20 @@
RTEMS_DEFAULT_ATTRIBUTES,
&taskid
);
- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
- rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
+ rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
sleep(1);
puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
status = pthread_spin_unlock( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
status = pthread_spin_destroy( &Spinlock );
- rtems_test_assert( status == 0 );
+ rtems_test_assert( status == 0 );
/*************** END OF TEST *****************/
puts( "*** END OF POSIX SPINLOCK TEST 02 ***" );
diff -u rtems/testsuites/psxtests/psxstack01/init.c:1.6 rtems/testsuites/psxtests/psxstack01/init.c:1.7
--- rtems/testsuites/psxtests/psxstack01/init.c:1.6 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/psxstack01/init.c Thu Oct 21 16:22:25 2010
@@ -60,23 +60,23 @@
puts( "Init - Initialize thread attribute for user provided stack" );
sc = pthread_attr_init( &attr );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_attr_setstackaddr( &attr, Stack_Low );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_attr_setstacksize( &attr, PTHREAD_MINIMUM_STACK_SIZE );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* create threads */
sc = pthread_create( &id, &attr, Test_Thread, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - let other thread run" );
delay_request.tv_sec = 0;
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "*** END OF POSIX STACK ATTRIBUTE TEST 01 ***" );
rtems_test_exit(0);
diff -u rtems/testsuites/psxtests/psxstack02/init.c:1.1 rtems/testsuites/psxtests/psxstack02/init.c:1.2
--- rtems/testsuites/psxtests/psxstack02/init.c:1.1 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/psxstack02/init.c Thu Oct 21 16:22:25 2010
@@ -63,14 +63,14 @@
puts( "Init - Initialize thread attribute for user provided stack" );
sc = pthread_attr_init( &attr );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
sc = pthread_attr_setstack( &attr, Stack_Low, PTHREAD_MINIMUM_STACK_SIZE );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
/* create threads */
sc = pthread_create( &id, &attr, Test_Thread, NULL );
- rtems_test_assert( !sc );
+ rtems_test_assert( !sc );
puts( "Init - let other thread run" );
delay_request.tv_sec = 0;
diff -u rtems/testsuites/psxtests/psxualarm/init.c:1.4 rtems/testsuites/psxtests/psxualarm/init.c:1.5
--- rtems/testsuites/psxtests/psxualarm/init.c:1.4 Tue Dec 8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxualarm/init.c Thu Oct 21 16:22:25 2010
@@ -79,12 +79,12 @@
/* unblock Signal and see if it happened */
status = sigemptyset( &mask );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sigaddset( &mask, SIGALRM );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
puts( "Init: Unblock SIGALRM" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
- rtems_test_assert( !status );
+ rtems_test_assert( !status );
status = sleep(10);
/* stop ularm */
*joel*:
2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
sleep() (e.g. interruptible blocking and sleeping) are interruptible
by signal.
* psxsignal06/.cvsignore, psxsignal06/Makefile.am, psxsignal06/init.c,
psxsignal06/psxsignal06.doc, psxsignal06/psxsignal06.scn: New files.
M 1.322 testsuites/psxtests/ChangeLog
M 1.72 testsuites/psxtests/Makefile.am
M 1.78 testsuites/psxtests/configure.ac
A 1.1 testsuites/psxtests/psxsignal06/.cvsignore
A 1.1 testsuites/psxtests/psxsignal06/Makefile.am
A 1.1 testsuites/psxtests/psxsignal06/init.c
A 1.1 testsuites/psxtests/psxsignal06/psxsignal06.doc
A 1.1 testsuites/psxtests/psxsignal06/psxsignal06.scn
diff -u rtems/testsuites/psxtests/ChangeLog:1.321 rtems/testsuites/psxtests/ChangeLog:1.322
--- rtems/testsuites/psxtests/ChangeLog:1.321 Thu Oct 21 16:22:24 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 17:05:17 2010
@@ -1,5 +1,13 @@
2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
+ sleep() (e.g. interruptible blocking and sleeping) are interruptible
+ by signal.
+ * psxsignal06/.cvsignore, psxsignal06/Makefile.am, psxsignal06/init.c,
+ psxsignal06/psxsignal06.doc, psxsignal06/psxsignal06.scn: New files.
+
+2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
+
* psx02/init.c, psx02/task.c, psx03/init.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,
diff -u rtems/testsuites/psxtests/Makefile.am:1.71 rtems/testsuites/psxtests/Makefile.am:1.72
--- rtems/testsuites/psxtests/Makefile.am:1.71 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/Makefile.am Thu Oct 21 17:05:17 2010
@@ -13,7 +13,8 @@
psxcond01 psxenosys psxkey01 psxkey02 psxkey03 \
psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
- psxsignal03 psxsignal04 psxsignal05 psxspin01 psxspin02 psxsysconf \
+ psxsignal03 psxsignal04 psxsignal05 psxsignal06 \
+ psxspin01 psxspin02 psxsysconf \
psxtime psxtimer01 psxtimer02 psxualarm psxusleep psxfatal01 psxfatal02 \
psxintrcritical01 psxstack01 psxstack02
endif
diff -u rtems/testsuites/psxtests/configure.ac:1.77 rtems/testsuites/psxtests/configure.ac:1.78
--- rtems/testsuites/psxtests/configure.ac:1.77 Mon Oct 4 10:53:45 2010
+++ rtems/testsuites/psxtests/configure.ac Thu Oct 21 17:05:17 2010
@@ -142,6 +142,7 @@
psxsignal03/Makefile
psxsignal04/Makefile
psxsignal05/Makefile
+psxsignal06/Makefile
psxspin01/Makefile
psxspin02/Makefile
psxstack01/Makefile
diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/.cvsignore:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/.cvsignore Thu Oct 21 17:05:17 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/Makefile.am:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/Makefile.am Thu Oct 21 17:05:17 2010
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = psxsignal06
+psxsignal06_SOURCES = init.c
+
+dist_rtems_tests_DATA = psxsignal06.scn
+dist_rtems_tests_DATA += psxsignal06.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxsignal06_OBJECTS) $(psxsignal06_LDADD)
+LINK_LIBS = $(psxsignal06_LDLIBS)
+
+psxsignal06$(EXEEXT): $(psxsignal06_OBJECTS) $(psxsignal06_DEPENDENCIES)
+ @rm -f psxsignal06$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/init.c:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/init.c Thu Oct 21 17:05:17 2010
@@ -0,0 +1,124 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+#include <pthread.h>
+#include <errno.h>
+
+pthread_t ThreadId;
+pthread_cond_t CondVarId;
+pthread_mutex_t MutexId;
+
+void Handler(
+ int signo
+)
+{
+}
+
+void *TestThread(
+ void *argument
+)
+{
+ int status;
+ sigset_t mask;
+ struct sigaction act;
+ unsigned int left;
+
+ /* unblock SIGUSR1 */
+ status = sigemptyset( &mask );
+ rtems_test_assert( !status );
+
+ status = sigaddset( &mask, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ puts( "Test: Unblock SIGUSR1" );
+ status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
+ rtems_test_assert( !status );
+
+ /* install a signal handler for SIGUSR1 */
+ act.sa_handler = Handler;
+ act.sa_flags = 0;
+ sigaction( SIGUSR1, &act, NULL );
+
+ /* interrupting condition wait returns 0 */
+ puts( "Test: pthread_cond_wait - OK" );
+ status = pthread_cond_wait( &CondVarId, &MutexId );
+ rtems_test_assert( !status );
+ puts( "Test: pthread_cond_wait - interrupted by signal" );
+
+ left = sleep( 10 );
+ printf( "Test: seconds left=%d\n", left );
+
+ return NULL;
+}
+
+void *POSIX_Init(
+ rtems_task_argument argument
+)
+{
+ int status;
+
+ puts( "\n\n*** POSIX TEST SIGNAL 06 ***" );
+
+ puts( "Init: pthread_cond_init - OK" );
+ status = pthread_cond_init( &CondVarId, NULL );
+ rtems_test_assert( !status );
+
+ puts( "Init: pthread_mutex_init - OK" );
+ status = pthread_mutex_init( &MutexId, NULL );
+ rtems_test_assert( !status );
+
+ puts( "Init: pthread_create - OK" );
+ status = pthread_create( &ThreadId, NULL, TestThread, NULL );
+ rtems_test_assert( !status );
+
+ sleep( 1 );
+
+ /* let TestThread run */
+
+ puts( "Init: pthread_kill - SIGUSR to Test Thread - OK" );
+ status = pthread_kill( ThreadId, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ sleep( 2 );
+
+ /* let TestThread run */
+
+ puts( "Init: pthread_kill - SIGUSR to Test Thread - OK" );
+ status = pthread_kill( ThreadId, SIGUSR1 );
+ rtems_test_assert( !status );
+
+ sleep( 1 );
+
+ /* let TestThread run */
+
+
+
+ puts( "*** END OF POSIX TEST SIGNAL 06 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
+#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/psxsignal06.doc:1.1
--- /dev/null Thu Oct 21 17:10:57 2010
+++ rtems/testsuites/psxtests/psxsignal06/psxsignal06.doc Thu Oct 21 17:05:17 2010
@@ -0,0 +1,24 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2010.
+# On-Line Applications Research Corporation (OAR).
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: psxsignal06
+
+directives:
+
+ pthread_cond_wait
+ sleep
+ pthread_kill
+
+concepts:
+
++ Ensure that sleep and pthread_cond_wait are properly interrupted by a signal.
diff -u /dev/null rtems/testsuites/psxtests/psxsignal06/psxsignal06.scn:1.1
--- /dev/null Thu Oct 21 17:10:58 2010
+++ rtems/testsuites/psxtests/psxsignal06/psxsignal06.scn Thu Oct 21 17:05:17 2010
@@ -0,0 +1,11 @@
+*** POSIX TEST SIGNAL 06 ***
+Init: pthread_cond_init - OK
+Init: pthread_mutex_init - OK
+Init: pthread_create - OK
+Test: Unblock SIGUSR1
+Test: pthread_cond_wait - OK
+Init: pthread_kill - SIGUSR to Test Thread - OK
+Test: pthread_cond_wait - interrupted by signal
+Init: pthread_kill - SIGUSR to Test Thread - OK
+Test: seconds left=8
+*** END OF POSIX TEST SIGNAL 06 ***
*joel*:
2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
* psx05/init.c: Check for correct status returned.
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test code
to exercise path when attempting to lock for reading but there
is at least one writer blocked waiting for access.
M 1.323 testsuites/psxtests/ChangeLog
M 1.36 testsuites/psxtests/psx05/init.c
M 1.8 testsuites/psxtests/psxrwlock01/psxrwlock01.scn
M 1.15 testsuites/psxtests/psxrwlock01/test.c
diff -u rtems/testsuites/psxtests/ChangeLog:1.322 rtems/testsuites/psxtests/ChangeLog:1.323
--- rtems/testsuites/psxtests/ChangeLog:1.322 Thu Oct 21 17:05:17 2010
+++ rtems/testsuites/psxtests/ChangeLog Thu Oct 21 17:09:44 2010
@@ -1,5 +1,12 @@
2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
+ * psx05/init.c: Check for correct status returned.
+ * psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test code
+ to exercise path when attempting to lock for reading but there
+ is at least one writer blocked waiting for access.
+
+2010-10-21 Joel Sherrill <joel.sherrill at oarcorp.com>
+
* Makefile.am, configure.ac: New test to ensure pthread_cond_wait() and
sleep() (e.g. interruptible blocking and sleeping) are interruptible
by signal.
diff -u rtems/testsuites/psxtests/psx05/init.c:1.35 rtems/testsuites/psxtests/psx05/init.c:1.36
--- rtems/testsuites/psxtests/psx05/init.c:1.35 Thu Oct 21 16:22:24 2010
+++ rtems/testsuites/psxtests/psx05/init.c Thu Oct 21 17:09:44 2010
@@ -430,9 +430,9 @@
calculate_abstimeout( ×, -1, (TOD_NANOSECONDS_PER_SECOND / 2) );
status = pthread_mutex_timedlock( &Mutex_id, × );
- if ( status != EBUSY )
+ if ( status != ETIMEDOUT )
printf( "status = %d\n", status );
- rtems_test_assert( status == EBUSY );
+ rtems_test_assert( status == ETIMEDOUT );
/* switch to idle */
diff -u rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.7 rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.8
--- rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn:1.7 Sat Jul 4 15:26:18 2009
+++ rtems/testsuites/psxtests/psxrwlock01/psxrwlock01.scn Thu Oct 21 17:09:44 2010
@@ -60,6 +60,7 @@
pthread_rwlock_unlock(RWLock) -- OK
ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
+
pthread_rwlock_trywrlock(RWLock) -- OK
pthread_rwlock_trywrlock(&RWLock) -- EBUSY
Init: pthread_create - thread 1 OK
@@ -70,16 +71,27 @@
WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
WriteThread - pthread_rwlock_unlock(RWLock) -- OK
WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
+WriteThread - pthread_rwlock_unlock(RWLock) -- OK
+
+pthread_rwlock_tryrdlock(&RWLock) -- OK
+Init: pthread_create - thread reader & writer OK
+WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK
+ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK
+pthread_rwlock_tryrdlock(&RWLock) -- EBUSY
+pthread_rwlock_trywrlock(&RWLock) -- EBUSY
+pthread_rwlock_unlock(&RWLock) -- OK
+WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK
+WriteThread - pthread_rwlock_unlock(RWLock) -- OK
+ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK
clock_gettime(CLOCK_REALTIME, &abstime) -- OK
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK
-WriteThread - pthread_rwlock_unlock(RWLock) -- OK
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK
pthread_rwlock_destroy( &RWLock ) -- OK
-pthread_rwlock_init( &rwlock, NULL ) -- OK
-pthread_rwlock_unlock ( &rwlock ) -- OK
+pthread_rwlock_init( &rwlock, NULL ) -- OK
+pthread_rwlock_unlock ( &rwlock ) -- OK
pthread_rwlock_unlock ( &rwlock ) -- OK
*** END OF POSIX RWLOCK TEST 01 ***
diff -u rtems/testsuites/psxtests/psxrwlock01/test.c:1.14 rtems/testsuites/psxtests/psxrwlock01/test.c:1.15
--- rtems/testsuites/psxtests/psxrwlock01/test.c:1.14 Thu Oct 21 16:22:25 2010
+++ rtems/testsuites/psxtests/psxrwlock01/test.c Thu Oct 21 17:09:44 2010
@@ -1,7 +1,7 @@
/*
* This test exercises the POSIX RWLock manager.
*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -57,10 +57,12 @@
rtems_test_assert( !status );
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
- sleep( 1 );
+ sleep( 2 );
puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
+ if ( status )
+ printf( "status=%s\n", strerror(status) );
rtems_test_assert( !status );
return NULL;
}
@@ -340,7 +342,7 @@
sleep(2);
/*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
- puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
+ puts( "\npthread_rwlock_trywrlock(RWLock) -- OK" );
status = pthread_rwlock_trywrlock(&RWLock);
rtems_test_assert( !status );
@@ -354,14 +356,47 @@
pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
rtems_test_assert( !status );
- sleep(1);
+ sleep(2);
}
puts( "pthread_rwlock_unlock(RWLock) -- OK" );
status = pthread_rwlock_unlock(&RWLock);
rtems_test_assert( !status );
- sleep(2);
+ sleep(6);
+
+ /*************** CREATE THREADS AND LET THEM OBTAIN WRITE LOCK *************/
+ /*************** THEN ATTEMPT TO OBTAIN A READLOCK *************/
+
+ puts( "\npthread_rwlock_tryrdlock(&RWLock) -- OK" );
+ status = pthread_rwlock_tryrdlock(&RWLock);
+ rtems_test_assert( !status );
+
+ printf( "Init: pthread_create - thread reader & writer OK\n" );
+ status = pthread_create(&ThreadIds[0], NULL, WriteLockThread, &ThreadIds[0]);
+ rtems_test_assert( !status );
+
+ sleep(1);
+ status = pthread_create(&ThreadIds[1], NULL, ReadLockThread, &ThreadIds[1]);
+ rtems_test_assert( !status );
+
+ sleep(1);
+
+ puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
+ status = pthread_rwlock_tryrdlock(&RWLock);
+ rtems_test_assert( status == EBUSY );
+
+ puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
+ status = pthread_rwlock_trywrlock(&RWLock);
+ rtems_test_assert( status == EBUSY );
+
+ sleep( 5 );
+
+ puts( "pthread_rwlock_unlock(&RWLock) -- OK" );
+ status = pthread_rwlock_unlock(&RWLock);
+ rtems_test_assert( !status );
+
+ sleep( 5 );
/*************** TIMEOUT ON RWLOCK ***************/
puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101021/df5cd253/attachment-0001.html>
More information about the vc
mailing list