Changeset 33c46f1 in rtems


Ignore:
Timestamp:
Oct 21, 2010, 9:22:25 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
4fcd106
Parents:
15d5b9a
Message:

2010-10-21 Joel Sherrill <joel.sherrill@…>

  • 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().
Location:
testsuites/psxtests
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r15d5b9a r33c46f1  
     12010-10-21      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c,
     4        psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c,
     5        psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c,
     6        psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c,
     7        psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c,
     8        psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c,
     9        psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
     10        psxcancel01/init.c, psxchroot01/test.c, psxitimer/init.c,
     11        psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c,
     12        psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c,
     13        psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
     14        psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
     15        psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
     16        psxstack01/init.c, psxstack02/init.c, psxualarm/init.c: Eliminate
     17        double space after parenthesis on rtems_test_assert().
     18
    1192010-10-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    220
  • testsuites/psxtests/psx02/init.c

    r15d5b9a r33c46f1  
    5757
    5858  status = sigemptyset( &act.sa_mask );
    59   rtems_test_assert(  !status );
     59  rtems_test_assert( !status );
    6060
    6161  act.sa_handler = Signal_handler;
     
    7070
    7171  status = pthread_kill( Init_id, SIGUSR1 );
    72   rtems_test_assert(  !status );
     72  rtems_test_assert( !status );
    7373
    7474  Signal_occurred = 0;
     
    7777
    7878  status = sigemptyset( &mask );
    79   rtems_test_assert(  !status );
     79  rtems_test_assert( !status );
    8080
    8181  status = sigaddset( &mask, SIGUSR1 );
    82   rtems_test_assert(  !status );
     82  rtems_test_assert( !status );
    8383
    8484  printf( "Init: Block SIGUSR1\n" );
    8585  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    86   rtems_test_assert(  !status );
     86  rtems_test_assert( !status );
    8787
    8888  status = sigpending( &pending_set );
    89   rtems_test_assert(  !status );
     89  rtems_test_assert( !status );
    9090  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    9191
     
    9393  printf( "Init: send SIGUSR1 to self\n" );
    9494  status = pthread_kill( Init_id, SIGUSR1 );
    95   rtems_test_assert(  !status );
     95  rtems_test_assert( !status );
    9696
    9797  status = sigpending( &pending_set );
    98   rtems_test_assert(  !status );
     98  rtems_test_assert( !status );
    9999  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    100100
    101101  printf( "Init: Unblock SIGUSR1\n" );
    102102  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    103   rtems_test_assert(  !status );
     103  rtems_test_assert( !status );
    104104
    105105  /* create a thread */
    106106
    107107  status = pthread_create( &Task_id, NULL, Task_1_through_3, NULL );
    108   rtems_test_assert(  !status );
     108  rtems_test_assert( !status );
    109109
    110110  /*
     
    123123
    124124    if ( status == -1 ) {
    125       rtems_test_assert(  errno == EINTR );
    126       rtems_test_assert(  tr.tv_nsec || tr.tv_sec );
     125      rtems_test_assert( errno == EINTR );
     126      rtems_test_assert( tr.tv_nsec || tr.tv_sec );
    127127    } else if ( !status ) {
    128       rtems_test_assert(  !tr.tv_nsec && !tr.tv_sec );
     128      rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
    129129    }
    130130
  • testsuites/psxtests/psx02/task.c

    r15d5b9a r33c46f1  
    3333    print_current_time( "Task1: ", "" );
    3434    status = pthread_kill( Init_id, SIGUSR1 );
    35     rtems_test_assert(  !status );
     35    rtems_test_assert( !status );
    3636
    3737    seconds = sleep( 1 );
    38     rtems_test_assert(  !seconds );
     38    rtems_test_assert( !seconds );
    3939  }
    4040  puts( "*** END OF POSIX TEST 2 ***" );
  • testsuites/psxtests/psx03/init.c

    r15d5b9a r33c46f1  
    7878
    7979  status = sigemptyset( &waitset );
    80   rtems_test_assert(  !status );
     80  rtems_test_assert( !status );
    8181
    8282  status = sigaddset( &waitset, SIGUSR1 );
    83   rtems_test_assert(  !status );
     83  rtems_test_assert( !status );
    8484
    8585  timeout.tv_sec = 3;
     
    8888  puts( "Init: waiting on any signal for 3 seconds." );
    8989  signo = sigtimedwait( &waitset, &siginfo, &timeout );
    90   rtems_test_assert(  signo == -1 );
     90  rtems_test_assert( signo == -1 );
    9191
    9292  if ( errno == EAGAIN )
     
    106106
    107107  status = sigemptyset( &mask );
    108   rtems_test_assert(  !status );
     108  rtems_test_assert( !status );
    109109
    110110  status = sigaddset( &mask, SIGUSR2 );
    111   rtems_test_assert(  !status );
     111  rtems_test_assert( !status );
    112112
    113113  printf( "Init: Block SIGUSR2\n" );
    114114  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    115   rtems_test_assert(  !status );
     115  rtems_test_assert( !status );
    116116
    117117  /* create a thread */
    118118
    119119  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    120   rtems_test_assert(  !status );
     120  rtems_test_assert( !status );
    121121
    122122  /* signal handler is still installed, waitset is still set for SIGUSR1 */
     
    134134  else
    135135    printf( "sigtimedwait returned wrong errno - %d\n", errno );
    136   rtems_test_assert(  signo == -1 );
     136  rtems_test_assert( signo == -1 );
    137137
    138138  /*
     
    145145
    146146  status = pthread_create( &Task_id, NULL, Task_2, NULL );
    147   rtems_test_assert(  !status );
     147  rtems_test_assert( !status );
    148148
    149149  /* signal handler is still installed, waitset is still set for SIGUSR1 */
     
    163163  signo = sigtimedwait( &waitset, &siginfo, &timeout );
    164164  printf( "Init: received (%d) SIGUSR1=%d\n", siginfo.si_signo, SIGUSR1 );
    165   rtems_test_assert(  signo == SIGUSR1 );
    166   rtems_test_assert(  siginfo.si_signo == SIGUSR1 );
    167   rtems_test_assert(  siginfo.si_code == SI_USER );
    168   rtems_test_assert(  siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
     165  rtems_test_assert( signo == SIGUSR1 );
     166  rtems_test_assert( siginfo.si_signo == SIGUSR1 );
     167  rtems_test_assert( siginfo.si_code == SI_USER );
     168  rtems_test_assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
    169169
    170170  /* try out a process signal */
     
    173173  puts( "Init: kill with SIGUSR2." );
    174174  status = kill( getpid(), SIGUSR2 );
    175   rtems_test_assert(  !status );
     175  rtems_test_assert( !status );
    176176
    177177  siginfo.si_code = -1;
     
    180180
    181181  status = sigemptyset( &waitset );
    182   rtems_test_assert(  !status );
     182  rtems_test_assert( !status );
    183183
    184184  status = sigaddset( &waitset, SIGUSR1 );
    185   rtems_test_assert(  !status );
     185  rtems_test_assert( !status );
    186186
    187187  status = sigaddset( &waitset, SIGUSR2 );
    188   rtems_test_assert(  !status );
     188  rtems_test_assert( !status );
    189189
    190190  puts( "Init: waiting on any signal for 3 seconds." );
    191191  signo = sigtimedwait( &waitset, &siginfo, &timeout );
    192192  printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 );
    193   rtems_test_assert(  signo == SIGUSR2 );
    194   rtems_test_assert(  siginfo.si_signo == SIGUSR2 );
    195   rtems_test_assert(  siginfo.si_code == SI_USER );
    196   rtems_test_assert(  siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
     193  rtems_test_assert( signo == SIGUSR2 );
     194  rtems_test_assert( siginfo.si_signo == SIGUSR2 );
     195  rtems_test_assert( siginfo.si_code == SI_USER );
     196  rtems_test_assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
    197197
    198198  /* exit this thread */
  • testsuites/psxtests/psx04/init.c

    r15d5b9a r33c46f1  
    8686  if ( status != EINVAL )
    8787    printf( "status = %d (%s)\n", status, strerror(status) );
    88   rtems_test_assert(  status == EINVAL );
     88  rtems_test_assert( status == EINVAL );
    8989  puts( "Init: sigwait - EINVAL (NULL set)" );
    9090
     
    9292  if ( status != -1 )
    9393    printf( "status = %d\n", status );
    94   rtems_test_assert(  errno == EINVAL );
     94  rtems_test_assert( errno == EINVAL );
    9595  puts( "Init: sigwait - EINVAL (NULL set)" );
    9696
     
    9898
    9999  status = sigemptyset( &act.sa_mask );
    100   rtems_test_assert(  !status );
     100  rtems_test_assert( !status );
    101101  printf( "Init: sigemptyset -  set= 0x%08x\n", (unsigned int) act.sa_mask );
    102102
     
    104104
    105105  status = sigfillset( &act.sa_mask );
    106   rtems_test_assert(  !status );
     106  rtems_test_assert( !status );
    107107  printf( "Init: sigfillset -  set= 0x%08x\n", (unsigned int) act.sa_mask );
    108108
     
    110110
    111111  status = sigdelset( &act.sa_mask, SIGUSR1 );
    112   rtems_test_assert(  !status );
     112  rtems_test_assert( !status );
    113113  printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n",
    114114      (unsigned int) act.sa_mask );
     
    117117
    118118  status = sigismember( &act.sa_mask, SIGUSR1 );
    119   rtems_test_assert(  !status );
     119  rtems_test_assert( !status );
    120120  puts( "Init: sigismember - FALSE since SIGUSR1 is not a member" );
    121121
     
    123123
    124124  status = sigismember( &act.sa_mask, SIGUSR2 );
    125   rtems_test_assert(  status );
     125  rtems_test_assert( status );
    126126  puts( "Init: sigismember - TRUE since SIGUSR2 is a member" );
    127127
     
    140140  puts( "Init: send SIGUSR1 to process" );
    141141  status = kill( getpid(), SIGUSR1 );
    142   rtems_test_assert(  !status );
     142  rtems_test_assert( !status );
    143143
    144144/* end of install a signal handler for SIGUSR1 */
     
    151151
    152152  status = sigemptyset( &mask );
    153   rtems_test_assert(  !status );
     153  rtems_test_assert( !status );
    154154
    155155  status = sigaddset( &mask, SIGUSR1 );
    156   rtems_test_assert(  !status );
     156  rtems_test_assert( !status );
    157157
    158158  puts( "Init: Block SIGUSR1" );
     
    169169  puts( "Init: send SIGUSR1 to process" );
    170170  status = kill( getpid(), SIGUSR1 );
    171   rtems_test_assert(  !status );
     171  rtems_test_assert( !status );
    172172
    173173  Signal_occurred = 0;
     
    178178
    179179  status = sigemptyset( &mask );
    180   rtems_test_assert(  !status );
     180  rtems_test_assert( !status );
    181181
    182182  status = sigaddset( &mask, SIGUSR1 );
    183   rtems_test_assert(  !status );
     183  rtems_test_assert( !status );
    184184
    185185  puts( "Init: Block SIGUSR1" );
    186186  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    187   rtems_test_assert(  !status );
     187  rtems_test_assert( !status );
    188188
    189189  status = sigpending( &pending_set );
    190   rtems_test_assert(  !status );
     190  rtems_test_assert( !status );
    191191  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    192192
    193193  puts( "Init: send SIGUSR1 to process" );
    194194  status = kill( getpid(), SIGUSR1 );
    195   rtems_test_assert(  !status );
     195  rtems_test_assert( !status );
    196196
    197197  status = sigpending( &pending_set );
    198   rtems_test_assert(  !status );
     198  rtems_test_assert( !status );
    199199  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    200200
    201201  puts( "Init: Unblock SIGUSR1" );
    202202  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    203   rtems_test_assert(  !status );
     203  rtems_test_assert( !status );
    204204
    205205  /* now let another task get interrupted by a signal */
     
    209209  puts( "Init: create a thread interested in SIGUSR1" );
    210210  status = pthread_create( &Task1_id, NULL, Task_1, NULL );
    211   rtems_test_assert(  !status );
     211  rtems_test_assert( !status );
    212212
    213213  puts( "Init: Block SIGUSR1" );
    214214  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    215   rtems_test_assert(  !status );
     215  rtems_test_assert( !status );
    216216
    217217  status = sigpending( &pending_set );
    218   rtems_test_assert(  !status );
     218  rtems_test_assert( !status );
    219219  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    220220
    221221  puts( "Init: sleep so the other task can block" );
    222222  remaining = sleep( 1 );
    223   rtems_test_assert(  !status );
     223  rtems_test_assert( !status );
    224224
    225225     /* switch to task 1 */
     
    227227  puts( "Init: send SIGUSR1 to process" );
    228228  status = kill( getpid(), SIGUSR1 );
    229   rtems_test_assert(  !status );
     229  rtems_test_assert( !status );
    230230
    231231  status = sigpending( &pending_set );
    232   rtems_test_assert(  !status );
     232  rtems_test_assert( !status );
    233233  printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
    234234
    235235  puts( "Init: sleep so the other task can catch signal" );
    236236  remaining = sleep( 1 );
    237   rtems_test_assert(  !status );
     237  rtems_test_assert( !status );
    238238
    239239     /* switch to task 1 */
     
    246246
    247247  status = sigemptyset( &act.sa_mask );
    248   rtems_test_assert(  !status );
     248  rtems_test_assert( !status );
    249249
    250250  act.sa_handler = Signal_handler;
     
    254254
    255255  status = sigemptyset( &mask );
    256   rtems_test_assert(  !status );
     256  rtems_test_assert( !status );
    257257
    258258  status = sigaddset( &mask, SIGALRM );
    259   rtems_test_assert(  !status );
     259  rtems_test_assert( !status );
    260260
    261261  puts( "Init: Unblock SIGALRM" );
    262262  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    263   rtems_test_assert(  !status );
     263  rtems_test_assert( !status );
    264264
    265265  /* schedule the alarm */
     
    268268  remaining = alarm( 5 );
    269269  printf( "Init: %d seconds left on previous alarm\n", status );
    270   rtems_test_assert(  !status );
     270  rtems_test_assert( !status );
    271271
    272272  puts( "Init: Firing alarm in 2 seconds" );
    273273  remaining = alarm( 2 );
    274274  printf( "Init: %d seconds left on previous alarm\n", remaining );
    275   rtems_test_assert(  remaining == 5 );
     275  rtems_test_assert( remaining == 5 );
    276276
    277277  puts( "Init: Wait 4 seconds for alarm" );
    278278  remaining = sleep( 4 );
    279279  printf( "Init: %d seconds left in sleep\n", remaining );
    280   rtems_test_assert(  remaining == 2 );
     280  rtems_test_assert( remaining == 2 );
    281281
    282282  /* test SIG_SETMASK case and returning oset of pthread_sigmask */
     
    285285
    286286  status = sigemptyset( &mask );
    287   rtems_test_assert(  !status );
     287  rtems_test_assert( !status );
    288288
    289289  status = sigaddset( &mask, SIGUSR1 );
    290   rtems_test_assert(  !status );
     290  rtems_test_assert( !status );
    291291
    292292  status = sigaddset( &mask, SIGUSR2 );
    293   rtems_test_assert(  !status );
     293  rtems_test_assert( !status );
    294294
    295295  puts( "Init: Block SIGUSR1 and SIGUSR2 only" );
    296296  status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
    297297  printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
    298   rtems_test_assert(  !status );
     298  rtems_test_assert( !status );
    299299
    300300  /* test inquiry about current blocked set with pthread_sigmask */
     
    302302  status = pthread_sigmask( 0, NULL, &oset );
    303303  printf( "Init: Current blocked set is 0x%08x\n", (unsigned int) oset );
    304   rtems_test_assert(  !status );
     304  rtems_test_assert( !status );
    305305
    306306  /* return blocked mask to no signals blocked */
    307307
    308308  status = sigemptyset( &mask );
    309   rtems_test_assert(  !status );
     309  rtems_test_assert( !status );
    310310
    311311  puts( "Init: Unblock all signals" );
    312312  status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
    313313  printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
    314   rtems_test_assert(  !status );
     314  rtems_test_assert( !status );
    315315
    316316  /* test sigsuspend */
     
    320320  puts( "Init: create a thread to send Init SIGUSR1" );
    321321  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    322   rtems_test_assert(  !status );
    323 
    324   status = sigemptyset( &mask );
    325   rtems_test_assert(  !status );
     322  rtems_test_assert( !status );
     323
     324  status = sigemptyset( &mask );
     325  rtems_test_assert( !status );
    326326
    327327  puts( "Init: sigsuspend for any signal" );
    328328  status = sigsuspend( &mask );
    329   rtems_test_assert(  status );
     329  rtems_test_assert( status );
    330330  printf( "Init: awakended from sigsuspend status=%08d \n", status );
    331331
     
    336336  puts( "Init: create a thread to sent Process SIGUSR1 with SA_SIGINFO" );
    337337  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
    338   rtems_test_assert(  !status );
     338  rtems_test_assert( !status );
    339339
    340340  /* set action on SIGUSR1 to an info case */
     
    347347  puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" );
    348348  remaining = sleep( 1 );
    349   rtems_test_assert(  !status );
     349  rtems_test_assert( !status );
    350350
    351351     /* switch to task 1 */
     
    356356
    357357  status = sigemptyset( &mask );
    358   rtems_test_assert(  !status );
     358  rtems_test_assert( !status );
    359359
    360360  status = sigaddset( &mask, SIGUSR1 );
    361   rtems_test_assert(  !status );
     361  rtems_test_assert( !status );
    362362
    363363  puts( "Init: Block SIGUSR1" );
    364364  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    365   rtems_test_assert(  !status );
     365  rtems_test_assert( !status );
    366366
    367367  puts( "Init: send SIGUSR1 to process" );
    368368  status = kill( getpid(), SIGUSR1 );
    369   rtems_test_assert(  !status );
     369  rtems_test_assert( !status );
    370370
    371371  puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
    372372  remaining = sleep( 1 );
    373   rtems_test_assert(  !status );
     373  rtems_test_assert( !status );
    374374
    375375  /* Send SIGUSR1, Task_3 has issued a sigwait */
    376376
    377377  status = sigemptyset( &mask );
    378   rtems_test_assert(  !status );
     378  rtems_test_assert( !status );
    379379
    380380  status = sigaddset( &mask, SIGUSR1 );
    381   rtems_test_assert(  !status );
     381  rtems_test_assert( !status );
    382382
    383383  puts( "Init: Block SIGUSR1" );
    384384  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    385   rtems_test_assert(  !status );
     385  rtems_test_assert( !status );
    386386
    387387  puts( "Init: send SIGUSR1 to process" );
    388388  status = kill( getpid(), SIGUSR1 );
    389   rtems_test_assert(  !status );
     389  rtems_test_assert( !status );
    390390
    391391  puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
    392392  remaining = sleep( 1 );
    393   rtems_test_assert(  !status );
     393  rtems_test_assert( !status );
    394394
    395395  /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
    396396
    397397  status = sigemptyset( &mask );
    398   rtems_test_assert(  !status );
     398  rtems_test_assert( !status );
    399399
    400400  status = sigaddset( &mask, SIGUSR2 );
    401   rtems_test_assert(  !status );
     401  rtems_test_assert( !status );
    402402
    403403  puts( "Init: Block SIGUSR2" );
    404404  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    405   rtems_test_assert(  !status );
     405  rtems_test_assert( !status );
    406406
    407407  puts( "Init: send SIGUSR2 to process" );
    408408  status = kill( getpid(), SIGUSR2 );
    409   rtems_test_assert(  !status );
     409  rtems_test_assert( !status );
    410410
    411411  puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
    412412  remaining = sleep( 1 );
    413   rtems_test_assert(  !status );
     413  rtems_test_assert( !status );
    414414
    415415  /* Suspend for signal that has already be sent */
    416416
    417417  status = sigemptyset( &mask );
    418   rtems_test_assert(  !status );
     418  rtems_test_assert( !status );
    419419
    420420  puts( "Init: sigsuspend for any signal" );
    421421  status = sigsuspend( &mask );
    422   rtems_test_assert(  status );
     422  rtems_test_assert( status );
    423423  printf( "Init: awakended from sigsuspend status=%d \n", status );
    424424
     
    430430  if ( status != -1 )
    431431    printf( "status = %d\n", status );
    432   rtems_test_assert(  errno == EINVAL );
     432  rtems_test_assert( errno == EINVAL );
    433433  puts( "Init: sigemptyset - EINVAL (set invalid)" );
    434434
     
    436436  if ( status != -1 )
    437437    printf( "status = %d\n", status );
    438   rtems_test_assert(  errno == EINVAL );
     438  rtems_test_assert( errno == EINVAL );
    439439  puts( "Init: sigfillset - EINVAL (set invalid)" );
    440440
     
    442442  if ( status != -1 )
    443443    printf( "status = %d\n", status );
    444   rtems_test_assert(  errno == EINVAL );
     444  rtems_test_assert( errno == EINVAL );
    445445  puts( "Init: sigaddset - EINVAL (set invalid)" );
    446446
     
    448448  if ( status != -1 )
    449449    printf( "status = %d\n", status );
    450   rtems_test_assert(  errno == EINVAL );
     450  rtems_test_assert( errno == EINVAL );
    451451  puts( "Init: sigaddset - EINVAL (signal = 0)" );
    452452
     
    454454  if ( status != -1 )
    455455    printf( "status = %d\n", status );
    456   rtems_test_assert(  errno == EINVAL );
     456  rtems_test_assert( errno == EINVAL );
    457457  puts( "Init: sigaddset - EINVAL (set invalid)" );
    458458
     
    460460  if ( status != -1 )
    461461    printf( "status = %d\n", status );
    462   rtems_test_assert(  errno == EINVAL );
     462  rtems_test_assert( errno == EINVAL );
    463463  puts( "Init: sigdelset - EINVAL (set invalid)" );
    464464
    465465  status = sigdelset( &mask, 0 );
    466   rtems_test_assert(  !status );
     466  rtems_test_assert( !status );
    467467  puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" );
    468468
     
    470470  if ( status != -1 )
    471471    printf( "status = %d\n", status );
    472   rtems_test_assert(  errno == EINVAL );
     472  rtems_test_assert( errno == EINVAL );
    473473  puts( "Init: sigdelset - EINVAL (set invalid)" );
    474474
     
    476476  if ( status != -1 )
    477477    printf( "status = %d\n", status );
    478   rtems_test_assert(  errno == EINVAL );
     478  rtems_test_assert( errno == EINVAL );
    479479  puts( "Init: sigismember - EINVAL (set invalid)" );
    480480
    481481  status = sigismember( &mask, 0 );
    482   rtems_test_assert(  !status );
     482  rtems_test_assert( !status );
    483483  puts( "Init: sigismember - SUCCESSFUL (signal = 0)" );
    484484
     
    486486  if ( status != -1 )
    487487    printf( "status = %d\n", status );
    488   rtems_test_assert(  errno == EINVAL );
     488  rtems_test_assert( errno == EINVAL );
    489489  puts( "Init: sigismember - EINVAL (signal invalid)" );
    490490
     
    492492  if ( status != -1 )
    493493    printf( "status = %d\n", status );
    494   rtems_test_assert(  errno == EINVAL );
     494  rtems_test_assert( errno == EINVAL );
    495495  puts( "Init: sigaction - EINVAL (signal = 0)" );
    496496
     
    498498  if ( status != -1 )
    499499    printf( "status = %d\n", status );
    500   rtems_test_assert(  errno == EINVAL );
     500  rtems_test_assert( errno == EINVAL );
    501501  puts( "Init: sigaction - EINVAL (signal invalid)" );
    502502
     
    504504  if ( status != -1 )
    505505    printf( "status = %d\n", status );
    506   rtems_test_assert(  errno == EINVAL );
     506  rtems_test_assert( errno == EINVAL );
    507507  puts( "Init: sigaction - EINVAL (SIGKILL)" );
    508508
     
    510510  if ( status != -1 )
    511511    printf( "status = %d\n", status );
    512   rtems_test_assert(  errno == EINVAL );
     512  rtems_test_assert( errno == EINVAL );
    513513  puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" );
    514514
     
    516516  if ( status != -1 )
    517517    printf( "status = %d\n", status );
    518   rtems_test_assert(  errno == EINVAL );
     518  rtems_test_assert( errno == EINVAL );
    519519  puts( "Init: pthread_sigmask - EINVAL (how invalid)" );
    520520
     
    522522  if ( status != -1 )
    523523    printf( "status = %d\n", status );
    524   rtems_test_assert(  errno == EINVAL );
     524  rtems_test_assert( errno == EINVAL );
    525525  puts( "Init: sigpending - EINVAL (set invalid)" );
    526526
     
    529529  if ( status != -1 )
    530530    printf( "status = %d\n", status );
    531   rtems_test_assert(  errno == EINVAL );
     531  rtems_test_assert( errno == EINVAL );
    532532  puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)" );
    533533
     
    536536  if ( status != -1 )
    537537    printf( "status = %d\n", status );
    538   rtems_test_assert(  errno == EINVAL );
     538  rtems_test_assert( errno == EINVAL );
    539539  puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
    540540
     
    542542  if ( status != -1 )
    543543    printf( "status = %d\n", status );
    544   rtems_test_assert(  errno == EINVAL );
     544  rtems_test_assert( errno == EINVAL );
    545545  puts( "Init: pthread_kill - EINVAL (sig invalid)" );
    546546
     
    548548  if ( status != -1 )
    549549    printf( "status = %d\n", status );
    550   rtems_test_assert(  errno == ESRCH );
     550  rtems_test_assert( errno == ESRCH );
    551551  puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" );
    552552
     
    554554  if ( status != -1 )
    555555    printf( "status = %d\n", status );
    556   rtems_test_assert(  errno == EINVAL );
     556  rtems_test_assert( errno == EINVAL );
    557557  puts( "Init: pthread_kill - EINVAL (signal = 0)" );
    558558
     
    561561  sigaction( SIGUSR2, &act, NULL );
    562562  status = pthread_kill( Init_id, SIGUSR2 );
    563   rtems_test_assert(  !status );
     563  rtems_test_assert( !status );
    564564  puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" );
    565565
     
    567567  if ( status != -1 )
    568568    printf( "status = %d\n", status );
    569   rtems_test_assert(  errno == ESRCH );
     569  rtems_test_assert( errno == ESRCH );
    570570  puts( "Init: kill - ESRCH (pid invalid)" );
    571571
     
    573573  if ( status != -1 )
    574574    printf( "status = %d\n", status );
    575   rtems_test_assert(  errno == EINVAL );
     575  rtems_test_assert( errno == EINVAL );
    576576  puts( "Init: kill - EINVAL (signal = 0)" );
    577577
     
    579579  if ( status != -1 )
    580580    printf( "status = %d\n", status );
    581   rtems_test_assert(  errno == EINVAL );
     581  rtems_test_assert( errno == EINVAL );
    582582  puts( "Init: kill - EINVAL (sig invalid)" );
    583583
  • testsuites/psxtests/psx04/task1.c

    r15d5b9a r33c46f1  
    3131  seconds = sleep( 5 );
    3232  printf( "Task_1: %d seconds left\n", seconds );
    33   rtems_test_assert(  seconds );
     33  rtems_test_assert( seconds );
    3434
    3535     /* switch to Init */
  • testsuites/psxtests/psx04/task2.c

    r15d5b9a r33c46f1  
    2929  printf( "Task_2: sending SIGUSR1\n" );
    3030  status = pthread_kill( Init_id, SIGUSR1 );
    31   rtems_test_assert(  !status );
     31  rtems_test_assert( !status );
    3232
    3333     /* switch to Init */
  • testsuites/psxtests/psx04/task3.c

    r15d5b9a r33c46f1  
    3636  printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int );
    3737  status = sigqueue( getpid(), SIGUSR1, value );
    38   rtems_test_assert(  !status );
     38  rtems_test_assert( !status );
    3939
    4040     /* catch signal with sigwaitinfo */
     
    4343
    4444  status = sigemptyset( &mask );
    45   rtems_test_assert(  !status );
     45  rtems_test_assert( !status );
    4646
    4747  status = sigaddset( &mask, SIGUSR1 );
    48   rtems_test_assert(  !status );
     48  rtems_test_assert( !status );
    4949
    5050  printf( "Task_3: sigwaitinfo SIGUSR1 with value= %d\n", value.sival_int );
     
    5353     /* switch to Init */
    5454
    55   rtems_test_assert(  !(status==-1) );
     55  rtems_test_assert( !(status==-1) );
    5656  printf(
    5757    "Task_3: si_signo= %d si_code= %d value= %d\n",
     
    6666
    6767  status = sigemptyset( &mask );
    68   rtems_test_assert(  !status );
     68  rtems_test_assert( !status );
    6969
    7070  status = sigaddset( &mask, SIGUSR1 );
    71   rtems_test_assert(  !status );
     71  rtems_test_assert( !status );
    7272
    7373  printf( "Task_3: sigwait SIGUSR1\n" );
     
    7676     /* switch to Init */
    7777
    78   rtems_test_assert(  !status );
     78  rtems_test_assert( !status );
    7979  printf( "Task_3: signo= %d\n", sig );
    8080
     
    8484
    8585  status = sigemptyset( &mask );
    86   rtems_test_assert(  !status );
     86  rtems_test_assert( !status );
    8787
    8888  status = sigaddset( &mask, SIGUSR1 );
    89   rtems_test_assert(  !status );
     89  rtems_test_assert( !status );
    9090
    9191  printf( "Task_3: pause\n" );
     
    9494     /* switch to Init */
    9595
    96   rtems_test_assert(  !(status==-1) );
     96  rtems_test_assert( !(status==-1) );
    9797  printf( "Task_3: pause= %d\n", status );
    9898
     
    104104  printf( "Task_3: sending SIGUSR2\n" );
    105105  status = pthread_kill( Init_id, SIGUSR2 );
    106   rtems_test_assert(  !status );
     106  rtems_test_assert( !status );
    107107
    108108  printf( "Task_3: sleep so the Init task can reguest a signal\n" );
    109109  remaining = sleep( 1 );
    110   rtems_test_assert(  !status );
     110  rtems_test_assert( !status );
    111111
    112112     /* end of task 3 */
  • testsuites/psxtests/psx05/init.c

    r15d5b9a r33c46f1  
    4343
    4444  status = pthread_mutexattr_getprotocol( attr, &protocol );
    45   rtems_test_assert(  !status );
     45  rtems_test_assert( !status );
    4646
    4747  printf( "%smutex protocol is (%d) -- ", msg, protocol );
     
    5858    default:
    5959      puts( "UNKNOWN" );
    60       rtems_test_assert(  0 );
     60      rtems_test_assert( 0 );
    6161      break;
    6262  }
     
    6565
    6666  status = pthread_mutexattr_getprioceiling( attr, &prioceiling );
    67   rtems_test_assert(  !status );
     67  rtems_test_assert( !status );
    6868  printf( "%smutex priority ceiling is %d\n", msg, prioceiling );
    6969
     
    7171
    7272  status = pthread_mutexattr_getpshared( attr, &pshared );
    73   rtems_test_assert(  !status );
     73  rtems_test_assert( !status );
    7474  printf( "%smutex process shared is (%d) -- ", msg, pshared );
    7575  switch ( pshared ) {
     
    8282    default:
    8383      puts( "UNKNOWN" );
    84       rtems_test_assert(  0 );
     84      rtems_test_assert( 0 );
    8585      break;
    8686  }
     
    124124  int                  priority;
    125125
    126   rtems_test_assert(  MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
     126  rtems_test_assert( MUTEX_BAD_ID != PTHREAD_MUTEX_INITIALIZER );
    127127  Mutex_bad_id = MUTEX_BAD_ID;
    128128
     
    142142  puts( "Init: pthread_mutexattr_init - EINVAL (NULL attr)" );
    143143  status = pthread_mutexattr_init( NULL );
    144   rtems_test_assert(  status == EINVAL );
     144  rtems_test_assert( status == EINVAL );
    145145
    146146  puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
    147147  status = pthread_mutexattr_init( &attr );
    148   rtems_test_assert(  !status );
     148  rtems_test_assert( !status );
    149149
    150150  Print_mutexattr( "Init: ", &attr );
     
    153153
    154154  status = pthread_mutexattr_init( &destroyed_attr );
    155   rtems_test_assert(  !status );
     155  rtems_test_assert( !status );
    156156
    157157  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    158158  status = pthread_mutexattr_destroy( &destroyed_attr );
    159   rtems_test_assert(  !status );
     159  rtems_test_assert( !status );
    160160
    161161  puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" );
    162162  status = pthread_mutexattr_destroy( NULL );
    163   rtems_test_assert(  status == EINVAL );
     163  rtems_test_assert( status == EINVAL );
    164164
    165165  puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
    166166  status = pthread_mutexattr_destroy( &destroyed_attr );
    167   rtems_test_assert(  status == EINVAL );
     167  rtems_test_assert( status == EINVAL );
    168168
    169169  /* error cases for set and get pshared attribute */
     
    173173  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
    174174  status = pthread_mutexattr_getpshared( NULL, &pshared );
    175   rtems_test_assert(  status == EINVAL );
     175  rtems_test_assert( status == EINVAL );
    176176
    177177  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL pshared)" );
    178178  status = pthread_mutexattr_getpshared( &attr, NULL );
    179   rtems_test_assert(  status == EINVAL );
     179  rtems_test_assert( status == EINVAL );
    180180
    181181  puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
    182182  status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
    183   rtems_test_assert(  status == EINVAL );
     183  rtems_test_assert( status == EINVAL );
    184184
    185185  pshared = PTHREAD_PROCESS_PRIVATE;
    186186  puts( "Init: pthread_mutexattr_setpshared - EINVAL (NULL attr)" );
    187187  status = pthread_mutexattr_setpshared( NULL, pshared );
    188   rtems_test_assert(  status == EINVAL );
     188  rtems_test_assert( status == EINVAL );
    189189
    190190  pshared = PTHREAD_PROCESS_PRIVATE;
    191191  puts( "Init: pthread_mutexattr_setpshared - EINVAL (not initialized)" );
    192192  status = pthread_mutexattr_setpshared( &destroyed_attr, pshared );
    193   rtems_test_assert(  status == EINVAL );
     193  rtems_test_assert( status == EINVAL );
    194194
    195195  /* error cases for set and get protocol attribute */
     
    199199  puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL attr)" );
    200200  status = pthread_mutexattr_getprotocol( NULL, &protocol );
    201   rtems_test_assert(  status == EINVAL );
     201  rtems_test_assert( status == EINVAL );
    202202
    203203  puts( "Init: pthread_mutexattr_getprotocol - EINVAL (NULL protocol)" );
    204204  status = pthread_mutexattr_getprotocol( &attr, NULL );
    205   rtems_test_assert(  status == EINVAL );
     205  rtems_test_assert( status == EINVAL );
    206206
    207207  puts( "Init: pthread_mutexattr_getprotocol - EINVAL (not initialized)" );
    208208  status = pthread_mutexattr_getprotocol( &destroyed_attr, &protocol );
    209   rtems_test_assert(  status == EINVAL );
     209  rtems_test_assert( status == EINVAL );
    210210
    211211  puts( "Init: pthread_mutexattr_setprotocol - EINVAL (NULL attr)" );
    212212  status = pthread_mutexattr_setprotocol( NULL, PTHREAD_PRIO_NONE );
    213   rtems_test_assert(  status == EINVAL );
     213  rtems_test_assert( status == EINVAL );
    214214
    215215  puts( "Init: pthread_mutexattr_setprotocol - EINVAL (invalid protocol)" );
    216216  status = pthread_mutexattr_setprotocol( &attr, -1 );
    217   rtems_test_assert(  status == EINVAL );
     217  rtems_test_assert( status == EINVAL );
    218218
    219219  puts( "Init: pthread_mutexattr_setprotocol - EINVAL (not initialized)" );
    220220  status = pthread_mutexattr_setprotocol( &destroyed_attr, -1 );
    221   rtems_test_assert(  status == EINVAL );
     221  rtems_test_assert( status == EINVAL );
    222222
    223223  /* error cases for set and get prioceiling attribute */
     
    227227  puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL attr)" );
    228228  status = pthread_mutexattr_getprioceiling( NULL, &ceiling );
    229   rtems_test_assert(  status == EINVAL );
     229  rtems_test_assert( status == EINVAL );
    230230
    231231  puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (NULL prioceiling)" );
    232232  status = pthread_mutexattr_getprioceiling( &attr, NULL );
    233   rtems_test_assert(  status == EINVAL );
     233  rtems_test_assert( status == EINVAL );
    234234
    235235  puts( "Init: pthread_mutexattr_getprioceiling - EINVAL (not initialized)" );
    236236  status = pthread_mutexattr_getprioceiling( &destroyed_attr, &ceiling );
    237   rtems_test_assert(  status == EINVAL );
     237  rtems_test_assert( status == EINVAL );
    238238
    239239  puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (NULL attr)" );
    240240  status = pthread_mutexattr_setprioceiling( NULL, 128 );
    241   rtems_test_assert(  status == EINVAL );
     241  rtems_test_assert( status == EINVAL );
    242242
    243243  puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (invalid priority)" );
     
    245245  if ( status != EINVAL )
    246246    printf( "status = %d\n", status );
    247   rtems_test_assert(  status == EINVAL );
     247  rtems_test_assert( status == EINVAL );
    248248
    249249  puts( "Init: pthread_mutexattr_setprioceiling - EINVAL (not initialized)" );
    250250  status = pthread_mutexattr_setprioceiling( &destroyed_attr, -1 );
    251   rtems_test_assert(  status == EINVAL );
     251  rtems_test_assert( status == EINVAL );
    252252
    253253  /* create a thread */
    254254
    255255  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    256   rtems_test_assert(  !status );
     256  rtems_test_assert( !status );
    257257
    258258  /* now try some basic mutex operations */
     
    262262  puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" );
    263263  status = pthread_mutex_init( NULL, &attr );
    264   rtems_test_assert(  status == EINVAL );
     264  rtems_test_assert( status == EINVAL );
    265265
    266266  puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" );
    267267  status = pthread_mutex_init( &Mutex_id, &destroyed_attr );
    268   rtems_test_assert(  status == EINVAL );
     268  rtems_test_assert( status == EINVAL );
    269269
    270270  /* must get around error checks in attribute set routines */
     
    273273  puts( "Init: pthread_mutex_init - EINVAL (bad protocol)" );
    274274  status = pthread_mutex_init( &Mutex_id, &attr );
    275   rtems_test_assert(  status == EINVAL );
     275  rtems_test_assert( status == EINVAL );
    276276
    277277  /* must get around error checks in attribute set routines */
     
    281281  puts( "Init: pthread_mutex_init - EINVAL (bad priority ceiling)" );
    282282  status = pthread_mutex_init( &Mutex_id, &attr );
    283   rtems_test_assert(  status == EINVAL );
     283  rtems_test_assert( status == EINVAL );
    284284
    285285  /* must get around various error checks before checking bad scope */
    286286  puts( "Init: Resetting mutex attributes" );
    287287  status = pthread_mutexattr_init( &attr );
    288   rtems_test_assert(  !status );
     288  rtems_test_assert( !status );
    289289
    290290  puts( "Init: pthread_mutex_init - ENOSYS (process wide scope)" );
    291291  attr.process_shared = PTHREAD_PROCESS_SHARED;
    292292  status = pthread_mutex_init( &Mutex_id, &attr );
    293   rtems_test_assert(  status == ENOSYS );
     293  rtems_test_assert( status == ENOSYS );
    294294
    295295  puts( "Init: pthread_mutex_init - EINVAL (invalid scope)" );
    296296  attr.process_shared = -1;
    297297  status = pthread_mutex_init( &Mutex_id, &attr );
    298   rtems_test_assert(  status == EINVAL );
     298  rtems_test_assert( status == EINVAL );
    299299
    300300  /* bad kind */
    301301  status = pthread_mutexattr_init( &attr );
    302   rtems_test_assert(  !status );
     302  rtems_test_assert( !status );
    303303
    304304  puts( "Init: pthread_mutex_init - EINVAL (invalid type)" );
    305305  attr.type = -1;
    306306  status = pthread_mutex_init( &Mutex_id, &attr );
    307   rtems_test_assert(  status == EINVAL );
     307  rtems_test_assert( status == EINVAL );
    308308
    309309  /* now set up for a success pthread_mutex_init */
     
    311311  puts( "Init: Resetting mutex attributes" );
    312312  status = pthread_mutexattr_init( &attr );
    313   rtems_test_assert(  !status );
     313  rtems_test_assert( !status );
    314314
    315315  puts( "Init: Changing mutex attributes" );
    316316  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    317   rtems_test_assert(  !status );
     317  rtems_test_assert( !status );
    318318
    319319  status = pthread_mutexattr_setprioceiling(
     
    321321    (sched_get_priority_max(SCHED_FIFO) / 2) + 1
    322322  );
    323   rtems_test_assert(  !status );
     323  rtems_test_assert( !status );
    324324
    325325  status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    326   rtems_test_assert(  !status );
     326  rtems_test_assert( !status );
    327327
    328328  Print_mutexattr( "Init: ", &attr );
     
    330330  puts( "Init: Resetting mutex attributes" );
    331331  status = pthread_mutexattr_init( &attr );
    332   rtems_test_assert(  !status );
     332  rtems_test_assert( !status );
    333333
    334334  /*
     
    338338
    339339  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    340   rtems_test_assert(  !status );
     340  rtems_test_assert( !status );
    341341
    342342  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
     
    344344  if ( status )
    345345    printf( "status = %d\n", status );
    346   rtems_test_assert(  !status );
     346  rtems_test_assert( !status );
    347347
    348348  /*
     
    356356  if ( !status )
    357357    printf( "status = %d\n", status );
    358   rtems_test_assert(  status == EBUSY );
     358  rtems_test_assert( status == EBUSY );
    359359#endif
    360360
     
    363363  if ( status != EINVAL )
    364364    printf( "status = %d\n", status );
    365   rtems_test_assert(  status == EINVAL );
     365  rtems_test_assert( status == EINVAL );
    366366
    367367  puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
     
    369369  if ( status )
    370370    printf( "status = %d\n", status );
    371   rtems_test_assert(  !status );
     371  rtems_test_assert( !status );
    372372
    373373  puts( "Init: pthread_mutex_trylock - EDEADLK (already locked)" );
     
    375375  if ( status != EDEADLK )
    376376    printf( "status = %d\n", status );
    377   rtems_test_assert(  status == EDEADLK );
     377  rtems_test_assert( status == EDEADLK );
    378378
    379379  puts( "Init: pthread_mutex_lock - EINVAL (NULL id)" );
     
    381381  if ( status != EINVAL )
    382382    printf( "status = %d\n", status );
    383   rtems_test_assert(  status == EINVAL );
     383  rtems_test_assert( status == EINVAL );
    384384
    385385  puts( "Init: pthread_mutex_unlock - EINVAL (NULL id)" );
     
    387387  if ( status != EINVAL )
    388388    printf( "status = %d\n", status );
    389   rtems_test_assert(  status == EINVAL );
     389  rtems_test_assert( status == EINVAL );
    390390
    391391  puts( "Init: pthread_mutex_lock - EDEADLK (already locked)" );
     
    393393  if ( status != EDEADLK )
    394394    printf( "status = %d\n", status );
    395   rtems_test_assert(  status == EDEADLK );
     395  rtems_test_assert( status == EDEADLK );
    396396
    397397  puts( "Init: Sleep 1 second" );
     
    405405  if ( status != EINVAL )
    406406    printf( "status = %d\n", status );
    407   rtems_test_assert(  status == EINVAL );
     407  rtems_test_assert( status == EINVAL );
    408408
    409409  puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
     
    411411  if ( status )
    412412    printf( "status = %d\n", status );
    413   rtems_test_assert(  !status );
     413  rtems_test_assert( !status );
    414414
    415415  puts( "Init: pthread_mutex_unlock - EPERM (not owner)" );
     
    417417  if ( status != EPERM )
    418418    printf( "status = %d\n", status );
    419   rtems_test_assert(  status == EPERM );
     419  rtems_test_assert( status == EPERM );
    420420
    421421  puts( "Init: pthread_mutex_timedlock - time out in 1/2 second" );
     
    425425  if ( status != ETIMEDOUT )
    426426    printf( "status = %d\n", status );
    427   rtems_test_assert(  status == ETIMEDOUT );
     427  rtems_test_assert( status == ETIMEDOUT );
    428428
    429429  puts( "Init: pthread_mutex_timedlock - time out in the past" );
     
    433433  if ( status != EBUSY )
    434434    printf( "status = %d\n", status );
    435   rtems_test_assert(  status == EBUSY );
     435  rtems_test_assert( status == EBUSY );
    436436
    437437     /* switch to idle */
     
    447447  if ( status )
    448448    printf( "status = %d\n", status );
    449   rtems_test_assert(  !status );
     449  rtems_test_assert( !status );
    450450
    451451  puts( "Init: pthread_mutex_init - EAGAIN (too many)" );
    452452  status = pthread_mutex_init( &Mutex3_id, &attr );
    453   rtems_test_assert(  status == EAGAIN );
     453  rtems_test_assert( status == EAGAIN );
    454454
    455455  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    456456  status = pthread_mutexattr_destroy( &attr );
    457   rtems_test_assert(  !status );
     457  rtems_test_assert( !status );
    458458
    459459  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    460460  status = pthread_mutex_destroy( &Mutex2_id );
    461   rtems_test_assert(  !status );
     461  rtems_test_assert( !status );
    462462
    463463  puts( "Init: pthread_mutex_destroy - EINVAL (invalid id)" );
    464464  status = pthread_mutex_destroy( &Mutex_bad_id );
    465   rtems_test_assert(  status == EINVAL );
     465  rtems_test_assert( status == EINVAL );
    466466
    467467  /* destroy a busy mutex */
     
    471471  puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
    472472  status = pthread_mutexattr_init( &attr );
    473   rtems_test_assert(  !status );
     473  rtems_test_assert( !status );
    474474
    475475  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    476476  status = pthread_mutex_init( &Mutex2_id, &attr );
    477   rtems_test_assert(  !status );
     477  rtems_test_assert( !status );
    478478
    479479  puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
     
    481481  if ( status )
    482482    printf( "status = %d\n", status );
    483   rtems_test_assert(  !status );
     483  rtems_test_assert( !status );
    484484
    485485  puts( "Init: pthread_mutex_destroy - EBUSY (already locked)" );
     
    487487  if ( status != EBUSY )
    488488    printf( "status = %d\n", status );
    489   rtems_test_assert(  status == EBUSY );
     489  rtems_test_assert( status == EBUSY );
    490490
    491491  puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
    492492  status = pthread_mutex_unlock( &Mutex2_id );
    493   rtems_test_assert(  !status );
     493  rtems_test_assert( !status );
    494494
    495495  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    496496  status = pthread_mutex_destroy( &Mutex2_id );
    497   rtems_test_assert(  !status );
     497  rtems_test_assert( !status );
    498498
    499499  /* priority inherit mutex */
     
    503503  puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
    504504  status = pthread_mutexattr_init( &attr );
    505   rtems_test_assert(  !status );
     505  rtems_test_assert( !status );
    506506
    507507  puts(
     
    509509  );
    510510  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    511   rtems_test_assert(  !status );
     511  rtems_test_assert( !status );
    512512
    513513  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    514514  status = pthread_mutex_init( &Mutex2_id, &attr );
    515   rtems_test_assert(  !status );
     515  rtems_test_assert( !status );
    516516
    517517  puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
    518518  status = pthread_mutex_trylock( &Mutex2_id );
    519   rtems_test_assert(  !status );
     519  rtems_test_assert( !status );
    520520
    521521  /* create a thread at a lower priority */
    522522
    523523  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    524   rtems_test_assert(  !status );
     524  rtems_test_assert( !status );
    525525
    526526  /* set priority of Task2 to highest priority */
     
    530530  puts( "Init: pthread_setschedparam - Setting Task2 priority to highest" );
    531531  status = pthread_setschedparam( Task2_id, SCHED_FIFO, &param );
    532   rtems_test_assert(  !status );
     532  rtems_test_assert( !status );
    533533
    534534  /* switching to Task2 */
    535535
    536536  status = pthread_getschedparam( pthread_self(), &policy, &param );
    537   rtems_test_assert(  !status );
     537  rtems_test_assert( !status );
    538538  printf( "Init: pthread_getschedparam - priority = %d\n", param.sched_priority);
    539539
    540540  puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
    541541  status = pthread_mutex_unlock( &Mutex2_id );
    542   rtems_test_assert(  !status );
     542  rtems_test_assert( !status );
    543543
    544544  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    545545  status = pthread_mutexattr_destroy( &attr );
    546   rtems_test_assert(  !status );
     546  rtems_test_assert( !status );
    547547
    548548  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    549549  status = pthread_mutex_destroy( &Mutex2_id );
    550   rtems_test_assert(  !status );
     550  rtems_test_assert( !status );
    551551
    552552  /* priority ceiling mutex */
     
    556556  puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
    557557  status = pthread_mutexattr_init( &attr );
    558   rtems_test_assert(  !status );
     558  rtems_test_assert( !status );
    559559
    560560  puts(
     
    562562  );
    563563  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
    564   rtems_test_assert(  !status );
     564  rtems_test_assert( !status );
    565565
    566566  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    567567  status = pthread_mutex_init( &Mutex2_id, &attr );
    568   rtems_test_assert(  !status );
     568  rtems_test_assert( !status );
    569569
    570570  puts( "Init: pthread_mutex_getprioceiling - EINVAL (invalid id)" );
    571571  status = pthread_mutex_getprioceiling( &Mutex_bad_id, &ceiling );
    572   rtems_test_assert(  status == EINVAL );
     572  rtems_test_assert( status == EINVAL );
    573573
    574574  puts( "Init: pthread_mutex_getprioceiling - EINVAL (NULL ceiling)" );
    575575  status = pthread_mutex_getprioceiling( &Mutex2_id, NULL );
    576   rtems_test_assert(  status == EINVAL );
     576  rtems_test_assert( status == EINVAL );
    577577
    578578  status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
    579   rtems_test_assert(  !status );
     579  rtems_test_assert( !status );
    580580  printf( "Init: pthread_mutex_getprioceiling - %d\n", ceiling );
    581581
    582582  puts( "Init: pthread_mutex_setprioceiling - EINVAL (invalid id)" );
    583583  status = pthread_mutex_setprioceiling( &Mutex_bad_id, 200, &old_ceiling );
    584   rtems_test_assert(  status == EINVAL );
     584  rtems_test_assert( status == EINVAL );
    585585
    586586  puts( "Init: pthread_mutex_setprioceiling - EINVAL (illegal priority)" );
    587587  status = pthread_mutex_setprioceiling( &Mutex2_id, 512, &old_ceiling );
    588   rtems_test_assert(  status == EINVAL );
     588  rtems_test_assert( status == EINVAL );
    589589
    590590  puts( "Init: pthread_mutex_setprioceiling - EINVAL (NULL ceiling)" );
    591591  status = pthread_mutex_setprioceiling( &Mutex2_id, 128, NULL );
    592   rtems_test_assert(  status == EINVAL );
     592  rtems_test_assert( status == EINVAL );
    593593
    594594  /* normal cases of set priority ceiling */
     
    599599  printf( "Init: pthread_mutex_setprioceiling - new ceiling = %d\n", priority );
    600600  status = pthread_mutex_setprioceiling( &Mutex2_id, priority, &old_ceiling );
    601   rtems_test_assert(  !status );
     601  rtems_test_assert( !status );
    602602  printf(
    603603    "Init: pthread_mutex_setprioceiling - old ceiling = %d\n",old_ceiling
     
    605605
    606606  status = pthread_getschedparam( pthread_self(), &policy, &param );
    607   rtems_test_assert(  !status );
     607  rtems_test_assert( !status );
    608608  printf(
    609609    "Init: pthread_getschedparam - priority = %d\n", param.sched_priority
     
    612612  puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
    613613  status = pthread_mutex_trylock( &Mutex2_id );
    614   rtems_test_assert(  !status );
     614  rtems_test_assert( !status );
    615615
    616616  status = pthread_getschedparam( pthread_self(), &policy, &param );
    617   rtems_test_assert(  !status );
     617  rtems_test_assert( !status );
    618618  printf(
    619619    "Init: pthread_getschedparam - priority = %d\n", param.sched_priority
     
    623623
    624624  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
    625   rtems_test_assert(  !status );
     625  rtems_test_assert( !status );
    626626
    627627  /* set priority of Task3 to highest priority */
     
    630630
    631631  status = pthread_setschedparam( Task3_id, SCHED_FIFO, &param );
    632   rtems_test_assert(  !status );
     632  rtems_test_assert( !status );
    633633  puts( "Init: pthread_setschedparam - set Task3 priority to highest" );
    634634
     
    636636
    637637  puts( "Init: Sleep 1 second" );
    638   rtems_test_assert(  !status );
     638  rtems_test_assert( !status );
    639639  sleep( 1 );
    640640
     
    643643  puts( "Init: pthread_mutex_unlock - SUCCESSFUL" );
    644644  status = pthread_mutex_unlock( &Mutex2_id );
    645   rtems_test_assert(  !status );
     645  rtems_test_assert( !status );
    646646
    647647  status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
    648   rtems_test_assert(  !status );
     648  rtems_test_assert( !status );
    649649  printf( "Init: pthread_mutex_getprioceiling- ceiling = %d\n", ceiling );
    650650
     
    654654
    655655  status = pthread_setschedparam( Init_id, SCHED_FIFO, &param );
    656   rtems_test_assert(  !status );
     656  rtems_test_assert( !status );
    657657  puts( "Init: pthread_setschedparam - set Init priority to highest" );
    658658
     
    661661  if ( status != EINVAL )
    662662    printf( "status = %d\n", status );
    663   rtems_test_assert(  status == EINVAL );
     663  rtems_test_assert( status == EINVAL );
    664664
    665665  /* mutexinit.c: Initialising recursive mutex */
     
    679679  if ( status )
    680680    printf( "status recursive mutex :%d\n", status );
    681   rtems_test_assert(  !status );
     681  rtems_test_assert( !status );
    682682
    683683  puts( "*** END OF POSIX TEST 5 ***" );
  • testsuites/psxtests/psx05/task.c

    r15d5b9a r33c46f1  
    3232  if ( status != EBUSY )
    3333    printf( "status = %d\n", status );
    34   rtems_test_assert(  status == EBUSY );
     34  rtems_test_assert( status == EBUSY );
    3535
    3636  printf( "Task: pthread_mutex_lock unavailable\n" );
     
    3838  if ( status )
    3939    printf( "status = %d\n", status );
    40   rtems_test_assert(  !status );
     40  rtems_test_assert( !status );
    4141
    4242     /* switch to init */
  • testsuites/psxtests/psx05/task2.c

    r15d5b9a r33c46f1  
    3131  if ( status )
    3232    printf( "status =%d\n", status );
    33   rtems_test_assert(  !status );
     33  rtems_test_assert( !status );
    3434  printf( "Task 2: mutex acquired\n" );
    3535
     
    3838  printf( "Task 2: unlock Mutex 2\n" );
    3939  status = pthread_mutex_unlock( &Mutex2_id );
    40   rtems_test_assert(  !status );
     40  rtems_test_assert( !status );
    4141
    4242  printf( "Task 2: exit\n" );
  • testsuites/psxtests/psx05/task3.c

    r15d5b9a r33c46f1  
    3232  status = pthread_mutex_lock( &Mutex2_id );
    3333  printf( "Task 3: mutex acquired\n" );
    34   rtems_test_assert(  !status );
     34  rtems_test_assert( !status );
    3535
    3636  printf( "Task 3: unlock Mutex 2\n" );
    3737  status = pthread_mutex_unlock( &Mutex2_id );
    38   rtems_test_assert(  !status );
     38  rtems_test_assert( !status );
    3939
    4040  status = pthread_getschedparam( pthread_self(), &policy, &param );
    41   rtems_test_assert(  !status );
     41  rtems_test_assert( !status );
    4242  printf( "Task 3: pthread_getschedparam priority = %d\n", param.sched_priority );
    4343
  • testsuites/psxtests/psx06/init.c

    r15d5b9a r33c46f1  
    5353
    5454  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    55   rtems_test_assert(  !status );
     55  rtems_test_assert( !status );
    5656
    5757  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    58   rtems_test_assert(  !status );
     58  rtems_test_assert( !status );
    5959
    6060  /* create a key */
     
    6767  if ( status )
    6868    printf( "status = %d\n", status );
    69   rtems_test_assert(  !status );
     69  rtems_test_assert( !status );
    7070
    7171  printf( "Destructor invoked %d times\n", Destructor_invoked );
     
    7373  puts( "Init: pthread_key_create - EAGAIN (too many keys)" );
    7474  status = pthread_key_create( &Key_id, Key_destructor );
    75   rtems_test_assert(  status == EAGAIN );
     75  rtems_test_assert( status == EAGAIN );
    7676
    7777  puts( "Init: pthread_setspecific - EINVAL (invalid key)" );
    7878  status = pthread_setspecific( (pthread_t) -1, &Data_array[ 0 ] );
    79   rtems_test_assert(  status == EINVAL );
     79  rtems_test_assert( status == EINVAL );
    8080
    8181  puts( "Init: pthread_getspecific - EINVAL (invalid key)" );
    8282  key_data = pthread_getspecific( (pthread_t) -1 );
    83   rtems_test_assert(  !key_data );
     83  rtems_test_assert( !key_data );
    8484
    8585  puts( "Init: pthread_key_delete - EINVAL (invalid key)" );
    8686  status = pthread_key_delete( (pthread_t) -1 );
    87   rtems_test_assert(  status == EINVAL );
     87  rtems_test_assert( status == EINVAL );
    8888
    8989  printf( "Init: Setting the key to %d\n", 0 );
     
    9191  if ( status )
    9292    printf( "status = %d\n", status );
    93   rtems_test_assert(  !status );
     93  rtems_test_assert( !status );
    9494
    9595     /* switch to task 1 */
     
    102102  if ( remaining )
    103103     printf( "seconds remaining = %d\n", remaining );
    104   rtems_test_assert(  !remaining );
     104  rtems_test_assert( !remaining );
    105105
    106106     /* switch to task 1 */
     
    112112  if ( status )
    113113    printf( "status = %d\n", status );
    114   rtems_test_assert(  !status );
     114  rtems_test_assert( !status );
    115115
    116116  printf( "Destructor invoked %d times\n", Destructor_invoked );
  • testsuites/psxtests/psx06/task.c

    r15d5b9a r33c46f1  
    3333  if ( status )
    3434    printf( "status = %d\n", status );
    35   rtems_test_assert(  !status );
     35  rtems_test_assert( !status );
    3636
    3737  key_data = pthread_getspecific( Key_id );
     
    4040  if ( status )
    4141    printf( "status = %d\n", status );
    42   rtems_test_assert(  !status );
     42  rtems_test_assert( !status );
    4343
    4444  puts( "Task_1: exitting" );
  • testsuites/psxtests/psx06/task2.c

    r15d5b9a r33c46f1  
    3434  if ( status )
    3535    printf( "status = %d\n", status );
    36   rtems_test_assert(  !status );
     36  rtems_test_assert( !status );
    3737
    3838  key_data = pthread_getspecific( Key_id );
     
    4141  if ( status )
    4242    printf( "status = %d\n", status );
    43   rtems_test_assert(  !status );
     43  rtems_test_assert( !status );
    4444
    4545  puts( "Task2: exitting" );
  • testsuites/psxtests/psx07/init.c

    r15d5b9a r33c46f1  
    686686
    687687  status = pthread_create( &Task2_id, &attr, Task_2, NULL );
    688   rtems_test_assert(  !status );
     688  rtems_test_assert( !status );
    689689
    690690  status = pthread_join( Task2_id, NULL );
  • testsuites/psxtests/psx08/init.c

    r15d5b9a r33c46f1  
    3434  puts( "Init: pthread_detach - ESRCH (invalid id)" );
    3535  status = pthread_detach( (pthread_t) -1 );
    36   rtems_test_assert(  status == ESRCH );
     36  rtems_test_assert( status == ESRCH );
    3737
    3838  /* detach this thread */
     
    4040  puts( "Init: pthread_detach self" );
    4141  status = pthread_detach( pthread_self() );
    42   rtems_test_assert(  !status );
     42  rtems_test_assert( !status );
    4343
    4444  /* create thread */
    4545
    4646  status = pthread_create( &Task1_id, NULL, Task_1, NULL );
    47   rtems_test_assert(  !status );
     47  rtems_test_assert( !status );
    4848
    4949  puts( "Init: pthread_join - ESRCH (invalid id)" );
    5050  status = pthread_join( (pthread_t) -1, &return_pointer );
    51   rtems_test_assert(  status == ESRCH );
     51  rtems_test_assert( status == ESRCH );
    5252
    5353  puts( "Init: pthread_join - SUCCESSFUL" );
     
    5757  if ( status )
    5858    printf( "status = %d\n", status );
    59   rtems_test_assert(  !status );
     59  rtems_test_assert( !status );
    6060
    6161  if ( return_pointer == &Task1_id )
     
    7070  puts( "Init: creating two pthreads" );
    7171  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    72   rtems_test_assert(  !status );
     72  rtems_test_assert( !status );
    7373
    7474  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
    75   rtems_test_assert(  !status );
     75  rtems_test_assert( !status );
    7676
    7777  puts( "Init: pthread_join - SUCCESSFUL" );
     
    8282  if ( status )
    8383    printf( "status = %d\n", status );
    84   rtems_test_assert(  !status );
     84  rtems_test_assert( !status );
    8585
    8686  if ( return_pointer == &Task2_id )
  • testsuites/psxtests/psx08/task2.c

    r15d5b9a r33c46f1  
    3838  if ( status != EINVAL )
    3939    printf( "status = %d\n", status );
    40   rtems_test_assert(  status == EINVAL );
     40  rtems_test_assert( status == EINVAL );
    4141
    4242  puts( "Task_2: join to self task (Init) -- EDEADLK" );
     
    4444  if ( status != EDEADLK )
    4545    printf( "status = %d\n", status );
    46   rtems_test_assert(  status == EDEADLK );
     46  rtems_test_assert( status == EDEADLK );
    4747
    4848  puts( "Task_2: exitting" );
  • testsuites/psxtests/psx08/task3.c

    r15d5b9a r33c46f1  
    3434  if ( status )
    3535    printf( "status = %d\n", status );
    36   rtems_test_assert(  !status );
     36  rtems_test_assert( !status );
    3737
    3838  if ( return_pointer == &Task2_id )
  • testsuites/psxtests/psx09/init.c

    r15d5b9a r33c46f1  
    7474  puts( "Init: pthread_getschedparam - SUCCESSFUL" );
    7575  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    76   rtems_test_assert(  !status );
     76  rtems_test_assert( !status );
    7777
    7878  priority = schedparam.sched_priority;
     
    9090  puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
    9191  status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
    92   rtems_test_assert(  !status );
    93 
    94   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    95   rtems_test_assert(  !status );
     92  rtems_test_assert( !status );
     93
     94  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     95  rtems_test_assert( !status );
    9696
    9797  priority = schedparam.sched_priority;
     
    103103  for ( passes=0 ; passes <= 3 ; ) {
    104104    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    105     rtems_test_assert(  !status );
     105    rtems_test_assert( !status );
    106106
    107107    if ( priority != schedparam.sched_priority ) {
     
    118118
    119119  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    120   rtems_test_assert(  !status );
     120  rtems_test_assert( !status );
    121121
    122122  schedparam.sched_ss_repl_period.tv_sec = 0;
     
    134134  puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
    135135  status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
    136   rtems_test_assert(  !status );
     136  rtems_test_assert( !status );
    137137
    138138  puts( "Init: Initializing mutex attributes for priority ceiling" );
    139139  status = pthread_mutexattr_init( &attr );
    140   rtems_test_assert(  !status );
     140  rtems_test_assert( !status );
    141141
    142142  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    143   rtems_test_assert(  !status );
     143  rtems_test_assert( !status );
    144144
    145145  puts( "Init: Creating a mutex" );
     
    147147  if ( status )
    148148    printf( "status = %d\n", status );
    149   rtems_test_assert(  !status );
    150 
    151   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    152   rtems_test_assert(  !status );
     149  rtems_test_assert( !status );
     150
     151  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     152  rtems_test_assert( !status );
    153153
    154154  priority = schedparam.sched_priority;
     
    164164  if ( status )
    165165    printf( "status = %d %s\n", status, strerror(status) );
    166   rtems_test_assert(  !status );
     166  rtems_test_assert( !status );
    167167
    168168  for ( ; ; ) {
    169169    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    170     rtems_test_assert(  !status );
     170    rtems_test_assert( !status );
    171171
    172172    if ( schedparam.sched_priority == LOW_PRIORITY ) {
     
    184184
    185185    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    186     rtems_test_assert(  !status );
     186    rtems_test_assert( !status );
    187187
    188188    priority = schedparam.sched_priority;
     
    199199  if ( status )
    200200    printf( "status = %d\n", status );
    201   rtems_test_assert(  !status );
    202 
    203   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    204   rtems_test_assert(  !status );
     201  rtems_test_assert( !status );
     202
     203  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     204  rtems_test_assert( !status );
    205205
    206206  priority = schedparam.sched_priority;
     
    210210  for ( ; ; ) {
    211211    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    212     rtems_test_assert(  !status );
     212    rtems_test_assert( !status );
    213213
    214214    if ( schedparam.sched_priority == LOW_PRIORITY )
     
    217217
    218218  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    219   rtems_test_assert(  !status );
     219  rtems_test_assert( !status );
    220220
    221221  priority = schedparam.sched_priority;
  • testsuites/psxtests/psx10/init.c

    r15d5b9a r33c46f1  
    3030  puts( "Init: pthread_condattr_init" );
    3131  status = pthread_condattr_init( &attr );
    32   rtems_test_assert(  !status );
     32  rtems_test_assert( !status );
    3333
    3434  puts( "Init: pthread_condattr_init - EINVAL (attribute invalid)" );
     
    3636  if ( status != EINVAL )
    3737    printf( "status = %d\n", status );
    38   rtems_test_assert(  status == EINVAL );
     38  rtems_test_assert( status == EINVAL );
    3939
    4040  puts( "Init: pthread_condattr_destroy" );
    4141  status = pthread_condattr_destroy( &attr );
    42   rtems_test_assert(  !status );
     42  rtems_test_assert( !status );
    4343
    4444  puts( "Init: pthread_condattr_destroy - EINVAL (attribute invalid)" );
     
    4646  if ( status != EINVAL )
    4747    printf( "status = %d\n", status );
    48   rtems_test_assert(  status == EINVAL );
     48  rtems_test_assert( status == EINVAL );
    4949
    5050  puts( "Init: pthread_condattr_init" );
    5151  status = pthread_condattr_init( &attr );
    52   rtems_test_assert(  !status );
     52  rtems_test_assert( !status );
    5353
    5454  puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED" );
    5555  status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    56   rtems_test_assert(  !status );
     56  rtems_test_assert( !status );
    5757
    5858  puts( "Init: pthread_condattr_setpshared - PTHREAD_PROCESS_PRIVATE" );
    5959  status = pthread_condattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
    60   rtems_test_assert(  !status );
     60  rtems_test_assert( !status );
    6161
    6262  status = pthread_condattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
    6363  if ( status != EINVAL )
    6464    printf( "status = %d\n", status );
    65   rtems_test_assert(  status == EINVAL );
     65  rtems_test_assert( status == EINVAL );
    6666  puts( "Init: pthread_condattr_setpshared - EINVAL (attribute invalid)" );
    6767
     
    6969  if ( status != EINVAL )
    7070    printf( "status = %d\n", status );
    71   rtems_test_assert(  status == EINVAL );
     71  rtems_test_assert( status == EINVAL );
    7272  puts( "Init: pthread_condattr_setpshared - EINVAL (pshared invalid)" );
    7373
    7474  status = pthread_condattr_getpshared( &attr, &pshared );
    75   rtems_test_assert(  !status );
     75  rtems_test_assert( !status );
    7676  printf( "Init: pthread_condattr_getpshared - %d\n", pshared );
    7777
     
    7979  if ( status != EINVAL )
    8080    printf( "status = %d\n", status );
    81   rtems_test_assert(  status == EINVAL );
     81  rtems_test_assert( status == EINVAL );
    8282  puts( "Init: pthread_condattr_getpshared - EINVAL (attribute invalid)" );
    8383
    8484  puts( "Init: pthread_cond_init - NULL attr" );
    8585  status = pthread_cond_init( &cond, NULL );
    86   rtems_test_assert(  !status );
     86  rtems_test_assert( !status );
    8787
    8888/* error for attribute not initialized */
     
    9292  if ( status != EINVAL )
    9393    printf( "status = %d\n", status );
    94   rtems_test_assert(  status == EINVAL );
     94  rtems_test_assert( status == EINVAL );
    9595  puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
    9696
     
    9898  if ( status != ENOMEM )
    9999    printf( "status = %d\n", status );
    100   rtems_test_assert(  status == ENOMEM );
     100  rtems_test_assert( status == ENOMEM );
    101101  puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
    102102
    103103  puts( "Init: pthread_cond_destroy" );
    104104  status = pthread_cond_destroy( &cond );
    105   rtems_test_assert(  !status );
     105  rtems_test_assert( !status );
    106106
    107107/* error for bad condition variable passed */
     
    110110  if ( status != EINVAL )
    111111    printf( "status = %d\n", status );
    112   rtems_test_assert(  status == EINVAL );
     112  rtems_test_assert( status == EINVAL );
    113113  puts( "Init: pthread_cond_destroy - EINVAL (cond invalid)" );
    114114
     
    117117  puts( "Init: pthread_cond_init - attr" );
    118118  status = pthread_cond_init( &Cond1_id, &attr );
    119   rtems_test_assert(  !status );
     119  rtems_test_assert( !status );
    120120
    121121/* signal task1 with a condition variable */
     
    124124
    125125  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    126   rtems_test_assert(  !status );
     126  rtems_test_assert( !status );
    127127
    128128/* switch to task1 to allow it to wait for a condition variable */
     
    134134  if ( status != EBUSY )
    135135    printf( "status = %d\n", status );
    136   rtems_test_assert(  status == EBUSY );
     136  rtems_test_assert( status == EBUSY );
    137137  puts( "Init: pthread_cond_destroy - EBUSY (task1 waiting)" );
    138138
    139139  puts( "Init: pthread_cond_signal" );
    140140  status = pthread_cond_signal( &Cond1_id );
    141   rtems_test_assert(  !status );
     141  rtems_test_assert( !status );
    142142
    143143  empty_line();
    144144
    145145  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    146   rtems_test_assert(  !status );
     146  rtems_test_assert( !status );
    147147
    148148/* switch to task1 and task2 to allow them to wait for broadcast signal */
     
    155155  puts( "Init: pthread_cond_broadcast" );
    156156  status = pthread_cond_broadcast( &Cond1_id );
    157   rtems_test_assert(  !status );
     157  rtems_test_assert( !status );
    158158
    159159  puts( "Init: sleep - switch to Task_1" );
     
    163163
    164164  status = pthread_mutex_lock( &Mutex_id );
    165   rtems_test_assert(  !status );
     165  rtems_test_assert( !status );
    166166
    167167/* set timeout to 3 seconds */
    168168
    169169  status = clock_gettime( CLOCK_REALTIME, &timeout );
    170   rtems_test_assert(  !status );
     170  rtems_test_assert( !status );
    171171  timeout.tv_sec += 3;
    172172  timeout.tv_nsec = 0;
     
    176176  if ( status != ETIMEDOUT )
    177177    printf( "status = %d\n", status );
    178   rtems_test_assert(  status == ETIMEDOUT );
     178  rtems_test_assert( status == ETIMEDOUT );
    179179  puts( "Init: pthread_cond_timedwait - ETIMEDOUT - (mutex not acquired)" );
    180180
    181181  status = pthread_mutex_unlock( &Mutex_id );
    182   rtems_test_assert(  !status );
     182  rtems_test_assert( !status );
    183183
    184184/* remaining error messages */
     
    191191  if ( status != EINVAL )
    192192    printf( "status = %d\n", status );
    193   rtems_test_assert(  status == EINVAL );
     193  rtems_test_assert( status == EINVAL );
    194194  puts( "Init: pthread_cond_signal - EINVAL (cond invalid)" );
    195195
     
    197197  if ( status != EINVAL )
    198198    printf( "status = %d\n", status );
    199   rtems_test_assert(  status == EINVAL );
     199  rtems_test_assert( status == EINVAL );
    200200  puts( "Init: pthread_cond_broadcast - EINVAL (cond invalid)" );
    201201
     
    203203
    204204  status = pthread_mutex_lock( &Mutex_id );
    205   rtems_test_assert(  !status );
     205  rtems_test_assert( !status );
    206206
    207207  status = pthread_cond_wait( NULL, &Mutex_id );
    208208  if ( status != EINVAL )
    209209    printf( "status = %d\n", status );
    210   rtems_test_assert(  status == EINVAL );
     210  rtems_test_assert( status == EINVAL );
    211211  puts( "Init: pthread_cond_wait - EINVAL (cond invalid)" );
    212212
     
    214214  if ( status != EINVAL )
    215215    printf( "status = %d\n", status );
    216   rtems_test_assert(  status == EINVAL );
     216  rtems_test_assert( status == EINVAL );
    217217  puts( "Init: pthread_cond_timedwait - EINVAL (cond invalid)" );
    218218
     
    220220  if ( status != EINVAL )
    221221    printf( "status = %d\n", status );
    222   rtems_test_assert(  status == EINVAL );
     222  rtems_test_assert( status == EINVAL );
    223223  puts( "Init: pthread_cond_wait - EINVAL (mutex invalid)" );
    224224
     
    226226  if ( status != EINVAL )
    227227    printf( "status = %d\n", status );
    228   rtems_test_assert(  status == EINVAL );
     228  rtems_test_assert( status == EINVAL );
    229229  puts( "Init: pthread_cond_timedwait - EINVAL (mutex invalid)" );
    230230
     
    232232  if ( status != EINVAL )
    233233    printf( "status = %d\n", status );
    234   rtems_test_assert(  status == EINVAL );
     234  rtems_test_assert( status == EINVAL );
    235235  puts( "Init: pthread_cond_timedwait - EINVAL (abstime NULL)" );
    236236
    237237  status = clock_gettime( CLOCK_REALTIME, &timeout );
    238   rtems_test_assert(  !status );
     238  rtems_test_assert( !status );
    239239  timeout.tv_sec -= 1;
    240240  status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
    241241  if ( status != ETIMEDOUT )
    242242    printf( "status = %d\n", status );
    243   rtems_test_assert(  status == ETIMEDOUT );
     243  rtems_test_assert( status == ETIMEDOUT );
    244244  puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_sec < current time)" );
    245245  status = pthread_mutex_unlock( &Mutex_id );
    246   rtems_test_assert(  !status );
     246  rtems_test_assert( !status );
    247247
    248248  status = pthread_mutex_lock( &Mutex_id );
    249   rtems_test_assert(  !status );
     249  rtems_test_assert( !status );
    250250
    251251  /* ensure we do not catch a 0 nanosecond boundary */
    252252  do {
    253253    status = clock_gettime( CLOCK_REALTIME, &timeout );
    254     rtems_test_assert(  !status );
     254    rtems_test_assert( !status );
    255255    timeout.tv_nsec -= 1;
    256256  } while ( timeout.tv_nsec < 0);
     
    259259  if ( status != ETIMEDOUT )
    260260    printf( "status = %d\n", status );
    261   rtems_test_assert(  status == ETIMEDOUT );
     261  rtems_test_assert( status == ETIMEDOUT );
    262262  puts( "Init: pthread_cond_timedwait - ETIMEDOUT (abstime->tv_nsec < current time)" );
    263263  status = pthread_mutex_unlock( &Mutex_id );
    264   rtems_test_assert(  !status );
     264  rtems_test_assert( !status );
    265265
    266266/* wait and timedwait without mutex */
     
    271271 *   if ( status != EINVAL )
    272272 *     printf( "status = %d\n", status );
    273  *   rtems_test_assert(  status == EINVAL );
     273 *   rtems_test_assert( status == EINVAL );
    274274 */
    275275  puts( "Init: pthread_cond_wait - EINVAL (mutex not locked before call)" );
     
    278278 *
    279279 *  status = clock_gettime( CLOCK_REALTIME, &timeout );
    280  *  rtems_test_assert(  !status );
     280 *  rtems_test_assert( !status );
    281281 *  timeout.tv_sec += 1;
    282282 *  status = pthread_cond_timedwait( &Cond1_id, &Mutex_id, &timeout );
    283283 *  if ( status != EINVAL )
    284284 *    printf( "status = %d\n", status );
    285  *  rtems_test_assert(  status == EINVAL );
     285 *  rtems_test_assert( status == EINVAL );
    286286 */
    287287  puts( "Init: pthread_cond_timedwait - EINVAL (mutex not locked before call)");
     
    290290
    291291  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
    292   rtems_test_assert(  !status );
     292  rtems_test_assert( !status );
    293293
    294294/* switch to task3 to allow it to wait for broadcast signal */
     
    300300
    301301  status = pthread_mutex_destroy( &Mutex_id );
    302   rtems_test_assert(  !status );
     302  rtems_test_assert( !status );
    303303
    304304/* signal a condition variable to task3 */
  • testsuites/psxtests/psx10/task.c

    r15d5b9a r33c46f1  
    3232
    3333  status = pthread_mutex_init( &Mutex_id, NULL );
    34   rtems_test_assert(  !status );
     34  rtems_test_assert( !status );
    3535
    3636  status = pthread_mutex_lock( &Mutex_id );
    37   rtems_test_assert(  !status );
     37  rtems_test_assert( !status );
    3838
    3939  puts( "Task_1: pthread_cond_wait" );
    4040  status = pthread_cond_wait( &Cond1_id, &Mutex_id );
    41   rtems_test_assert(  !status );
     41  rtems_test_assert( !status );
    4242
    4343  puts( "Task_1: back from pthread_cond_wait release mutex" );
    4444  status = pthread_mutex_unlock( &Mutex_id );
    45   rtems_test_assert(  !status );
     45  rtems_test_assert( !status );
    4646
    4747/* wait for a condition variable broadcast from Init */
    4848
    4949  status = pthread_mutex_lock( &Mutex_id );
    50   rtems_test_assert(  !status );
     50  rtems_test_assert( !status );
    5151
    5252  puts( "Task_1: pthread_cond_wait" );
    5353  status = pthread_cond_wait( &Cond1_id, &Mutex_id );
    54   rtems_test_assert(  !status );
     54  rtems_test_assert( !status );
    5555
    5656  puts( "Task_1: back from pthread_cond_wait release mutex" );
    5757  status = pthread_mutex_unlock( &Mutex_id );
    58   rtems_test_assert(  !status );
     58  rtems_test_assert( !status );
    5959
    6060  puts( "Task_1: task exit" );
  • testsuites/psxtests/psx10/task2.c

    r15d5b9a r33c46f1  
    3030
    3131  status = pthread_mutex_lock( &Mutex_id );
    32   rtems_test_assert(  !status );
     32  rtems_test_assert( !status );
    3333
    3434  puts( "Task_2: pthread_cond_wait" );
    3535  status = pthread_cond_wait( &Cond1_id, &Mutex_id );
    36   rtems_test_assert(  !status );
     36  rtems_test_assert( !status );
    3737
    3838  puts( "Task_2: back from pthread_cond_wait release mutex" );
    3939  status = pthread_mutex_unlock( &Mutex_id );
    40   rtems_test_assert(  !status );
     40  rtems_test_assert( !status );
    4141
    4242  puts( "Task_2: task exit" );
  • testsuites/psxtests/psx10/task3.c

    r15d5b9a r33c46f1  
    3030
    3131  status = pthread_mutex_lock( &Mutex_id );
    32   rtems_test_assert(  !status );
     32  rtems_test_assert( !status );
    3333
    3434  puts( "Task_3: pthread_cond_wait" );
     
    3636  if ( status != EINVAL )
    3737    printf( "status = %d\n", status );
    38   rtems_test_assert(  status == EINVAL );
     38  rtems_test_assert( status == EINVAL );
    3939  puts( "Task_3: pthread_cond_wait - EINVAL (mutex not locked after signal)");
    4040
  • testsuites/psxtests/psx11/init.c

    r15d5b9a r33c46f1  
    5353  );
    5454  status = pthread_setschedparam( Init_id, SCHED_FIFO, &param );
    55   rtems_test_assert(  !status );
     55  rtems_test_assert( !status );
    5656
    5757  param.sched_priority = priority_2;
     
    6262  );
    6363  status = pthread_setschedparam( Init_id, SCHED_RR, &param );
    64   rtems_test_assert(  !status );
     64  rtems_test_assert( !status );
    6565
    6666  param.sched_priority = priority_3;
     
    7171  );
    7272  status = pthread_setschedparam( Init_id, SCHED_OTHER, &param );
    73   rtems_test_assert(  !status );
     73  rtems_test_assert( !status );
    7474
    7575  /* create a thread as SCHED_FIFO */
     
    7878    "Init: create a thread of SCHED_FIFO with priority %d\n", priority_4 );
    7979  status = pthread_attr_init( &attr );
    80   rtems_test_assert(  !status );
     80  rtems_test_assert( !status );
    8181
    8282  attr.schedpolicy = SCHED_FIFO;
     
    8484
    8585  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    86   rtems_test_assert(  !status );
     86  rtems_test_assert( !status );
    8787
    8888  puts( "Init: join with the other thread" );
    8989  status = pthread_join( Task_id, NULL );
    90   rtems_test_assert(  !status );
     90  rtems_test_assert( !status );
    9191
    9292  /* create a thread as SCHED_RR */
     
    9494  printf( "Init: create a thread of SCHED_RR with priority %d\n", priority_4 );
    9595  status = pthread_attr_init( &attr );
    96   rtems_test_assert(  !status );
     96  rtems_test_assert( !status );
    9797
    9898  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    99   rtems_test_assert(  !status );
     99  rtems_test_assert( !status );
    100100  attr.schedpolicy = SCHED_RR;
    101101  attr.schedparam.sched_priority = priority_4;
    102102
    103103  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    104   rtems_test_assert(  !status );
     104  rtems_test_assert( !status );
    105105
    106106  puts( "Init: join with the other thread" );
    107107  status = pthread_join( Task_id, NULL );
    108   rtems_test_assert(  !status );
     108  rtems_test_assert( !status );
    109109
    110110  /* create a thread as SCHED_OTHER */
     
    113113    "Init: create a thread of SCHED_OTHER with priority %d\n", priority_4 );
    114114  status = pthread_attr_init( &attr );
    115   rtems_test_assert(  !status );
     115  rtems_test_assert( !status );
    116116
    117117  attr.schedpolicy = SCHED_OTHER;
     
    119119
    120120  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    121   rtems_test_assert(  !status );
     121  rtems_test_assert( !status );
    122122
    123123  puts( "Init: join with the other thread" );
    124124  status = pthread_join( Task_id, NULL );
    125   rtems_test_assert(  !status );
     125  rtems_test_assert( !status );
    126126
    127127  puts( "*** END OF POSIX TEST 11 ***" );
  • testsuites/psxtests/psx11/task.c

    r15d5b9a r33c46f1  
    5151
    5252  status = clock_gettime( CLOCK_REALTIME, &start );
    53   rtems_test_assert(  !status );
     53  rtems_test_assert( !status );
    5454
    5555  status = sched_rr_get_interval( getpid(), &delay );
    56   rtems_test_assert(  !status );
     56  rtems_test_assert( !status );
    5757
    5858  /* double the rr interval for confidence */
     
    7070
    7171    status = clock_gettime( CLOCK_REALTIME, &current );
    72     rtems_test_assert(  !status );
     72    rtems_test_assert( !status );
    7373
    7474    diff_timespec( &start, &current, &difference );
  • testsuites/psxtests/psx12/init.c

    r15d5b9a r33c46f1  
    6464  puts( "Init: pthread_attr_init - SUCCESSFUL" );
    6565  status = pthread_attr_init( &attr );
    66   rtems_test_assert(  !status );
     66  rtems_test_assert( !status );
    6767
    6868  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    69   rtems_test_assert(  !status );
     69  rtems_test_assert( !status );
    7070  attr.schedpolicy = -1;
    7171
    7272  puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" );
    7373  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    74   rtems_test_assert(  status == EINVAL );
     74  rtems_test_assert( status == EINVAL );
    7575
    7676  /* replenish period < budget error */
     
    7878  puts( "Init: pthread_attr_init - SUCCESSFUL" );
    7979  status = pthread_attr_init( &attr );
    80   rtems_test_assert(  !status );
     80  rtems_test_assert( !status );
    8181
    8282  puts( "Init: set scheduling parameter attributes for sporadic server" );
    8383  status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC );
    84   rtems_test_assert(  !status );
     84  rtems_test_assert( !status );
    8585
    8686  schedparam.sched_ss_repl_period.tv_sec = 1;
     
    9393
    9494  status = pthread_attr_setschedparam( &attr, &schedparam );
    95   rtems_test_assert(  !status );
     95  rtems_test_assert( !status );
    9696
    9797  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    98   rtems_test_assert(  !status );
     98  rtems_test_assert( !status );
    9999
    100100  puts( "Init: pthread_create - EINVAL (replenish < budget)" );
    101101  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    102   rtems_test_assert(  status == EINVAL );
     102  rtems_test_assert( status == EINVAL );
    103103
    104104  /* invalid sched_ss_low_priority error */
     
    113113
    114114  status = pthread_attr_setschedparam( &attr, &schedparam );
    115   rtems_test_assert(  !status );
     115  rtems_test_assert( !status );
    116116
    117117  puts( "Init: pthread_create - EINVAL (invalid sched_ss_low_priority)" );
    118118  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    119   rtems_test_assert(  status == EINVAL );
     119  rtems_test_assert( status == EINVAL );
    120120
    121121  /* create a thread as a sporadic server */
     
    130130
    131131  status = pthread_attr_setschedparam( &attr, &schedparam );
    132   rtems_test_assert(  !status );
     132  rtems_test_assert( !status );
    133133
    134134  puts( "Init: pthread_create - SUCCESSFUL" );
    135135  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    136   rtems_test_assert(  !status );
     136  rtems_test_assert( !status );
    137137
    138138  status = pthread_join( Task_id, NULL );
    139   rtems_test_assert(  status );
     139  rtems_test_assert( status );
    140140
    141141    /* switch to Task_1 */
  • testsuites/psxtests/psxalarm01/init.c

    r15d5b9a r33c46f1  
    7171
    7272  sc = sigemptyset( &act.sa_mask );
    73   rtems_test_assert(  !sc );
     73  rtems_test_assert( !sc );
    7474
    7575  act.sa_handler = Signal_handler;
     
    7979
    8080  sc = sigemptyset( &mask );
    81   rtems_test_assert(  !sc );
     81  rtems_test_assert( !sc );
    8282
    8383  sc = sigaddset( &mask, SIGALRM );
    84   rtems_test_assert(  !sc );
     84  rtems_test_assert( !sc );
    8585
    8686  puts( "Init: Unblock SIGALRM" );
    8787  sc = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    88   rtems_test_assert(  !sc );
     88  rtems_test_assert( !sc );
    8989
    9090  /* schedule the alarm */
     
    9393  remaining = alarm( 1 );
    9494  printf( "Init: %d seconds left on previous alarm\n", sc );
    95   rtems_test_assert(  !sc );
     95  rtems_test_assert( !sc );
    9696
    9797  puts( "Init: Wait for alarm" );
     
    101101  remaining = alarm( 0 );
    102102  printf( "Init: %d seconds left on previous alarm\n", remaining );
    103   rtems_test_assert(  remaining == 0 );
     103  rtems_test_assert( remaining == 0 );
    104104
    105105  puts( "*** END OF POSIX ALARM TEST 01***" );
  • testsuites/psxtests/psxbarrier01/test.c

    r15d5b9a r33c46f1  
    3434  status = pthread_barrier_wait( &Barrier );
    3535  printf( "pthread_barrier_wait - 0x%08" PRIxpthread_t " released\n", id );
    36   rtems_test_assert(  (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
     36  rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
    3737
    3838  return NULL;
     
    6666  puts( "pthread_barrierattr_init( NULL ) -- EINVAL" );
    6767  status = pthread_barrierattr_init( NULL );
    68   rtems_test_assert(  status == EINVAL );
     68  rtems_test_assert( status == EINVAL );
    6969
    7070  puts( "pthread_barrierattr_setpshared( NULL, private ) -- EINVAL" );
    7171  status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
    72   rtems_test_assert(  status == EINVAL );
     72  rtems_test_assert( status == EINVAL );
    7373
    7474  puts( "pthread_barrierattr_setpshared( NULL, shared ) -- EINVAL" );
    7575  status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
    76   rtems_test_assert(  status == EINVAL );
     76  rtems_test_assert( status == EINVAL );
    7777
    7878  puts( "pthread_barrierattr_getpshared( NULL, &p ) -- EINVAL" );
    7979  status = pthread_barrierattr_getpshared( NULL, &p );
    80   rtems_test_assert(  status == EINVAL );
     80  rtems_test_assert( status == EINVAL );
    8181
    8282  puts( "pthread_barrierattr_destroy( NULL ) -- EINVAL" );
    8383  status = pthread_barrierattr_destroy( NULL );
    84   rtems_test_assert(  status == EINVAL );
     84  rtems_test_assert( status == EINVAL );
    8585
    8686  /*************** NOT INITIALIZED CHECKS *****************/
     
    8989  puts( "pthread_barrierattr_setpshared( &attr, shared ) -- EINVAL" );
    9090  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    91   rtems_test_assert(  status == EINVAL );
     91  rtems_test_assert( status == EINVAL );
    9292
    9393  puts( "pthread_barrierattr_getpshared( &attr, NULL ) -- EINVAL" );
    9494  status = pthread_barrierattr_getpshared( &attr, NULL );
    95   rtems_test_assert(  status == EINVAL );
     95  rtems_test_assert( status == EINVAL );
    9696
    9797  puts( "pthread_barrierattr_destroy( &attr ) -- EINVAL" );
    9898  status = pthread_barrierattr_destroy( &attr );
    99   rtems_test_assert(  status == EINVAL );
     99  rtems_test_assert( status == EINVAL );
    100100
    101101
     
    104104  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    105105  status = pthread_barrierattr_init( &attr );
    106   rtems_test_assert(  status == 0 );
     106  rtems_test_assert( status == 0 );
    107107
    108108  puts( "pthread_barrierattr_setpshared( &attr, private ) -- OK" );
    109109  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
    110   rtems_test_assert(  status == 0 );
     110  rtems_test_assert( status == 0 );
    111111
    112112  puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
    113113  status = pthread_barrierattr_getpshared( &attr, &p );
    114   rtems_test_assert(  status == 0 );
    115   rtems_test_assert(  p == PTHREAD_PROCESS_PRIVATE );
     114  rtems_test_assert( status == 0 );
     115  rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
    116116
    117117  puts( "pthread_barrierattr_setpshared( &attr, shared ) -- OK" );
    118118  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    119   rtems_test_assert(  status == 0 );
     119  rtems_test_assert( status == 0 );
    120120
    121121  puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
    122122  status = pthread_barrierattr_getpshared( &attr, &p );
    123   rtems_test_assert(  status == 0 );
    124   rtems_test_assert(  p == PTHREAD_PROCESS_SHARED );
     123  rtems_test_assert( status == 0 );
     124  rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
    125125
    126126  /*************** BAD PSHARED CHECK *****************/
    127127  puts( "pthread_barrierattr_setpshared( &attr, private ) -- EINVAL" );
    128128  status = pthread_barrierattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
    129   rtems_test_assert(  status == EINVAL );
     129  rtems_test_assert( status == EINVAL );
    130130
    131131  /*************** DESTROY/REUSE CHECK *****************/
    132132  puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
    133133  status = pthread_barrierattr_destroy( &attr );
    134   rtems_test_assert(  status == 0 );
     134  rtems_test_assert( status == 0 );
    135135
    136136  puts( "pthread_barrierattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
    137137  status = pthread_barrierattr_getpshared( &attr, &p );
    138   rtems_test_assert(  status == EINVAL );
     138  rtems_test_assert( status == EINVAL );
    139139
    140140  /*************** pthread_barrier_init ERROR CHECKs *********/
     
    142142  puts( "pthread_barrier_init( NULL, NULL, 2 ) -- EINVAL" );
    143143  status = pthread_barrier_init( NULL, NULL, 2 );
    144   rtems_test_assert(  status == EINVAL );
     144  rtems_test_assert( status == EINVAL );
    145145
    146146  /* uninitialized attr argument */
    147147  puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- EINVAL" );
    148148  status = pthread_barrier_init( &barrier, &attr, 2 );
    149   rtems_test_assert(  status == EINVAL );
     149  rtems_test_assert( status == EINVAL );
    150150
    151151  /* zero count argument */
    152152  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    153153  status = pthread_barrierattr_init( &attr );
    154   rtems_test_assert(  status == 0 );
     154  rtems_test_assert( status == 0 );
    155155
    156156  puts( "pthread_barrier_init( &barrier, &attr, 0 ) -- EINVAL" );
    157157  status = pthread_barrier_init( &barrier, &attr, 0 );
    158   rtems_test_assert(  status == EINVAL );
     158  rtems_test_assert( status == EINVAL );
    159159
    160160  /* allocating too many */
    161161  puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- OK" );
    162162  status = pthread_barrier_init( &barrier, NULL, 1 );
    163   rtems_test_assert(  status == 0 );
     163  rtems_test_assert( status == 0 );
    164164
    165165  puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- EAGAIN" );
    166166  status = pthread_barrier_init( &barrier, NULL, 1 );
    167   rtems_test_assert(  status == EAGAIN );
     167  rtems_test_assert( status == EAGAIN );
    168168
    169169  /* clean up */
    170170  puts( "pthread_barrier_destroy( &barrier ) -- OK" );
    171171  status = pthread_barrier_destroy( &barrier );
    172   rtems_test_assert(  status == 0 );
     172  rtems_test_assert( status == 0 );
    173173
    174174  puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
    175175  status = pthread_barrierattr_destroy( &attr );
    176   rtems_test_assert(  status == 0 );
     176  rtems_test_assert( status == 0 );
    177177
    178178  /*************** pthread_barrier_destroy ERROR CHECKs *********/
     
    180180  puts( "pthread_barrier_destroy( NULL ) -- EINVAL" );
    181181  status = pthread_barrier_destroy( NULL );
    182   rtems_test_assert(  status == EINVAL );
     182  rtems_test_assert( status == EINVAL );
    183183
    184184  puts( "pthread_barrier_destroy( &bad_barrier ) -- EINVAL" );
    185185  status = pthread_barrier_destroy( &bad_barrier );
    186   rtems_test_assert(  status == EINVAL );
     186  rtems_test_assert( status == EINVAL );
    187187
    188188  /*************** pthread_barrier_wait ERROR CHECKs *********/
     
    190190  puts( "pthread_barrier_wait( NULL ) -- EINVAL" );
    191191  status = pthread_barrier_wait( NULL );
    192   rtems_test_assert(  status == EINVAL );
     192  rtems_test_assert( status == EINVAL );
    193193
    194194  puts( "pthread_barrier_wait( &bad_barrier ) -- EINVAL" );
    195195  status = pthread_barrier_wait( &bad_barrier );
    196   rtems_test_assert(  status == EINVAL );
     196  rtems_test_assert( status == EINVAL );
    197197
    198198  /*************** ACTUALLY CREATE ONE CHECK *****************/
    199199  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    200200  status = pthread_barrierattr_init( &attr );
    201   rtems_test_assert(  status == 0 );
     201  rtems_test_assert( status == 0 );
    202202
    203203  puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- OK" );
    204204  status = pthread_barrier_init( &barrier, &attr, 2 );
    205   rtems_test_assert(  status == 0 );
    206   rtems_test_assert(  barrier != 0 );
     205  rtems_test_assert( status == 0 );
     206  rtems_test_assert( barrier != 0 );
    207207
    208208  puts( "pthread_barrier_destroy( &barrier ) -- OK" );
    209209  status = pthread_barrier_destroy( &barrier );
    210   rtems_test_assert(  status == 0 );
     210  rtems_test_assert( status == 0 );
    211211
    212212  /*************** CREATE THREADS AND LET THEM RELEASE *****************/
    213213  puts( "pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS ) -- OK" );
    214214  status = pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS );
    215   rtems_test_assert(  status == 0 );
    216   rtems_test_assert(  barrier != 0 );
     215  rtems_test_assert( status == 0 );
     216  rtems_test_assert( barrier != 0 );
    217217
    218218  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
     
    222222      puts( "pthread_barrier_destroy( &Barrier ) -- EBUSY" );
    223223      status = pthread_barrier_destroy( &Barrier );
    224       rtems_test_assert(  status == EBUSY );
     224      rtems_test_assert( status == EBUSY );
    225225    }
    226226
     
    228228    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    229229    status = pthread_create(&ThreadIds[i], NULL, BarrierThread, &ThreadIds[i]);
    230     rtems_test_assert(  !status );
     230    rtems_test_assert( !status );
    231231
    232232    sleep(1);
  • testsuites/psxtests/psxcancel01/init.c

    r15d5b9a r33c46f1  
    6464
    6565  status = rtems_timer_fire_after( timer_id, 10, TSR, NULL );
    66   rtems_test_assert(  !status );
     66  rtems_test_assert( !status );
    6767
    6868  start = rtems_clock_get_ticks_since_boot();
     
    9595    &timer_id
    9696  );
    97   rtems_test_assert(  !status );
     97  rtems_test_assert( !status );
    9898
    9999  doit( Cancel_duringISR_TSR, "pthread_cancel" );
  • testsuites/psxtests/psxchroot01/test.c

    r15d5b9a r33c46f1  
    4141  int fd;
    4242
    43   rtems_test_assert(  file );
     43  rtems_test_assert( file );
    4444
    4545  fd = open( file, O_RDWR|O_CREAT, 0777 );
    46   rtems_test_assert(  fd != -1 );
     46  rtems_test_assert( fd != -1 );
    4747  close( fd );
    4848}
     
    5353  struct stat statbuf;
    5454
    55   rtems_test_assert(  file );
     55  rtems_test_assert( file );
    5656
    5757  status = stat( file, &statbuf );
     
    9494
    9595  status = mkdir( "/one", 0777);
    96   rtems_test_assert(  status == 0 );
     96  rtems_test_assert( status == 0 );
    9797
    9898  status = mkdir( "/one/one", 0777);
    99   rtems_test_assert(  status == 0 );
     99  rtems_test_assert( status == 0 );
    100100
    101101  status = mkdir( "/one/two", 0777);
    102   rtems_test_assert(  status == 0 );
     102  rtems_test_assert( status == 0 );
    103103
    104104  touch( "/one/one.test" );
  • testsuites/psxtests/psxitimer/init.c

    r15d5b9a r33c46f1  
    2727  puts( "getitimer -- bad which - EINVAL " );
    2828  status = getitimer( 1234, &itimer );
    29   rtems_test_assert(  status == -1 && errno == EINVAL );
     29  rtems_test_assert( status == -1 && errno == EINVAL );
    3030
    3131  puts( "getitimer -- NULL pointer - EFAULT " );
    3232  status = getitimer( ITIMER_REAL, NULL );
    33   rtems_test_assert(  status == -1 && errno == EFAULT );
     33  rtems_test_assert( status == -1 && errno == EFAULT );
    3434
    3535  puts( "getitimer -- ITIMER_REAL - ENOSYS " );
    3636  status = getitimer( ITIMER_REAL, &itimer );
    37   rtems_test_assert(  status == -1 && errno == ENOSYS );
     37  rtems_test_assert( status == -1 && errno == ENOSYS );
    3838
    3939  puts( "getitimer -- ITIMER_VIRTUAL - ENOSYS " );
    4040  status = getitimer( ITIMER_VIRTUAL, &itimer );
    41   rtems_test_assert(  status == -1 && errno == ENOSYS );
     41  rtems_test_assert( status == -1 && errno == ENOSYS );
    4242
    4343  puts( "getitimer -- ITIMER_PROF - ENOSYS " );
    4444  status = getitimer( ITIMER_PROF, &itimer );
    45   rtems_test_assert(  status == -1 && errno == ENOSYS );
     45  rtems_test_assert( status == -1 && errno == ENOSYS );
    4646
    4747  /* test setitimer stub */
    4848  puts( "setitimer -- bad which - EINVAL " );
    4949  status = setitimer( 1234, &itimer, &otimer );
    50   rtems_test_assert(  status == -1 && errno == EINVAL );
     50  rtems_test_assert( status == -1 && errno == EINVAL );
    5151
    5252  puts( "setitimer -- NULL value pointer - EFAULT " );
    5353  status = setitimer( ITIMER_REAL, NULL, &otimer );
    54   rtems_test_assert(  status == -1 && errno == EFAULT );
     54  rtems_test_assert( status == -1 && errno == EFAULT );
    5555
    5656  puts( "setitimer -- NULL value pointer - EFAULT " );
    5757  status = setitimer( ITIMER_REAL, &itimer, NULL );
    58   rtems_test_assert(  status == -1 && errno == EFAULT );
     58  rtems_test_assert( status == -1 && errno == EFAULT );
    5959
    6060  puts( "setitimer -- ITIMER_REAL - ENOSYS " );
    6161  status = setitimer( ITIMER_REAL, &itimer, &otimer );
    62   rtems_test_assert(  status == -1 && errno == ENOSYS );
     62  rtems_test_assert( status == -1 && errno == ENOSYS );
    6363
    6464  puts( "setitimer -- ITIMER_VIRTUAL - ENOSYS " );
    6565  status = setitimer( ITIMER_VIRTUAL, &itimer, &otimer );
    66   rtems_test_assert(  status == -1 && errno == ENOSYS );
     66  rtems_test_assert( status == -1 && errno == ENOSYS );
    6767
    6868  puts( "setitimer -- ITIMER_PROF - ENOSYS " );
    6969  status = setitimer( ITIMER_PROF, &itimer, &otimer );
    70   rtems_test_assert(  status == -1 && errno == ENOSYS );
     70  rtems_test_assert( status == -1 && errno == ENOSYS );
    7171
    7272  puts( "*** END OF POSIX TEST ITIMER ***" );
  • testsuites/psxtests/psxkey01/task.c

    r15d5b9a r33c46f1  
    3535  if ( status )
    3636    printf( "status = %d\n", status );
    37   rtems_test_assert(  !status );
     37  rtems_test_assert( !status );
    3838
    3939  key_data = pthread_getspecific( Key_id[0] );
     
    4242  if ( status )
    4343    printf( "status = %d\n", status );
    44   rtems_test_assert(  !status );
     44  rtems_test_assert( !status );
    4545
    4646  puts( "Task_1: exitting" );
  • testsuites/psxtests/psxkey02/init.c

    r15d5b9a r33c46f1  
    3131  puts( "Init - rtems_workspace_get_information - OK" );
    3232  sb = rtems_workspace_get_information( &start );
    33   rtems_test_assert(  sb );
     33  rtems_test_assert( sb );
    3434
    3535  #if 0
     
    3737    printf( "Init - workspace free blocks = %d\n", start.Free.number );
    3838  #endif
    39   rtems_test_assert(  start.Free.number == 1 );
     39  rtems_test_assert( start.Free.number == 1 );
    4040  to_alloc = start.Free.largest;
    4141
     
    5858   */
    5959  sb = rtems_workspace_get_information( &info );
    60   rtems_test_assert(  sb );
    61   rtems_test_assert(  info.Free.largest == start.Free.largest );
    62   rtems_test_assert(  info.Free.number  == start.Free.number  );
     60  rtems_test_assert( sb );
     61  rtems_test_assert( info.Free.largest == start.Free.largest );
     62  rtems_test_assert( info.Free.number  == start.Free.number  );
    6363
    6464  puts( "Init - pthread_key_create - ENOMEM" );
     
    6666
    6767    sb = rtems_workspace_allocate( to_alloc, &alloced );
    68     rtems_test_assert(  sb );
     68    rtems_test_assert( sb );
    6969
    7070    sc = pthread_key_create( &key, NULL );
     
    8989        info.Free.largest, info.Free.number );
    9090    #endif
    91     rtems_test_assert(  sb );
    92     rtems_test_assert(  info.Free.largest == start.Free.largest );
    93     rtems_test_assert(  info.Free.number  == start.Free.number  );
     91    rtems_test_assert( sb );
     92    rtems_test_assert( info.Free.largest == start.Free.largest );
     93    rtems_test_assert( info.Free.number  == start.Free.number  );
    9494
    9595    to_alloc -= 8;
     
    106106  puts( "Init - pthread_key_delete - OK" );
    107107  sc = pthread_key_delete( key );
    108   rtems_test_assert(  sc == 0 );
     108  rtems_test_assert( sc == 0 );
    109109
    110110  puts( "Init - verify workspace has same memory" );
     
    114114      info.Free.largest, info.Free.number );
    115115  #endif
    116   rtems_test_assert(  sb );
    117   rtems_test_assert(  info.Free.largest == start.Free.largest );
    118   rtems_test_assert(  info.Free.number  == start.Free.number  );
     116  rtems_test_assert( sb );
     117  rtems_test_assert( info.Free.largest == start.Free.largest );
     118  rtems_test_assert( info.Free.number  == start.Free.number  );
    119119
    120120  puts( "*** END OF TEST KEY 02 ***" );
  • testsuites/psxtests/psxkey03/init.c

    r15d5b9a r33c46f1  
    3131  puts( "Test_Thread - pthread_setspecific - OK" );
    3232  sc = pthread_setspecific( Key, key_value );
    33   rtems_test_assert(  !sc );
     33  rtems_test_assert( !sc );
    3434
    3535  puts( "Test_Thread - pthread_exit to run key destructors - OK" );
     
    5252  puts( "Init - pthread_key_create with NULL destructor - OK" );
    5353  sc = pthread_key_create( &Key, NULL );
    54   rtems_test_assert(  !sc );
     54  rtems_test_assert( !sc );
    5555
    5656  puts( "Init - pthread_create - OK" );
    5757  sc = pthread_create( &thread, NULL, Test_Thread, &sc );
    58   rtems_test_assert(  !sc );
     58  rtems_test_assert( !sc );
    5959
    6060  puts( "Init - sleep - let thread run - OK" );
     
    6262  delay_request.tv_nsec = 5 * 100000000;
    6363  sc = nanosleep( &delay_request, NULL );
    64   rtems_test_assert(  !sc );
     64  rtems_test_assert( !sc );
    6565
    6666  puts( "Init - pthread_key_delete - OK" );
    6767  sc = pthread_key_delete( Key );
    68   rtems_test_assert(  sc == 0 );
     68  rtems_test_assert( sc == 0 );
    6969
    7070  /*
     
    7474  puts( "Init - pthread_key_create with non-NULL destructor - OK" );
    7575  sc = pthread_key_create( &Key, destructor );
    76   rtems_test_assert(  !sc );
     76  rtems_test_assert( !sc );
    7777
    7878  puts( "Init - pthread_create - OK" );
    7979  sc = pthread_create( &thread, NULL, Test_Thread, NULL );
    80   rtems_test_assert(  !sc );
     80  rtems_test_assert( !sc );
    8181
    8282  puts( "Init - sleep - let thread run - OK" );
    8383  sc = nanosleep( &delay_request, NULL );
    84   rtems_test_assert(  !sc );
     84  rtems_test_assert( !sc );
    8585
    8686  puts( "Init - verify destructor did NOT ran" );
    87   rtems_test_assert(  destructor_ran == false );
     87  rtems_test_assert( destructor_ran == false );
    8888
    8989  puts( "Init - pthread_key_delete - OK" );
    9090  sc = pthread_key_delete( Key );
    91   rtems_test_assert(  sc == 0 );
     91  rtems_test_assert( sc == 0 );
    9292
    9393  puts( "*** END OF TEST KEY 03 ***" );
  • testsuites/psxtests/psxmount/test.c

    r15d5b9a r33c46f1  
    131131  printf("create /b/my_file\n");
    132132  fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    133   rtems_test_assert(  fd != 0 );
     133  rtems_test_assert( fd != 0 );
    134134  close (fd);
    135135
    136136  printf("Verify /b/my_file\n");
    137137  fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO);
    138   rtems_test_assert(  fd != 0 );
     138  rtems_test_assert( fd != 0 );
    139139  close( fd );
    140140
     
    142142  printf("create c/y/my_mount_point/my_dir/d\n");
    143143  fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    144   rtems_test_assert(  fd != 0 );
     144  rtems_test_assert( fd != 0 );
    145145  close (fd);
    146146
    147147  printf("Verify c/y/my_mount_point/my_dir/d\n");
    148148  fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO);
    149   rtems_test_assert(  fd != 0 );
     149  rtems_test_assert( fd != 0 );
    150150  close( fd );
    151151
     
    161161    RTEMS_FILESYSTEM_READ_WRITE,
    162162    NULL );
    163   rtems_test_assert(  status == 0 );
     163  rtems_test_assert( status == 0 );
    164164  printf("2nd file system successfully mounted at /c/z/my_mount_point \n");
    165165
     
    217217    RTEMS_FILESYSTEM_READ_WRITE,
    218218    NULL );
    219   rtems_test_assert(  status == -1 );
    220   rtems_test_assert(  errno == EINVAL );
     219  rtems_test_assert( status == -1 );
     220  rtems_test_assert( errno == EINVAL );
    221221
    222222  /*
     
    231231    -62,
    232232    NULL );
    233   rtems_test_assert(  status == -1 );
    234   rtems_test_assert(  errno == EINVAL );
     233  rtems_test_assert( status == -1 );
     234  rtems_test_assert( errno == EINVAL );
    235235
    236236  /*
     
    245245    RTEMS_FILESYSTEM_READ_ONLY,
    246246    NULL );
    247   rtems_test_assert(  status == 0 );
     247  rtems_test_assert( status == 0 );
    248248  printf("Read only file system successfully mounted at /c/y/my_mount_point \n");
    249249
     
    254254  printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n");
    255255  status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU );
    256   rtems_test_assert(  status == 0 );
     256  rtems_test_assert( status == 0 );
    257257  status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf );
    258   rtems_test_assert(  status == 0 );
     258  rtems_test_assert( status == 0 );
    259259  status = stat("c/y/my_mount_point/new_dir/..", &statbuf );
    260   rtems_test_assert(  status == 0 );
     260  rtems_test_assert( status == 0 );
    261261
    262262  /*
     
    271271     RTEMS_FILESYSTEM_READ_ONLY,
    272272     NULL );
    273   rtems_test_assert(  status == -1 );
    274   rtems_test_assert(  errno == EBUSY);
     273  rtems_test_assert( status == -1 );
     274  rtems_test_assert( errno == EBUSY);
    275275
    276276  /*
     
    285285    RTEMS_FILESYSTEM_READ_ONLY,
    286286    NULL );
    287   rtems_test_assert(  status == -1 );
    288   rtems_test_assert(  errno == ENOTDIR );
     287  rtems_test_assert( status == -1 );
     288  rtems_test_assert( errno == ENOTDIR );
    289289
    290290
     
    295295  printf("Create and chdir to /c/y/my_mount_point/mydir\n");
    296296  status = mkdir( "/c/y/my_mount_point/mydir", 0777);
    297   rtems_test_assert(  status == 0 );
     297  rtems_test_assert( status == 0 );
    298298
    299299  status = chdir( "/c/y/my_mount_point/mydir" );
    300   rtems_test_assert(  status == 0 );
     300  rtems_test_assert( status == 0 );
    301301
    302302  printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
    303303  status = unmount( "/c/y/my_mount_point" );
    304   rtems_test_assert(  status == -1 );
    305   rtems_test_assert(  errno == EBUSY );
     304  rtems_test_assert( status == -1 );
     305  rtems_test_assert( errno == EBUSY );
    306306
    307307  /*
     
    311311  printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
    312312  status = chdir( "/" );
    313   rtems_test_assert(  status == 0 );
     313  rtems_test_assert( status == 0 );
    314314
    315315  printf("unmount /c/y/my_mount_point \n");
    316316  status = unmount( "/c/y/my_mount_point" );
    317   rtems_test_assert(  status == 0 );
     317  rtems_test_assert( status == 0 );
    318318
    319319  /*
     
    323323  printf("unmount /b/mount_point should fail with EINVAL\n");
    324324  status = unmount( "/b/mount_point" );
    325   rtems_test_assert(  status == -1 );
    326   rtems_test_assert(  errno == ENOENT );
     325  rtems_test_assert( status == -1 );
     326  rtems_test_assert( errno == ENOENT );
    327327
    328328  /*
     
    337337    RTEMS_FILESYSTEM_READ_ONLY,
    338338    NULL );
    339   rtems_test_assert(  status == 0 );
     339  rtems_test_assert( status == 0 );
    340340
    341341  /*
     
    346346  printf("Create and open /c/y/my_mount_point/my_file\n");
    347347  fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    348   rtems_test_assert(  fd != -1 );
     348  rtems_test_assert( fd != -1 );
    349349  status = close( fd );
    350   rtems_test_assert(  status == 0 );
     350  rtems_test_assert( status == 0 );
    351351
    352352  printf("\nmkdir /c/y/my_mount_point/my_dir\n");
     
    354354  printf("Open /c/y/my_mount_point/my_dir\n");
    355355  directory = opendir( "/c/y/my_mount_point/my_dir" );
    356   rtems_test_assert(  directory );
     356  rtems_test_assert( directory );
    357357
    358358  printf("Unmount /c/y/my_mount_point should fail with EBUSY\n");
    359359  status = unmount( "/c/y/my_mount_point" );
    360   rtems_test_assert(  status == -1 );
    361   rtems_test_assert(  errno == EBUSY );
     360  rtems_test_assert( status == -1 );
     361  rtems_test_assert( errno == EBUSY );
    362362
    363363  printf("Close /c/y/my_mount_point/my_dir\n");
    364364  status = closedir( directory );
    365   rtems_test_assert(  status == 0 );
     365  rtems_test_assert( status == 0 );
    366366
    367367  /*
     
    371371  printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n");
    372372  status = unmount( "/c/y/my_mount_point/my_dir" );
    373   rtems_test_assert(  status == -1 );
    374   rtems_test_assert(  errno == EACCES );
     373  rtems_test_assert( status == -1 );
     374  rtems_test_assert( errno == EACCES );
    375375
    376376  /*
     
    386386     RTEMS_FILESYSTEM_READ_WRITE,
    387387     NULL );
    388   rtems_test_assert(  status == 0 );
     388  rtems_test_assert( status == 0 );
    389389
    390390  printf("unmount /c/y/my_mount_point should fail with EBUSY\n");
    391391  status = unmount( "/c/y/my_mount_point" );
    392   rtems_test_assert(  status == -1 );
    393   rtems_test_assert(  errno == EBUSY );
     392  rtems_test_assert( status == -1 );
     393  rtems_test_assert( errno == EBUSY );
    394394
    395395  /*
     
    399399  printf("Verify a hard link across filesystems fails with EXDEV\n");
    400400  status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU  );
    401   rtems_test_assert(  status == 0 );
     401  rtems_test_assert( status == 0 );
    402402
    403403  status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
    404   rtems_test_assert(  status == -1 );
    405   rtems_test_assert(  errno == EXDEV );
     404  rtems_test_assert( status == -1 );
     405  rtems_test_assert( errno == EXDEV );
    406406
    407407  /*
     
    411411  printf("Verify a symbolic link across file systems works\n");
    412412  status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
    413   rtems_test_assert(  status == 0 );
     413  rtems_test_assert( status == 0 );
    414414  status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
    415   rtems_test_assert(  status == 0 );
     415  rtems_test_assert( status == 0 );
    416416
    417417  printf("unmount /c/y/my_mount_point/my_dir\n");
    418418  status = unmount( "/c/y/my_mount_point/my_dir" );
    419   rtems_test_assert(  status == 0 );
     419  rtems_test_assert( status == 0 );
    420420
    421421  /*
     
    425425  printf("Verify the symbolic link now fails\n");
    426426  status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
    427   rtems_test_assert(  status != 0 );
     427  rtems_test_assert( status != 0 );
    428428
    429429  printf("unmount /c/y/my_mount_point\n");
    430430  status = unmount( "/c/y/my_mount_point" );
    431   rtems_test_assert(  status == 0 );
     431  rtems_test_assert( status == 0 );
    432432
    433433  printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" );
  • testsuites/psxtests/psxmsgq01/init.c

    r15d5b9a r33c46f1  
    131131      Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr );
    132132
    133     rtems_test_assert(  Test_q[que].mq != (-1) );
     133    rtems_test_assert( Test_q[que].mq != (-1) );
    134134  }
    135135
     
    224224  open_mq[0] = mq_open(
    225225    Build_Queue_Name(0), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL );
    226   rtems_test_assert(  open_mq[0] != (-1) );
     226  rtems_test_assert( open_mq[0] != (-1) );
    227227
    228228  n_mq2 = mq_open(
     
    246246    open_mq[i] = mq_open(
    247247      Build_Queue_Name(i), O_CREAT | O_RDWR | O_NONBLOCK, 0x777, NULL );
    248     rtems_test_assert(  open_mq[i] != (-1) );
    249     rtems_test_assert(  open_mq[i] );
     248    rtems_test_assert( open_mq[i] != (-1) );
     249    rtems_test_assert( open_mq[i] );
    250250    /*XXX - Isn't there a more general check */
    251251/* JRS     printf( "mq_open 0x%x %s\n", open_mq[i], Build_Queue_Name(i) ); */
     
    495495  fatal_int_service_status( status, ptr->size, err_msg );
    496496
    497   rtems_test_assert(  !strcmp( message, ptr->msg ) );
     497  rtems_test_assert( !strcmp( message, ptr->msg ) );
    498498  strcpy( message, "No Message" );
    499499
     
    684684  n_mq = mq_open( RD_NAME, 0 );
    685685  fatal_posix_service_status(
    686   rtems_test_assert(  n_mq == Test_q[RD_QUEUE].mq );
     686  rtems_test_assert( n_mq == Test_q[RD_QUEUE].mq );
    687687#endif
    688688}
     
    705705
    706706  n_mq = mq_open( DEFAULT_NAME, DEFAULT_ATTR, 0x777, NULL );
    707   rtems_test_assert(  n_mq != (-1) );
    708   rtems_test_assert(  n_mq != Test_q[ DEFAULT_RW ].mq );
     707  rtems_test_assert( n_mq != (-1) );
     708  rtems_test_assert( n_mq != Test_q[ DEFAULT_RW ].mq );
    709709
    710710
     
    889889
    890890  status = sigemptyset( waitset );
    891   rtems_test_assert(  !status );
     891  rtems_test_assert( !status );
    892892
    893893  status = sigaddset( waitset, SIGUSR1 );
    894   rtems_test_assert(  !status );
     894  rtems_test_assert( !status );
    895895
    896896  printf( "waiting on any signal for %d seconds.\n", sec );
     
    10081008  Start_Test( "multi-thread Task 4 Receive Test"  );
    10091009  status = pthread_create( &id, NULL, Task_4, NULL );
    1010   rtems_test_assert(  !status );
     1010  rtems_test_assert( !status );
    10111011  puts( "Init: mq_receive - Empty queue changes to non-blocking (EAGAIN)" );
    10121012  status = mq_receive( Test_q[BLOCKING].mq, message, 100, &priority );
     
    10231023  Start_Test( "multi-thread Task 1 Test"  );
    10241024  status = pthread_create( &id, NULL, Task_1, NULL );
    1025   rtems_test_assert(  !status );
     1025  rtems_test_assert( !status );
    10261026  Read_msg_from_que(  BLOCKING, 0 ); /* Block until init writes */
    10271027  print_current_time( "Init: ", "" );
     
    10371037  fill_message_queues( "Init:" );
    10381038  status = pthread_create( &id, NULL, Task_4, NULL );
    1039   rtems_test_assert(  !status );
     1039  rtems_test_assert( !status );
    10401040  puts( "Init: mq_send - Full queue changes to non-blocking (EAGAIN)" );
    10411041  status = mq_send(Test_q[BLOCKING].mq, message, 0, 0 );
     
    10521052  fill_message_queues( "Init:" );
    10531053  status = pthread_create( &id, NULL, Task_2, NULL );
    1054   rtems_test_assert(  !status );
     1054  rtems_test_assert( !status );
    10551055  Show_send_msg_to_que( "Init:", BLOCKING, Priority_Order[0] );
    10561056  print_current_time( "Init: ", "" );
     
    10661066  fill_message_queues( "Init:" );
    10671067  status = pthread_create( &id, NULL, Task_3, NULL );
    1068   rtems_test_assert(  !status );
     1068  rtems_test_assert( !status );
    10691069  puts( "Init: mq_send - Block while thread deletes queue (EBADF)" );
    10701070  ptr = &Predefined_Msgs[0];
     
    12721272  /* switch to Init */
    12731273
    1274   rtems_test_assert(  0 );
     1274  rtems_test_assert( 0 );
    12751275  return NULL; /* just so the compiler thinks we returned something */
    12761276}
  • testsuites/psxtests/psxmsgq03/init.c

    r15d5b9a r33c46f1  
    5656    perror( "mq_open failed" );
    5757  }
    58   rtems_test_assert(  Queue != (-1) );
     58  rtems_test_assert( Queue != (-1) );
    5959
    6060  puts( "Init - send to message queue" );
     
    6363    perror( "mq_status failed" );
    6464  }
    65   rtems_test_assert(  status != (-1) );
     65  rtems_test_assert( status != (-1) );
    6666
    6767  /*
  • testsuites/psxtests/psxmsgq04/init.c

    r15d5b9a r33c46f1  
    4444  if ( Queue == (-1) )
    4545    perror( "mq_open failed" );
    46   rtems_test_assert(  Queue != (-1) );
     46  rtems_test_assert( Queue != (-1) );
    4747
    4848  puts( "Init - Open message queue instance 2 - FAIL - ENFILE " );
     
    5050  if ( second_Queue != (-1) )
    5151    puts( "mq_open did not failed" );
    52   rtems_test_assert(  second_Queue == (-1) );
    53   rtems_test_assert(  errno == ENFILE );
     52  rtems_test_assert( second_Queue == (-1) );
     53  rtems_test_assert( errno == ENFILE );
    5454
    5555  puts( "Init - Unlink message queue instance 1" );
     
    5757  if ( sc != 0 )
    5858    perror( "mq_unlink failed" );
    59   rtems_test_assert(  sc == 0 );
     59  rtems_test_assert( sc == 0 );
    6060
    6161  puts( "Init - Close message queue instance 1" );
     
    6363  if ( sc != 0 )
    6464    perror( "mq_close failed" );
    65   rtems_test_assert(  sc == 0 );
     65  rtems_test_assert( sc == 0 );
    6666
    6767  sb = rtems_workspace_get_information( &start );
    68   rtems_test_assert(  start.Free.number == 1 );
     68  rtems_test_assert( start.Free.number == 1 );
    6969  to_alloc = start.Free.largest;
    7070
     
    9292  while ( attr.mq_msgsize > 0 ) {
    9393    sb = rtems_workspace_allocate( to_alloc, &alloced );
    94     rtems_test_assert(  sb );
     94    rtems_test_assert( sb );
    9595
    9696    second_Queue = mq_open(name,O_CREAT | O_RDWR, 0x777, &attr );
     
    115115    if ( sc != 0 )
    116116      perror( "mq_unlink failed" );
    117     rtems_test_assert(  sc == 0 );
     117    rtems_test_assert( sc == 0 );
    118118
    119119  puts( "Init - Close message queue" );
     
    121121    if ( sc != 0 )
    122122      perror( "mq_close failed" );
    123     rtems_test_assert(  sc == 0 );
     123    rtems_test_assert( sc == 0 );
    124124
    125125  puts( "*** END OF POSIX MESSAGE QUEUE TEST 4 ***" );
  • testsuites/psxtests/psxrwlock01/test.c

    r15d5b9a r33c46f1  
    3838  puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" );
    3939  status = pthread_rwlock_rdlock(&RWLock);
    40   rtems_test_assert(  !status );
     40  rtems_test_assert( !status );
    4141  puts( "ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK" );
    4242
    4343  status = pthread_rwlock_unlock(&RWLock);
    44   rtems_test_assert(  !status );
     44  rtems_test_assert( !status );
    4545  return NULL;
    4646}
     
    5555  puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" );
    5656  status = pthread_rwlock_wrlock(&RWLock);
    57   rtems_test_assert(  !status );
     57  rtems_test_assert( !status );
    5858  puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
    5959
     
    6262  puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
    6363  status = pthread_rwlock_unlock(&RWLock);
    64   rtems_test_assert(  !status );
     64  rtems_test_assert( !status );
    6565  return NULL;
    6666}
     
    9191  puts( "pthread_rwlockattr_init( NULL ) -- EINVAL" );
    9292  status = pthread_rwlockattr_init( NULL );
    93   rtems_test_assert(  status == EINVAL );
     93  rtems_test_assert( status == EINVAL );
    9494
    9595  puts( "pthread_rwlockattr_setpshared( NULL, private ) -- EINVAL" );
    9696  status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
    97   rtems_test_assert(  status == EINVAL );
     97  rtems_test_assert( status == EINVAL );
    9898
    9999  puts( "pthread_rwlockattr_setpshared( NULL, shared ) -- EINVAL" );
    100100  status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
    101   rtems_test_assert(  status == EINVAL );
     101  rtems_test_assert( status == EINVAL );
    102102
    103103  puts( "pthread_rwlockattr_getpshared( NULL, &p ) -- EINVAL" );
    104104  status = pthread_rwlockattr_getpshared( NULL, &p );
    105   rtems_test_assert(  status == EINVAL );
     105  rtems_test_assert( status == EINVAL );
    106106
    107107  puts( "pthread_rwlockattr_destroy( NULL ) -- EINVAL" );
    108108  status = pthread_rwlockattr_destroy( NULL );
    109   rtems_test_assert(  status == EINVAL );
     109  rtems_test_assert( status == EINVAL );
    110110
    111111  /*************** NOT INITIALIZED CHECKS *****************/
     
    114114  puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- EINVAL" );
    115115  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    116   rtems_test_assert(  status == EINVAL );
     116  rtems_test_assert( status == EINVAL );
    117117
    118118  puts( "pthread_rwlockattr_getpshared( &attr, NULL ) -- EINVAL" );
    119119  status = pthread_rwlockattr_getpshared( &attr, NULL );
    120   rtems_test_assert(  status == EINVAL );
     120  rtems_test_assert( status == EINVAL );
    121121
    122122  puts( "pthread_rwlockattr_destroy( &attr ) -- EINVAL" );
    123123  status = pthread_rwlockattr_destroy( &attr );
    124   rtems_test_assert(  status == EINVAL );
     124  rtems_test_assert( status == EINVAL );
    125125
    126126  /*************** BAD PSHARED CHECK *****************/
    127127  puts( "pthread_rwlockattr_setpshared( &attr, private ) -- EINVAL" );
    128128  status = pthread_rwlockattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
    129   rtems_test_assert(  status == EINVAL );
     129  rtems_test_assert( status == EINVAL );
    130130
    131131  /*************** ACTUALLY WORK THIS TIME *****************/
    132132  puts( "pthread_rwlockattr_init( &attr ) -- OK" );
    133133  status = pthread_rwlockattr_init( &attr );
    134   rtems_test_assert(  status == 0 );
     134  rtems_test_assert( status == 0 );
    135135
    136136  puts( "pthread_rwlockattr_setpshared( &attr, private ) -- OK" );
    137137  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
    138   rtems_test_assert(  status == 0 );
     138  rtems_test_assert( status == 0 );
    139139
    140140  puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
    141141  status = pthread_rwlockattr_getpshared( &attr, &p );
    142   rtems_test_assert(  status == 0 );
    143   rtems_test_assert(  p == PTHREAD_PROCESS_PRIVATE );
     142  rtems_test_assert( status == 0 );
     143  rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
    144144
    145145  puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- OK" );
    146146  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    147   rtems_test_assert(  status == 0 );
     147  rtems_test_assert( status == 0 );
    148148
    149149  puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
    150150  status = pthread_rwlockattr_getpshared( &attr, &p );
    151   rtems_test_assert(  status == 0 );
    152   rtems_test_assert(  p == PTHREAD_PROCESS_SHARED );
     151  rtems_test_assert( status == 0 );
     152  rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
    153153
    154154  /*************** DESTROY/REUSE CHECK *****************/
    155155  puts( "pthread_rwlockattr_destroy( &attr ) -- OK" );
    156156  status = pthread_rwlockattr_destroy( &attr );
    157   rtems_test_assert(  status == 0 );
     157  rtems_test_assert( status == 0 );
    158158
    159159  puts( "pthread_rwlockattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
    160160  status = pthread_rwlockattr_getpshared( &attr, &p );
    161   rtems_test_assert(  status == EINVAL );
     161  rtems_test_assert( status == EINVAL );
    162162
    163163  /*************** NULL ARGUMENT CHECKS *****************/
     
    167167  puts( "pthread_rwlock_init(NULL, &attr) -- EINVAL" );
    168168  status = pthread_rwlock_init(NULL, &attr);
    169   rtems_test_assert(  status == EINVAL );
     169  rtems_test_assert( status == EINVAL );
    170170
    171171  puts( "pthread_rwlock_destroy(NULL) -- EINVAL" );
    172172  status = pthread_rwlock_destroy(NULL);
    173   rtems_test_assert(  status == EINVAL );
     173  rtems_test_assert( status == EINVAL );
    174174
    175175  puts( "pthread_rwlock_rdlock(NULL) -- EINVAL" );
    176176  status = pthread_rwlock_rdlock(NULL);
    177   rtems_test_assert(  status == EINVAL );
     177  rtems_test_assert( status == EINVAL );
    178178
    179179  puts( "pthread_rwlock_timedrdlock( NULL, &abstime) -- EINVAL" );
    180180  status = pthread_rwlock_timedrdlock( NULL, &abstime);
    181   rtems_test_assert(  status == EINVAL );
     181  rtems_test_assert( status == EINVAL );
    182182
    183183  puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
    184184  status = pthread_rwlock_timedrdlock( &rwlock, NULL);
    185   rtems_test_assert(  status == EINVAL );
     185  rtems_test_assert( status == EINVAL );
    186186
    187187  puts( "pthread_rwlock_tryrdlock(NULL) -- EINVAL" );
    188188  status = pthread_rwlock_tryrdlock(NULL);
    189   rtems_test_assert(  status == EINVAL );
     189  rtems_test_assert( status == EINVAL );
    190190
    191191  puts( "pthread_rwlock_wrlock(NULL) -- EINVAL" );
    192192  status = pthread_rwlock_wrlock(NULL);
    193   rtems_test_assert(  status == EINVAL );
     193  rtems_test_assert( status == EINVAL );
    194194
    195195  puts( "pthread_rwlock_timedwrlock( NULL, &abstime) -- EINVAL" );
    196196  status = pthread_rwlock_timedwrlock( NULL, &abstime );
    197   rtems_test_assert(  status == EINVAL );
     197  rtems_test_assert( status == EINVAL );
    198198
    199199  puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
    200200  status = pthread_rwlock_timedwrlock( &rwlock, NULL);
    201   rtems_test_assert(  status == EINVAL );
     201  rtems_test_assert( status == EINVAL );
    202202
    203203  puts( "pthread_rwlock_trywrlock(NULL) -- EINVAL" );
    204204  status = pthread_rwlock_trywrlock(NULL);
    205   rtems_test_assert(  status == EINVAL );
     205  rtems_test_assert( status == EINVAL );
    206206
    207207  puts( "pthread_rwlock_unlock(NULL) -- EINVAL" );
    208208  status = pthread_rwlock_unlock(NULL);
    209   rtems_test_assert(  status == EINVAL );
     209  rtems_test_assert( status == EINVAL );
    210210
    211211  /*************** BAD ID CHECK *****************/
     
    214214  puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
    215215  status = clock_gettime( CLOCK_REALTIME, &abstime );
    216   rtems_test_assert(  !status );
     216  rtems_test_assert( !status );
    217217  abstime.tv_sec += 5;
    218218
    219219  puts( "pthread_rwlock_destroy(BadId) -- EINVAL" );
    220220  status = pthread_rwlock_destroy(&rwlock);
    221   rtems_test_assert(  status == EINVAL );
     221  rtems_test_assert( status == EINVAL );
    222222
    223223  puts( "pthread_rwlock_rdlock(BadId) -- EINVAL" );
    224224  status = pthread_rwlock_rdlock(&rwlock);
    225   rtems_test_assert(  status == EINVAL );
     225  rtems_test_assert( status == EINVAL );
    226226
    227227  puts( "pthread_rwlock_timedrdlock(BadId, &abstime) -- EINVAL" );
    228228  status = pthread_rwlock_timedrdlock( &rwlock, &abstime);
    229   rtems_test_assert(  status == EINVAL );
     229  rtems_test_assert( status == EINVAL );
    230230
    231231  puts( "pthread_rwlock_tryrdlock(BadId) -- EINVAL" );
    232232  status = pthread_rwlock_tryrdlock(&rwlock);
    233   rtems_test_assert(  status == EINVAL );
     233  rtems_test_assert( status == EINVAL );
    234234
    235235  puts( "pthread_rwlock_wrlock(BadId) -- EINVAL" );
    236236  status = pthread_rwlock_wrlock(&rwlock);
    237   rtems_test_assert(  status == EINVAL );
     237  rtems_test_assert( status == EINVAL );
    238238
    239239  puts( "pthread_rwlock_timedwrlock(BadId, &abstime) -- EINVAL" );
    240240  status = pthread_rwlock_timedwrlock( &rwlock, &abstime );
    241   rtems_test_assert(  status == EINVAL );
     241  rtems_test_assert( status == EINVAL );
    242242
    243243  puts( "pthread_rwlock_trywrlock(BadId) -- EINVAL" );
    244244  status = pthread_rwlock_trywrlock(&rwlock);
    245   rtems_test_assert(  status == EINVAL );
     245  rtems_test_assert( status == EINVAL );
    246246
    247247  puts( "pthread_rwlock_unlock(BadId) -- EINVAL" );
    248248  status = pthread_rwlock_unlock(&rwlock);
    249   rtems_test_assert(  status == EINVAL );
     249  rtems_test_assert( status == EINVAL );
    250250
    251251  /*************** BAD ABSTIME CHECK *****************/
     
    264264  puts( "pthread_rwlockattr_init( &attr ) -- OK" );
    265265  status = pthread_rwlockattr_init( &attr );
    266   rtems_test_assert(  status == 0 );
     266  rtems_test_assert( status == 0 );
    267267
    268268  puts( "pthread_rwlock_init( &rwlock, &attr ) -- OK" );
    269269  status = pthread_rwlock_init( &rwlock, &attr );
    270   rtems_test_assert(  status == 0 );
    271   rtems_test_assert(  rwlock != 0 );
     270  rtems_test_assert( status == 0 );
     271  rtems_test_assert( rwlock != 0 );
    272272
    273273  puts( "pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN" );
    274274  status = pthread_rwlock_init( &rwlock, &attr );
    275   rtems_test_assert(  status == EAGAIN );
     275  rtems_test_assert( status == EAGAIN );
    276276
    277277  puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
    278278  status = pthread_rwlock_destroy( &rwlock );
    279   rtems_test_assert(  status == 0 );
     279  rtems_test_assert( status == 0 );
    280280
    281281  /********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
    282282  puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
    283283  status = pthread_rwlock_init( &rwlock, NULL );
    284   rtems_test_assert(  status == 0 );
     284  rtems_test_assert( status == 0 );
    285285
    286286  puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
    287287  status = pthread_rwlock_destroy( &rwlock );
    288   rtems_test_assert(  status == 0 );
     288  rtems_test_assert( status == 0 );
    289289
    290290  /*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
    291291  puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
    292292  status = pthread_rwlock_init( &RWLock, &attr );
    293   rtems_test_assert(  status == 0 );
     293  rtems_test_assert( status == 0 );
    294294
    295295  puts( "pthread_rwlock_tryrdlock(RWLock) -- OK" );
    296296  status = pthread_rwlock_tryrdlock(&RWLock);
    297   rtems_test_assert(  !status );
     297  rtems_test_assert( !status );
    298298
    299299  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
    300300    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    301301    status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
    302     rtems_test_assert(  !status );
     302    rtems_test_assert( !status );
    303303
    304304    sleep(1);
     
    307307  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    308308  status = pthread_rwlock_unlock(&RWLock);
    309   rtems_test_assert(  !status );
     309  rtems_test_assert( !status );
    310310
    311311  sleep(1);
     
    314314  puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
    315315  status = pthread_rwlock_trywrlock(&RWLock);
    316   rtems_test_assert(  !status );
     316  rtems_test_assert( !status );
    317317
    318318  puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
    319319  status = pthread_rwlock_tryrdlock(&RWLock);
    320   rtems_test_assert(  status == EBUSY );
     320  rtems_test_assert( status == EBUSY );
    321321
    322322  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
    323323    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    324324    status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
    325     rtems_test_assert(  !status );
     325    rtems_test_assert( !status );
    326326
    327327    sleep(1);
     
    331331  puts( "pthread_rwlock_destroy( &RWLock ) -- EBUSY" );
    332332  status = pthread_rwlock_destroy( &RWLock );
    333   rtems_test_assert(  status == EBUSY );
     333  rtems_test_assert( status == EBUSY );
    334334
    335335  /* now unlock it so the threads can continue */
    336336  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    337337  status = pthread_rwlock_unlock(&RWLock);
    338   rtems_test_assert(  !status );
     338  rtems_test_assert( !status );
    339339
    340340  sleep(2);
     
    343343  puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
    344344  status = pthread_rwlock_trywrlock(&RWLock);
    345   rtems_test_assert(  !status );
     345  rtems_test_assert( !status );
    346346
    347347  puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
    348348  status = pthread_rwlock_trywrlock(&RWLock);
    349   rtems_test_assert(  status == EBUSY );
     349  rtems_test_assert( status == EBUSY );
    350350
    351351  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
     
    353353    status =
    354354      pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
    355     rtems_test_assert(  !status );
     355    rtems_test_assert( !status );
    356356
    357357    sleep(1);
     
    360360  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    361361  status = pthread_rwlock_unlock(&RWLock);
    362   rtems_test_assert(  !status );
     362  rtems_test_assert( !status );
    363363
    364364  sleep(2);
     
    367367  puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
    368368  status = clock_gettime( CLOCK_REALTIME, &abstime );
    369   rtems_test_assert(  !status );
     369  rtems_test_assert( !status );
    370370
    371371  abstime.tv_sec += 1;
    372372  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK" );
    373373  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    374   rtems_test_assert(  status == 0 );
     374  rtems_test_assert( status == 0 );
    375375
    376376  abstime.tv_sec += 1;
    377377  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
    378378  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    379   rtems_test_assert(  status == ETIMEDOUT );
     379  rtems_test_assert( status == ETIMEDOUT );
    380380
    381381  abstime.tv_sec -= 1;
    382382  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
    383383  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    384   rtems_test_assert(  status == ETIMEDOUT );
     384  rtems_test_assert( status == ETIMEDOUT );
    385385
    386386  abstime.tv_sec -= 1;
    387387  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT" );
    388388  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    389   rtems_test_assert(  status == ETIMEDOUT );
     389  rtems_test_assert( status == ETIMEDOUT );
    390390
    391391  /*************** OBTAIN RWLOCK WITH ABSTIME IN PAST ***************/
    392392  status = pthread_rwlock_unlock(&RWLock);
    393   rtems_test_assert(  !status );
     393  rtems_test_assert( !status );
    394394
    395395  abstime.tv_sec -= 1;
    396396  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK" );
    397397  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    398   rtems_test_assert(  status == 0 );
     398  rtems_test_assert( status == 0 );
    399399
    400400  /*************** OBTAIN RWLOCK FOR WRITE WITH ABSTIME IN PAST ***************/
    401401  status = pthread_rwlock_unlock(&RWLock);
    402   rtems_test_assert(  !status );
     402  rtems_test_assert( !status );
    403403
    404404  abstime.tv_sec -= 1;
    405405  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK" );
    406406  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    407   rtems_test_assert(  status == 0 );
     407  rtems_test_assert( status == 0 );
    408408
    409409  /*************** DESTROY RWLOCK ***************/
    410410  puts( "pthread_rwlock_destroy( &RWLock ) -- OK" );
    411411  status = pthread_rwlock_destroy( &RWLock );
    412   rtems_test_assert(  status == 0 );
     412  rtems_test_assert( status == 0 );
    413413
    414414  /*************** OBTAIN A LOCK AND THEN RELEASE IT TWICE ***************/
     
    416416  puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
    417417  status = pthread_rwlock_init( &rwlock, NULL );
    418   rtems_test_assert(  status == 0 );
    419   rtems_test_assert(  rwlock != 0 );
     418  rtems_test_assert( status == 0 );
     419  rtems_test_assert( rwlock != 0 );
    420420
    421421  puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
    422422  status = pthread_rwlock_unlock( &rwlock );
    423   rtems_test_assert(  status == 0 );
     423  rtems_test_assert( status == 0 );
    424424
    425425  puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
    426426  status = pthread_rwlock_unlock( &rwlock );
    427   rtems_test_assert(  status == 0 );
     427  rtems_test_assert( status == 0 );
    428428
    429429  /*************** END OF TEST *****************/
  • testsuites/psxtests/psxsem01/init.c

    r15d5b9a r33c46f1  
    179179  puts( "Init: sem_open - sem1 SUCCESSFUL" );
    180180  n_sem1 = sem_open( "sem1",O_CREAT, 0777, 1 );
    181   rtems_test_assert(  n_sem1 != SEM_FAILED );
     181  rtems_test_assert( n_sem1 != SEM_FAILED );
    182182
    183183  puts( "Init: sem_destroy - named sem1 - EINVAL" );
     
    219219  puts( "Init: sem_open - Open an existing sem ( same id )" );
    220220  n_sem2 = sem_open("sem1", 0 );
    221   rtems_test_assert(  n_sem2 == n_sem1 );
     221  rtems_test_assert( n_sem2 == n_sem1 );
    222222
    223223  /*
     
    232232  puts( "Init: sem_open - Reopen sem1 SUCCESSFUL with a different id" );
    233233  n_sem2 = sem_open( "sem1", O_CREAT | O_EXCL, 0777, 1);
    234   rtems_test_assert(  n_sem2 != SEM_FAILED );
    235   rtems_test_assert(  n_sem2 != n_sem1 );
     234  rtems_test_assert( n_sem2 != SEM_FAILED );
     235  rtems_test_assert( n_sem2 != n_sem1 );
    236236
    237237  /*
     
    290290  fatal_posix_service_status( status, -1, "sem_unlink error return status");
    291291  fatal_posix_service_status( errno, ENOENT, "sem_unlink errno ENOENT");
    292   rtems_test_assert(  (status == -1) && (errno == ENOENT) );
     292  rtems_test_assert( (status == -1) && (errno == ENOENT) );
    293293
    294294
  • testsuites/psxtests/psxsignal01/init.c

    r15d5b9a r33c46f1  
    125125/* unblock Signal and see if it happened */
    126126  status = sigemptyset( &mask );
    127   rtems_test_assert(  !status );
     127  rtems_test_assert( !status );
    128128
    129129  status = sigaddset( &mask, SIGUSR1 );
    130   rtems_test_assert(  !status );
     130  rtems_test_assert( !status );
    131131
    132132  status = sigaddset( &mask, SIGFPE );
    133   rtems_test_assert(  !status );
     133  rtems_test_assert( !status );
    134134
    135135  status = sigaddset( &mask, SIGILL );
    136   rtems_test_assert(  !status );
     136  rtems_test_assert( !status );
    137137
    138138  status = sigaddset( &mask, SIGSEGV );
    139   rtems_test_assert(  !status );
     139  rtems_test_assert( !status );
    140140
    141141  puts( "Init: Unblock SIGUSR1 SIGFPE SIGILL SIGSEGV" );
    142142  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    143   rtems_test_assert(  !status );
     143  rtems_test_assert( !status );
    144144
    145145/* install a signal handler for SIGUSR1 */
  • testsuites/psxtests/psxsignal01/task1.c

    r15d5b9a r33c46f1  
    3131  seconds = sleep( 5 );
    3232  printf( "Task_1: %d seconds left\n", seconds );
    33   rtems_test_assert(  seconds );
     33  rtems_test_assert( seconds );
    3434
    3535     /* switch to Init */
  • testsuites/psxtests/psxsignal02/init.c

    r15d5b9a r33c46f1  
    3636
    3737  sc = sigemptyset( &mask );
    38   rtems_test_assert(  !sc );
     38  rtems_test_assert( !sc );
    3939
    4040  sc = sigaddset( &mask, SIGUSR1 );
    41   rtems_test_assert(  !sc );
     41  rtems_test_assert( !sc );
    4242
    4343  printf( "%s - Unblock SIGUSR1\n", task_name );
    4444  sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
    45   rtems_test_assert(  !sc );
     45  rtems_test_assert( !sc );
    4646}
    4747
     
    138138  puts( "Init - Raise my priority" );
    139139  sc = pthread_attr_init( &attr );
    140   rtems_test_assert(  !sc );
     140  rtems_test_assert( !sc );
    141141
    142142  param.sched_priority = 30;
    143143  sc = pthread_setschedparam( pthread_self(), SCHED_RR, &param );
    144   rtems_test_assert(  !sc );
     144  rtems_test_assert( !sc );
    145145
    146146  for ( i=0, test=Threads ; test->priority != -1 ; i++, test++ ) {
    147147    printf( "Init - Create thread %d, priority=%d\n", i, test->priority );
    148148    sc = pthread_attr_init( &attr );
    149     rtems_test_assert(  !sc );
     149    rtems_test_assert( !sc );
    150150
    151151    sc = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    152     rtems_test_assert(  !sc );
     152    rtems_test_assert( !sc );
    153153
    154154    sc = pthread_attr_setschedpolicy( &attr, SCHED_RR );
    155     rtems_test_assert(  !sc );
     155    rtems_test_assert( !sc );
    156156
    157157    param.sched_priority = test->priority;
    158158    sc = pthread_attr_setschedparam( &attr, &param );
    159     rtems_test_assert(  !sc );
     159    rtems_test_assert( !sc );
    160160
    161161    sc = pthread_create( &id, &attr, Test_Thread, test );
    162     rtems_test_assert(  !sc );
     162    rtems_test_assert( !sc );
    163163
    164164    puts( "Init - sleep - let thread settle - OK" );
     
    166166    delay_request.tv_nsec = 50000000;
    167167    sc = nanosleep( &delay_request, NULL );
    168     rtems_test_assert(  !sc );
     168    rtems_test_assert( !sc );
    169169  }
    170170
    171171  puts( "Init - sending SIGUSR1" );
    172172  sc =  kill( getpid(), SIGUSR1 );
    173   rtems_test_assert(  !sc );
     173  rtems_test_assert( !sc );
    174174
    175175  /* we are just scheduling the signal, not delivering it */
    176   rtems_test_assert(  Signal_occurred == false );
     176  rtems_test_assert( Signal_occurred == false );
    177177
    178178  puts( "*** END OF POSIX TEST SIGNAL 02 ***" );
  • testsuites/psxtests/psxsignal03/init.c

    r15d5b9a r33c46f1  
    9595  /* build unblocked mask */
    9696  sc = sigemptyset( &mask );
    97   rtems_test_assert(  !sc );
     97  rtems_test_assert( !sc );
    9898
    9999  printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_ONE) );
    100100  sc = sigaddset( &mask, SIGNAL_ONE );
    101   rtems_test_assert(  !sc );
     101  rtems_test_assert( !sc );
    102102
    103103  if ( !blocked ) {
    104104    printf( "%s - Unblock %s\n", name, signal_name(SIGNAL_TWO) );
    105105    sc = sigaddset( &mask, SIGNAL_TWO );
    106     rtems_test_assert(  !sc );
     106    rtems_test_assert( !sc );
    107107  }
    108108
    109109  /* unblocked signals */
    110110  sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
    111   rtems_test_assert(  !sc );
     111  rtems_test_assert( !sc );
    112112
    113113  /* build wait mask */
    114114  sc = sigemptyset( &wait_mask );
    115   rtems_test_assert(  !sc );
     115  rtems_test_assert( !sc );
    116116
    117117  sc = sigaddset( &wait_mask, SIGNAL_ONE );
    118   rtems_test_assert(  !sc );
     118  rtems_test_assert( !sc );
    119119
    120120  /* wait for a signal */
     
    123123  printf( "%s - Wait for %s unblocked\n", name, signal_name(SIGNAL_ONE) );
    124124  sigwaitinfo( &wait_mask, &info );
    125   rtems_test_assert(  !sc );
     125  rtems_test_assert( !sc );
    126126
    127127  printf( "%s - siginfo.si_signo=%d\n", name, info.si_signo );
     
    133133  printf( "%s - siginfo.si_value=0x%08" PRIxPTR "\n", name, (uintptr_t) info.si_value.sival_ptr );
    134134
    135   rtems_test_assert(  info.si_signo == SIGNAL_TWO );
    136   rtems_test_assert(  info.si_code == SI_USER );
     135  rtems_test_assert( info.si_signo == SIGNAL_TWO );
     136  rtems_test_assert( info.si_code == SI_USER );
    137137
    138138  printf( "%s - exiting\n", name );
     
    164164  /* create threads */
    165165  sc = pthread_create( &id, NULL, Test_Thread, &falseArg );
    166   rtems_test_assert(  !sc );
     166  rtems_test_assert( !sc );
    167167
    168168  sc = pthread_create( &id, NULL, Test_Thread, &trueArg );
    169   rtems_test_assert(  !sc );
     169  rtems_test_assert( !sc );
    170170
    171171  puts( "Init - sleep - let threads settle - OK" );
     
    173173  delay_request.tv_nsec = 5 * 100000000;
    174174  sc = nanosleep( &delay_request, NULL );
    175   rtems_test_assert(  !sc );
     175  rtems_test_assert( !sc );
    176176
    177177  puts( "Init - sleep - SignalBlocked thread settle - OK" );
    178178  sc = nanosleep( &delay_request, NULL );
    179   rtems_test_assert(  !sc );
     179  rtems_test_assert( !sc );
    180180
    181181  printf( "Init - sending %s - deliver to one thread\n",
    182182          signal_name(SIGNAL_TWO));
    183183  sc =  SEND_SIGNAL( SIGNAL_TWO );
    184   rtems_test_assert(  !sc );
     184  rtems_test_assert( !sc );
    185185
    186186  printf( "Init - sending %s - deliver to other thread\n",
    187187          signal_name(SIGNAL_TWO));
    188188  sc =  SEND_SIGNAL( SIGNAL_TWO );
    189   rtems_test_assert(  !sc );
     189  rtems_test_assert( !sc );
    190190
    191191  #if defined(TO_PROCESS)
    192192    printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
    193193    sc =  SEND_SIGNAL( SIGNAL_TWO );
    194     rtems_test_assert(  sc == -1 );
    195     rtems_test_assert(  errno == EAGAIN );
     194    rtems_test_assert( sc == -1 );
     195    rtems_test_assert( errno == EAGAIN );
    196196  #endif
    197197
     
    200200
    201201  /* we are just sigwait'ing the signal, not delivering it */
    202   rtems_test_assert(  Signal_occurred == true );
     202  rtems_test_assert( Signal_occurred == true );
    203203
    204204  puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
  • testsuites/psxtests/psxsignal05/init.c

    r15d5b9a r33c46f1  
    7575    false              /* check_blocked */
    7676  );
    77   rtems_test_assert(  bc );
     77  rtems_test_assert( bc );
    7878
    7979  puts( "*** END OF POSIX TEST SIGNAL " TEST_NAME " ***" );
  • testsuites/psxtests/psxspin01/test.c

    r15d5b9a r33c46f1  
    3535  puts( "pthread_spin_lock( &Spinlock ) from Thread -- OK" );
    3636  status = pthread_spin_lock( &Spinlock );
    37   rtems_test_assert(  status == 0 );
     37  rtems_test_assert( status == 0 );
    3838
    3939  puts( "sleep to allow main thread to run" );
     
    4747  puts( "pthread_spin_unlock( &Spinlock ) from Thread -- OK" );
    4848  status = pthread_spin_unlock( &Spinlock );
    49   rtems_test_assert(  status == 0 );
     49  rtems_test_assert( status == 0 );
    5050
    5151  rtems_task_delete( RTEMS_SELF );
     
    7474  puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE ) -- EINVAL" );
    7575  status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
    76   rtems_test_assert(  status == EINVAL );
     76  rtems_test_assert( status == EINVAL );
    7777
    7878  puts( "pthread_spin_init( NULL, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
    7979  status = pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE );
    80   rtems_test_assert(  status == EINVAL );
     80  rtems_test_assert( status == EINVAL );
    8181
    8282  puts( "pthread_spin_init( &spinlock, 0x1234 ) -- EINVAL" );
    8383  status = pthread_spin_init( &spinlock, 0x1234 );
    84   rtems_test_assert(  status == EINVAL );
     84  rtems_test_assert( status == EINVAL );
    8585
    8686  puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED ) -- EINVAL" );
    8787  status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_SHARED );
    88   rtems_test_assert(  status == EINVAL );
     88  rtems_test_assert( status == EINVAL );
    8989
    9090  /* This successfully creates one */
    9191  puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
    9292  status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
    93   rtems_test_assert(  status == 0 );
     93  rtems_test_assert( status == 0 );
    9494
    9595  puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
    9696  status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
    97   rtems_test_assert(  status == EAGAIN );
     97  rtems_test_assert( status == EAGAIN );
    9898
    9999  puts( "pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE ) -- EAGAIN" );
    100100  status = pthread_spin_init( &spinlock, PTHREAD_PROCESS_PRIVATE );
    101   rtems_test_assert(  status == EAGAIN );
     101  rtems_test_assert( status == EAGAIN );
    102102
    103103  puts( "pthread_spin_lock( NULL ) -- EINVAL" );
    104104  status = pthread_spin_lock( NULL );
    105   rtems_test_assert(  status == EINVAL );
     105  rtems_test_assert( status == EINVAL );
    106106
    107107  puts( "pthread_spin_trylock( NULL ) -- EINVAL" );
    108108  status = pthread_spin_trylock( NULL );
    109   rtems_test_assert(  status == EINVAL );
     109  rtems_test_assert( status == EINVAL );
    110110
    111111  puts( "pthread_spin_unlock( NULL ) -- EINVAL" );
    112112  status = pthread_spin_unlock( NULL );
    113   rtems_test_assert(  status == EINVAL );
     113  rtems_test_assert( status == EINVAL );
    114114
    115115  puts( "pthread_spin_destroy( NULL ) -- EINVAL" );
    116116  status = pthread_spin_destroy( NULL );
    117   rtems_test_assert(  status == EINVAL );
     117  rtems_test_assert( status == EINVAL );
    118118
    119119  spinlock = 0;
     
    121121  puts( "pthread_spin_lock( &spinlock ) -- EINVAL" );
    122122  status = pthread_spin_lock( &spinlock );
    123   rtems_test_assert(  status == EINVAL );
     123  rtems_test_assert( status == EINVAL );
    124124
    125125  puts( "pthread_spin_trylock( &spinlock ) -- EINVAL" );
    126126  status = pthread_spin_trylock( &spinlock );
    127   rtems_test_assert(  status == EINVAL );
     127  rtems_test_assert( status == EINVAL );
    128128
    129129  puts( "pthread_spin_unlock( &spinlock ) -- EINVAL" );
    130130  status = pthread_spin_unlock( &spinlock );
    131   rtems_test_assert(  status == EINVAL );
     131  rtems_test_assert( status == EINVAL );
    132132
    133133  puts( "pthread_spin_destroy( &spinlock ) -- EINVAL" );
    134134  status = pthread_spin_destroy( &spinlock );
    135   rtems_test_assert(  status == EINVAL );
     135  rtems_test_assert( status == EINVAL );
    136136
    137137  puts( "pthread_spin_unlock( &Spinlock ) -- already unlocked OK" );
    138138  status = pthread_spin_unlock( &Spinlock );
    139   rtems_test_assert(  status == 0 );
     139  rtems_test_assert( status == 0 );
    140140
    141141  /* Now some basic locking and unlocking with a deadlock verification */
    142142  puts( "pthread_spin_lock( &Spinlock ) -- OK" );
    143143  status = pthread_spin_lock( &Spinlock );
    144   rtems_test_assert(  status == 0 );
     144  rtems_test_assert( status == 0 );
    145145
    146146  puts( "pthread_spin_lock( &Spinlock ) -- EDEADLK" );
    147147  status = pthread_spin_lock( &Spinlock );
    148   rtems_test_assert(  status == EDEADLK );
     148  rtems_test_assert( status == EDEADLK );
    149149
    150150  puts( "pthread_spin_trylock( &Spinlock ) -- EDEADLK" );
    151151  status = pthread_spin_trylock( &Spinlock );
    152   rtems_test_assert(  status == EDEADLK );
     152  rtems_test_assert( status == EDEADLK );
    153153
    154154  puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
    155155  status = pthread_spin_unlock( &Spinlock );
    156   rtems_test_assert(  status == 0 );
     156  rtems_test_assert( status == 0 );
    157157
    158158  /* Try lock/unlock pair */
    159159  puts( "pthread_spin_trylock( &Spinlock ) -- OK" );
    160160  status = pthread_spin_trylock( &Spinlock );
    161   rtems_test_assert(  status == 0 );
     161  rtems_test_assert( status == 0 );
    162162
    163163  puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
    164164  status = pthread_spin_unlock( &Spinlock );
    165   rtems_test_assert(  status == 0 );
     165  rtems_test_assert( status == 0 );
    166166
    167167  /* Let another thread lock a spinlock and we contend with it */
     
    178178     &taskid
    179179  );
    180   rtems_test_assert(  rstatus == RTEMS_SUCCESSFUL );
     180  rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
    181181
    182182  rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
    183   rtems_test_assert(  rstatus == RTEMS_SUCCESSFUL );
     183  rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
    184184  /* We should be preempted immediately.  The thread is expected to:
    185185   *    + verify we haven't set the main thread spinning flag
     
    191191  puts( "pthread_spin_lock( &Spinlock ) -- OK" );
    192192  status = pthread_spin_lock( &Spinlock );
    193   rtems_test_assert(  status == 0 );
     193  rtems_test_assert( status == 0 );
    194194
    195195  /* The thread wakes up, unlocks spin lock, and deletes itself.
     
    201201  puts( "pthread_spin_destroy( &Spinlock ) -- EBUSY" );
    202202  status = pthread_spin_destroy( &Spinlock );
    203   rtems_test_assert(  status == EBUSY );
     203  rtems_test_assert( status == EBUSY );
    204204
    205205  /* Unlock it for a normal destroy */
    206206  puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
    207207  status = pthread_spin_unlock( &Spinlock );
    208   rtems_test_assert(  status == 0 );
     208  rtems_test_assert( status == 0 );
    209209
    210210  puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
    211211  status = pthread_spin_destroy( &Spinlock );
    212   rtems_test_assert(  status == 0 );
     212  rtems_test_assert( status == 0 );
    213213
    214214  /*************** END OF TEST *****************/
  • testsuites/psxtests/psxspin02/test.c

    r15d5b9a r33c46f1  
    2929  puts( "pthread_spin_trylock( &Spinlock ) -- EBUSY" );
    3030  status = pthread_spin_trylock( &Spinlock );
    31   rtems_test_assert(  status == EBUSY );
     31  rtems_test_assert( status == EBUSY );
    3232
    3333  puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
    3434  status = pthread_spin_unlock( &Spinlock );
    35   rtems_test_assert(  status == EPERM );
     35  rtems_test_assert( status == EPERM );
    3636
    3737  rtems_task_delete( RTEMS_SELF );
     
    6060  puts( "pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE ) -- OK" );
    6161  status = pthread_spin_init( &Spinlock, PTHREAD_PROCESS_PRIVATE );
    62   rtems_test_assert(  status == 0 );
     62  rtems_test_assert( status == 0 );
    6363
    6464  /* Lock it */
    6565  puts( "pthread_spin_lock( &Spinlock ) -- OK" );
    6666  status = pthread_spin_lock( &Spinlock );
    67   rtems_test_assert(  status == 0 );
     67  rtems_test_assert( status == 0 );
    6868
    6969  /*  Create a helper task */
     
    7676     &taskid
    7777  );
    78   rtems_test_assert(  rstatus == RTEMS_SUCCESSFUL );
     78  rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
    7979
    8080  rstatus = rtems_task_start( taskid, SpinlockThread, 0 );
    81   rtems_test_assert(  rstatus == RTEMS_SUCCESSFUL );
     81  rtems_test_assert( rstatus == RTEMS_SUCCESSFUL );
    8282
    8383  sleep(1);
     
    8585  puts( "pthread_spin_unlock( &Spinlock ) -- OK" );
    8686  status = pthread_spin_unlock( &Spinlock );
    87   rtems_test_assert(  status == 0 );
     87  rtems_test_assert( status == 0 );
    8888
    8989  puts( "pthread_spin_destroy( &Spinlock ) -- OK" );
    9090  status = pthread_spin_destroy( &Spinlock );
    91   rtems_test_assert(  status == 0 );
     91  rtems_test_assert( status == 0 );
    9292
    9393  /*************** END OF TEST *****************/
  • testsuites/psxtests/psxstack01/init.c

    r15d5b9a r33c46f1  
    6161  puts( "Init - Initialize thread attribute for user provided stack" );
    6262  sc = pthread_attr_init( &attr );
    63   rtems_test_assert(  !sc );
     63  rtems_test_assert( !sc );
    6464
    6565  sc = pthread_attr_setstackaddr( &attr, Stack_Low );
    66   rtems_test_assert(  !sc );
     66  rtems_test_assert( !sc );
    6767
    6868  sc = pthread_attr_setstacksize( &attr, PTHREAD_MINIMUM_STACK_SIZE );
    69   rtems_test_assert(  !sc );
     69  rtems_test_assert( !sc );
    7070
    7171  /* create threads */
    7272  sc = pthread_create( &id, &attr, Test_Thread, NULL );
    73   rtems_test_assert(  !sc );
     73  rtems_test_assert( !sc );
    7474
    7575  puts( "Init - let other thread run" );
     
    7777  delay_request.tv_nsec = 5 * 100000000;
    7878  sc = nanosleep( &delay_request, NULL );
    79   rtems_test_assert(  !sc );
     79  rtems_test_assert( !sc );
    8080
    8181  puts( "*** END OF POSIX STACK ATTRIBUTE TEST 01 ***" );
  • testsuites/psxtests/psxstack02/init.c

    r15d5b9a r33c46f1  
    6464  puts( "Init - Initialize thread attribute for user provided stack" );
    6565  sc = pthread_attr_init( &attr );
    66   rtems_test_assert(  !sc );
     66  rtems_test_assert( !sc );
    6767
    6868  sc = pthread_attr_setstack( &attr, Stack_Low, PTHREAD_MINIMUM_STACK_SIZE );
    69   rtems_test_assert(  !sc );
     69  rtems_test_assert( !sc );
    7070
    7171  /* create threads */
    7272  sc = pthread_create( &id, &attr, Test_Thread, NULL );
    73   rtems_test_assert(  !sc );
     73  rtems_test_assert( !sc );
    7474
    7575  puts( "Init - let other thread run" );
  • testsuites/psxtests/psxualarm/init.c

    r15d5b9a r33c46f1  
    8080  /* unblock Signal and see if it happened */
    8181  status = sigemptyset( &mask );
    82   rtems_test_assert(  !status );
     82  rtems_test_assert( !status );
    8383  status = sigaddset( &mask, SIGALRM );
    84   rtems_test_assert(  !status );
     84  rtems_test_assert( !status );
    8585  puts( "Init: Unblock SIGALRM" );
    8686  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    87   rtems_test_assert(  !status );
     87  rtems_test_assert( !status );
    8888  status = sleep(10);
    8989
Note: See TracChangeset for help on using the changeset viewer.