Changeset 2317457 in rtems


Ignore:
Timestamp:
Dec 8, 2009, 5:52:53 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
9e7d02a3
Parents:
500fcd5
Message:

2009-12-08 Joel Sherrill <joel.sherrill@…>

  • include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c, psx03/init.c, psx03/task.c, psx04/init.c, psx04/task1.c, psx04/task2.c, psx04/task3.c, psx05/init.c, psx05/task.c, psx05/task2.c, psx05/task3.c, psx06/init.c, psx06/task.c, psx06/task2.c, psx07/init.c, psx08/init.c, psx08/task2.c, psx08/task3.c, psx09/init.c, psx10/init.c, psx10/task.c, psx10/task2.c, psx10/task3.c, psx11/init.c, psx11/task.c, psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c, psxcancel01/init.c, psxchroot01/test.c, psxclock/init.c, psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c, psxfile01/test_write.c, psxitimer/init.c, psxkey01/task.c, psxkey02/init.c, psxkey03/init.c, psxmount/test.c, psxmsgq01/init.c, psxmsgq03/init.c, psxmsgq04/init.c, psxreaddir/test.c, psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c, psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c, psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c, psxstack01/init.c, psxstat/test.c, psxtime/test.c, psxualarm/init.c: Use rtems_test_assert() consistently instead of system assert(). rtems_test_assert() is designed to integrate into the RTEMS test suite infrastructure.
Location:
testsuites/psxtests
Files:
61 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r500fcd5 r2317457  
     12009-12-08      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c,
     4        psx03/init.c, psx03/task.c, psx04/init.c, psx04/task1.c,
     5        psx04/task2.c, psx04/task3.c, psx05/init.c, psx05/task.c,
     6        psx05/task2.c, psx05/task3.c, psx06/init.c, psx06/task.c,
     7        psx06/task2.c, psx07/init.c, psx08/init.c, psx08/task2.c,
     8        psx08/task3.c, psx09/init.c, psx10/init.c, psx10/task.c,
     9        psx10/task2.c, psx10/task3.c, psx11/init.c, psx11/task.c,
     10        psx12/init.c, psxalarm01/init.c, psxbarrier01/test.c,
     11        psxcancel01/init.c, psxchroot01/test.c, psxclock/init.c,
     12        psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c,
     13        psxfile01/test_write.c, psxitimer/init.c, psxkey01/task.c,
     14        psxkey02/init.c, psxkey03/init.c, psxmount/test.c, psxmsgq01/init.c,
     15        psxmsgq03/init.c, psxmsgq04/init.c, psxreaddir/test.c,
     16        psxrwlock01/test.c, psxsem01/init.c, psxsignal01/init.c,
     17        psxsignal01/task1.c, psxsignal02/init.c, psxsignal03/init.c,
     18        psxsignal05/init.c, psxspin01/test.c, psxspin02/test.c,
     19        psxstack01/init.c, psxstat/test.c, psxtime/test.c, psxualarm/init.c:
     20        Use rtems_test_assert() consistently instead of system assert().
     21        rtems_test_assert() is designed to integrate into the RTEMS test
     22        suite infrastructure.
     23
    1242009-12-03      Joel Sherrill <joel.sherrill@oarcorp.com>
    225
  • testsuites/psxtests/include/pmacros.h

    r500fcd5 r2317457  
    11/*
     2 *  COPYRIGHT (c) 1989-2009.
     3 *  On-Line Applications Research Corporation (OAR).
     4 *
     5 *  The license and distribution terms for this file may be
     6 *  found in the file LICENSE in this distribution or at
     7 *  http://www.rtems.com/license/LICENSE.
     8 *
    29 *  $Id$
    310 */
     
    1017#endif
    1118#include <pthread.h>
    12 #include <assert.h>
    1319#include <stdio.h>
    1420#include <string.h>
     
    6571    tv.tv_sec = mktime( &tm ); \
    6672    tv.tv_nsec = 0; \
    67     assert( tv.tv_sec != -1 ); \
     73    rtems_test_assert( tv.tv_sec != -1 ); \
    6874    \
    6975    status = clock_settime( CLOCK_REALTIME, &tv ); \
    70     assert( !status ); \
     76    rtems_test_assert( !status ); \
    7177  } while ( 0 )
    7278
     
    7884    \
    7985    _status = clock_gettime( CLOCK_REALTIME, &_tv ); \
    80     assert( !_status ); \
     86    rtems_test_assert( !_status ); \
    8187    \
    8288    (void) ctime_r( &_tv.tv_sec, _time_buffer ); \
  • testsuites/psxtests/psx01/task.c

    r500fcd5 r2317457  
    3838  puts( "Task_1: sched_yield to Init" );
    3939  status = sched_yield();
    40   assert( !status );
     40  rtems_test_assert( !status );
    4141
    4242    /* switch to Task_1 */
     
    5656  if ( status )
    5757    puts( "Task_1: pthread_equal - match case passed" );
    58   assert( status );
     58  rtems_test_assert( status );
    5959
    6060  status = pthread_equal( Init_id, Task_id );
    6161  if ( !status )
    6262    puts( "Task_1: pthread_equal - different case passed" );
    63   assert( !status );
     63  rtems_test_assert( !status );
    6464
    6565  puts( "Task_1: pthread_equal - first id bad" );
    6666  status = pthread_equal( (pthread_t) -1, Task_id );
    67   assert( !status );
     67  rtems_test_assert( !status );
    6868
    6969  puts( "Task_1: pthread_equal - second id bad" );
    7070  status = pthread_equal( Init_id, (pthread_t) -1 );
    71   assert( !status );
     71  rtems_test_assert( !status );
    7272
    7373  /* exercise pthread_once */
     
    7575  puts( "Task_1: pthread_once - EINVAL (NULL once_control)" );
    7676  status = pthread_once( NULL, Test_init_routine );
    77   assert( status == EINVAL );
     77  rtems_test_assert( status == EINVAL );
    7878
    7979  puts( "Task_1: pthread_once - EINVAL (NULL init_routine)" );
    8080  status = pthread_once( &once, NULL );
    81   assert( status == EINVAL );
     81  rtems_test_assert( status == EINVAL );
    8282
    8383  puts( "Task_1: pthread_once - SUCCESSFUL (init_routine executes)" );
    8484  status = pthread_once( &once, Test_init_routine );
    85   assert( !status );
     85  rtems_test_assert( !status );
    8686
    8787  puts( "Task_1: pthread_once - SUCCESSFUL (init_routine does not execute)" );
    8888  status = pthread_once( &once, Test_init_routine );
    89   assert( !status );
     89  rtems_test_assert( !status );
    9090
    9191  puts( "*** END OF POSIX TEST 1 ***" );
  • testsuites/psxtests/psx02/init.c

    r500fcd5 r2317457  
    5757
    5858  status = sigemptyset( &act.sa_mask );
    59   assert( !status );
     59  rtems_test_assert( !status );
    6060
    6161  act.sa_handler = Signal_handler;
     
    7070
    7171  status = pthread_kill( Init_id, SIGUSR1 );
    72   assert( !status );
     72  rtems_test_assert( !status );
    7373
    7474  Signal_occurred = 0;
     
    7777
    7878  status = sigemptyset( &mask );
    79   assert( !status );
     79  rtems_test_assert( !status );
    8080
    8181  status = sigaddset( &mask, SIGUSR1 );
    82   assert( !status );
     82  rtems_test_assert( !status );
    8383
    8484  printf( "Init: Block SIGUSR1\n" );
    8585  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    86   assert( !status );
     86  rtems_test_assert( !status );
    8787
    8888  status = sigpending( &pending_set );
    89   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   assert( !status );
     95  rtems_test_assert( !status );
    9696
    9797  status = sigpending( &pending_set );
    98   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   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   assert( !status );
     108  rtems_test_assert( !status );
    109109
    110110  /*
     
    123123
    124124    if ( status == -1 ) {
    125       assert( errno == EINTR );
    126       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       assert( !tr.tv_nsec && !tr.tv_sec );
     128      rtems_test_assert( !tr.tv_nsec && !tr.tv_sec );
    129129    }
    130130
  • testsuites/psxtests/psx02/task.c

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

    r500fcd5 r2317457  
    5959
    6060  status = sigemptyset( &act.sa_mask );
    61   assert( !status );
     61  rtems_test_assert( !status );
    6262
    6363  act.sa_handler = Signal_handler;
     
    7878
    7979  status = sigemptyset( &waitset );
    80   assert( !status );
     80  rtems_test_assert( !status );
    8181
    8282  status = sigaddset( &waitset, SIGUSR1 );
    83   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   assert( signo == -1 );
     90  rtems_test_assert( signo == -1 );
    9191
    9292  if ( errno == EAGAIN )
     
    106106
    107107  status = sigemptyset( &mask );
    108   assert( !status );
     108  rtems_test_assert( !status );
    109109
    110110  status = sigaddset( &mask, SIGUSR2 );
    111   assert( !status );
     111  rtems_test_assert( !status );
    112112
    113113  printf( "Init: Block SIGUSR2\n" );
    114114  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    115   assert( !status );
     115  rtems_test_assert( !status );
    116116
    117117  /* create a thread */
    118118
    119119  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    120   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   assert( signo == -1 );
     136  rtems_test_assert( signo == -1 );
    137137
    138138  /*
     
    145145
    146146  status = pthread_create( &Task_id, NULL, Task_2, NULL );
    147   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   assert( signo == SIGUSR1 );
    166   assert( siginfo.si_signo == SIGUSR1 );
    167   assert( siginfo.si_code == SI_USER );
    168   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   assert( !status );
     175  rtems_test_assert( !status );
    176176
    177177  siginfo.si_code = -1;
     
    180180
    181181  status = sigemptyset( &waitset );
    182   assert( !status );
     182  rtems_test_assert( !status );
    183183
    184184  status = sigaddset( &waitset, SIGUSR1 );
    185   assert( !status );
     185  rtems_test_assert( !status );
    186186
    187187  status = sigaddset( &waitset, SIGUSR2 );
    188   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   assert( signo == SIGUSR2 );
    194   assert( siginfo.si_signo == SIGUSR2 );
    195   assert( siginfo.si_code == SI_USER );
    196   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/psx03/task.c

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3434  puts( "Task_1: pthread_kill - SIGUSR2 to Init" );
    3535  status = pthread_kill( Init_id, SIGUSR2 );
    36   assert( !status );
     36  rtems_test_assert( !status );
    3737
    3838  pthread_exit( NULL );
     
    5555  puts( "Task_1: pthread_kill - SIGUSR1 to Init" );
    5656  status = pthread_kill( Init_id, SIGUSR1 );
    57   assert( !status );
     57  rtems_test_assert( !status );
    5858
    5959  pthread_exit( NULL );
  • testsuites/psxtests/psx04/init.c

    r500fcd5 r2317457  
    8686  if ( status != EINVAL )
    8787    printf( "status = %d (%s)\n", status, strerror(status) );
    88   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   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   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   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   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   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   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   assert( !status );
     142  rtems_test_assert( !status );
    143143
    144144/* end of install a signal handler for SIGUSR1 */
     
    151151
    152152  status = sigemptyset( &mask );
    153   assert( !status );
     153  rtems_test_assert( !status );
    154154
    155155  status = sigaddset( &mask, SIGUSR1 );
    156   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   assert( !status );
     171  rtems_test_assert( !status );
    172172
    173173  Signal_occurred = 0;
     
    178178
    179179  status = sigemptyset( &mask );
    180   assert( !status );
     180  rtems_test_assert( !status );
    181181
    182182  status = sigaddset( &mask, SIGUSR1 );
    183   assert( !status );
     183  rtems_test_assert( !status );
    184184
    185185  puts( "Init: Block SIGUSR1" );
    186186  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    187   assert( !status );
     187  rtems_test_assert( !status );
    188188
    189189  status = sigpending( &pending_set );
    190   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   assert( !status );
     195  rtems_test_assert( !status );
    196196
    197197  status = sigpending( &pending_set );
    198   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   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   assert( !status );
     211  rtems_test_assert( !status );
    212212
    213213  puts( "Init: Block SIGUSR1" );
    214214  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    215   assert( !status );
     215  rtems_test_assert( !status );
    216216
    217217  status = sigpending( &pending_set );
    218   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   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   assert( !status );
     229  rtems_test_assert( !status );
    230230
    231231  status = sigpending( &pending_set );
    232   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   assert( !status );
     237  rtems_test_assert( !status );
    238238
    239239     /* switch to task 1 */
     
    246246
    247247  status = sigemptyset( &act.sa_mask );
    248   assert( !status );
     248  rtems_test_assert( !status );
    249249
    250250  act.sa_handler = Signal_handler;
     
    254254
    255255  status = sigemptyset( &mask );
    256   assert( !status );
     256  rtems_test_assert( !status );
    257257
    258258  status = sigaddset( &mask, SIGALRM );
    259   assert( !status );
     259  rtems_test_assert( !status );
    260260
    261261  puts( "Init: Unblock SIGALRM" );
    262262  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    263   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   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   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   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   assert( !status );
     287  rtems_test_assert( !status );
    288288
    289289  status = sigaddset( &mask, SIGUSR1 );
    290   assert( !status );
     290  rtems_test_assert( !status );
    291291
    292292  status = sigaddset( &mask, SIGUSR2 );
    293   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   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   assert( !status );
     304  rtems_test_assert( !status );
    305305
    306306  /* return blocked mask to no signals blocked */
    307307
    308308  status = sigemptyset( &mask );
    309   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   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   assert( !status );
    323 
    324   status = sigemptyset( &mask );
    325   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   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   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   assert( !status );
     349  rtems_test_assert( !status );
    350350
    351351     /* switch to task 1 */
     
    356356
    357357  status = sigemptyset( &mask );
    358   assert( !status );
     358  rtems_test_assert( !status );
    359359
    360360  status = sigaddset( &mask, SIGUSR1 );
    361   assert( !status );
     361  rtems_test_assert( !status );
    362362
    363363  puts( "Init: Block SIGUSR1" );
    364364  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    365   assert( !status );
     365  rtems_test_assert( !status );
    366366
    367367  puts( "Init: send SIGUSR1 to process" );
    368368  status = kill( getpid(), SIGUSR1 );
    369   assert( !status );
     369  rtems_test_assert( !status );
    370370
    371371  puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
    372372  remaining = sleep( 1 );
    373   assert( !status );
     373  rtems_test_assert( !status );
    374374
    375375  /* Send SIGUSR1, Task_3 has issued a sigwait */
    376376
    377377  status = sigemptyset( &mask );
    378   assert( !status );
     378  rtems_test_assert( !status );
    379379
    380380  status = sigaddset( &mask, SIGUSR1 );
    381   assert( !status );
     381  rtems_test_assert( !status );
    382382
    383383  puts( "Init: Block SIGUSR1" );
    384384  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    385   assert( !status );
     385  rtems_test_assert( !status );
    386386
    387387  puts( "Init: send SIGUSR1 to process" );
    388388  status = kill( getpid(), SIGUSR1 );
    389   assert( !status );
     389  rtems_test_assert( !status );
    390390
    391391  puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
    392392  remaining = sleep( 1 );
    393   assert( !status );
     393  rtems_test_assert( !status );
    394394
    395395  /* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
    396396
    397397  status = sigemptyset( &mask );
    398   assert( !status );
     398  rtems_test_assert( !status );
    399399
    400400  status = sigaddset( &mask, SIGUSR2 );
    401   assert( !status );
     401  rtems_test_assert( !status );
    402402
    403403  puts( "Init: Block SIGUSR2" );
    404404  status = sigprocmask( SIG_BLOCK, &mask, NULL );
    405   assert( !status );
     405  rtems_test_assert( !status );
    406406
    407407  puts( "Init: send SIGUSR2 to process" );
    408408  status = kill( getpid(), SIGUSR2 );
    409   assert( !status );
     409  rtems_test_assert( !status );
    410410
    411411  puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
    412412  remaining = sleep( 1 );
    413   assert( !status );
     413  rtems_test_assert( !status );
    414414
    415415  /* Suspend for signal that has already be sent */
     
    417417  puts( "Init: sigsuspend for any signal" );
    418418  status = sigsuspend( &mask );
    419   assert( status );
     419  rtems_test_assert( status );
    420420  printf( "Init: awakended from sigsuspend status=%d \n", status );
    421421
     
    427427  if ( status != -1 )
    428428    printf( "status = %d\n", status );
    429   assert( errno == EINVAL );
     429  rtems_test_assert( errno == EINVAL );
    430430  puts( "Init: sigemptyset - EINVAL (set invalid)" );
    431431
     
    433433  if ( status != -1 )
    434434    printf( "status = %d\n", status );
    435   assert( errno == EINVAL );
     435  rtems_test_assert( errno == EINVAL );
    436436  puts( "Init: sigfillset - EINVAL (set invalid)" );
    437437
     
    439439  if ( status != -1 )
    440440    printf( "status = %d\n", status );
    441   assert( errno == EINVAL );
     441  rtems_test_assert( errno == EINVAL );
    442442  puts( "Init: sigaddset - EINVAL (set invalid)" );
    443443
     
    445445  if ( status != -1 )
    446446    printf( "status = %d\n", status );
    447   assert( errno == EINVAL );
     447  rtems_test_assert( errno == EINVAL );
    448448  puts( "Init: sigaddset - EINVAL (signal = 0)" );
    449449
     
    451451  if ( status != -1 )
    452452    printf( "status = %d\n", status );
    453   assert( errno == EINVAL );
     453  rtems_test_assert( errno == EINVAL );
    454454  puts( "Init: sigaddset - EINVAL (set invalid)" );
    455455
     
    457457  if ( status != -1 )
    458458    printf( "status = %d\n", status );
    459   assert( errno == EINVAL );
     459  rtems_test_assert( errno == EINVAL );
    460460  puts( "Init: sigdelset - EINVAL (set invalid)" );
    461461
    462462  status = sigdelset( &mask, 0 );
    463   assert( !status );
     463  rtems_test_assert( !status );
    464464  puts( "Init: sigdelset - SUCCESSFUL (signal = 0)" );
    465465
     
    467467  if ( status != -1 )
    468468    printf( "status = %d\n", status );
    469   assert( errno == EINVAL );
     469  rtems_test_assert( errno == EINVAL );
    470470  puts( "Init: sigdelset - EINVAL (set invalid)" );
    471471
     
    473473  if ( status != -1 )
    474474    printf( "status = %d\n", status );
    475   assert( errno == EINVAL );
     475  rtems_test_assert( errno == EINVAL );
    476476  puts( "Init: sigismember - EINVAL (set invalid)" );
    477477
    478478  status = sigismember( &mask, 0 );
    479   assert( !status );
     479  rtems_test_assert( !status );
    480480  puts( "Init: sigismember - SUCCESSFUL (signal = 0)" );
    481481
     
    483483  if ( status != -1 )
    484484    printf( "status = %d\n", status );
    485   assert( errno == EINVAL );
     485  rtems_test_assert( errno == EINVAL );
    486486  puts( "Init: sigismember - EINVAL (signal invalid)" );
    487487
     
    489489  if ( status != -1 )
    490490    printf( "status = %d\n", status );
    491   assert( errno == EINVAL );
     491  rtems_test_assert( errno == EINVAL );
    492492  puts( "Init: sigaction - EINVAL (signal = 0)" );
    493493
     
    495495  if ( status != -1 )
    496496    printf( "status = %d\n", status );
    497   assert( errno == EINVAL );
     497  rtems_test_assert( errno == EINVAL );
    498498  puts( "Init: sigaction - EINVAL (signal invalid)" );
    499499
     
    501501  if ( status != -1 )
    502502    printf( "status = %d\n", status );
    503   assert( errno == EINVAL );
     503  rtems_test_assert( errno == EINVAL );
    504504  puts( "Init: sigaction - EINVAL (SIGKILL)" );
    505505
     
    507507  if ( status != -1 )
    508508    printf( "status = %d\n", status );
    509   assert( errno == EINVAL );
     509  rtems_test_assert( errno == EINVAL );
    510510  puts( "Init: pthread_sigmask - EINVAL (set and oset invalid)" );
    511511
     
    513513  if ( status != -1 )
    514514    printf( "status = %d\n", status );
    515   assert( errno == EINVAL );
     515  rtems_test_assert( errno == EINVAL );
    516516  puts( "Init: pthread_sigmask - EINVAL (how invalid)" );
    517517
     
    519519  if ( status != -1 )
    520520    printf( "status = %d\n", status );
    521   assert( errno == EINVAL );
     521  rtems_test_assert( errno == EINVAL );
    522522  puts( "Init: sigpending - EINVAL (set invalid)" );
    523523
     
    526526  if ( status != -1 )
    527527    printf( "status = %d\n", status );
    528   assert( errno == EINVAL );
     528  rtems_test_assert( errno == EINVAL );
    529529  puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid < 0)" );
    530530
     
    533533  if ( status != -1 )
    534534    printf( "status = %d\n", status );
    535   assert( errno == EINVAL );
     535  rtems_test_assert( errno == EINVAL );
    536536  puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
    537537
     
    539539  if ( status != -1 )
    540540    printf( "status = %d\n", status );
    541   assert( errno == EINVAL );
     541  rtems_test_assert( errno == EINVAL );
    542542  puts( "Init: pthread_kill - EINVAL (sig invalid)" );
    543543
     
    545545  if ( status != -1 )
    546546    printf( "status = %d\n", status );
    547   assert( errno == ESRCH );
     547  rtems_test_assert( errno == ESRCH );
    548548  puts( "Init: pthread_kill - ESRCH (signal SA_SIGINFO)" );
    549549
     
    551551  if ( status != -1 )
    552552    printf( "status = %d\n", status );
    553   assert( errno == EINVAL );
     553  rtems_test_assert( errno == EINVAL );
    554554  puts( "Init: pthread_kill - EINVAL (signal = 0)" );
    555555
     
    558558  sigaction( SIGUSR2, &act, NULL );
    559559  status = pthread_kill( Init_id, SIGUSR2 );
    560   assert( !status );
     560  rtems_test_assert( !status );
    561561  puts( "Init: pthread_kill - SUCCESSFUL (signal = SIG_IGN)" );
    562562
     
    564564  if ( status != -1 )
    565565    printf( "status = %d\n", status );
    566   assert( errno == ESRCH );
     566  rtems_test_assert( errno == ESRCH );
    567567  puts( "Init: kill - ESRCH (pid invalid)" );
    568568
     
    570570  if ( status != -1 )
    571571    printf( "status = %d\n", status );
    572   assert( errno == EINVAL );
     572  rtems_test_assert( errno == EINVAL );
    573573  puts( "Init: kill - EINVAL (signal = 0)" );
    574574
     
    576576  if ( status != -1 )
    577577    printf( "status = %d\n", status );
    578   assert( errno == EINVAL );
     578  rtems_test_assert( errno == EINVAL );
    579579  puts( "Init: kill - EINVAL (sig invalid)" );
    580580
  • testsuites/psxtests/psx04/task1.c

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

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    2929  printf( "Task_2: sending SIGUSR1\n" );
    3030  status = pthread_kill( Init_id, SIGUSR1 );
    31   assert( !status );
     31  rtems_test_assert( !status );
    3232
    3333     /* switch to Init */
  • testsuites/psxtests/psx04/task3.c

    r500fcd5 r2317457  
    3636  printf( "Task_3: sigqueue SIGUSR1 with value= %d\n", value.sival_int );
    3737  status = sigqueue( getpid(), SIGUSR1, value );
    38   assert( !status );
     38  rtems_test_assert( !status );
    3939
    4040     /* catch signal with sigwaitinfo */
     
    4343
    4444  status = sigemptyset( &mask );
    45   assert( !status );
     45  rtems_test_assert( !status );
    4646
    4747  status = sigaddset( &mask, SIGUSR1 );
    48   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   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   assert( !status );
     68  rtems_test_assert( !status );
    6969
    7070  status = sigaddset( &mask, SIGUSR1 );
    71   assert( !status );
     71  rtems_test_assert( !status );
    7272
    7373  printf( "Task_3: sigwait SIGUSR1\n" );
     
    7676     /* switch to Init */
    7777
    78   assert( !status );
     78  rtems_test_assert( !status );
    7979  printf( "Task_3: signo= %d\n", sig );
    8080
     
    8484
    8585  status = sigemptyset( &mask );
    86   assert( !status );
     86  rtems_test_assert( !status );
    8787
    8888  status = sigaddset( &mask, SIGUSR1 );
    89   assert( !status );
     89  rtems_test_assert( !status );
    9090
    9191  printf( "Task_3: pause\n" );
     
    9494     /* switch to Init */
    9595
    96   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   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   assert( !status );
     110  rtems_test_assert( !status );
    111111
    112112     /* end of task 3 */
  • testsuites/psxtests/psx05/init.c

    r500fcd5 r2317457  
    4343
    4444  status = pthread_mutexattr_getprotocol( attr, &protocol );
    45   assert( !status );
     45  rtems_test_assert( !status );
    4646
    4747  printf( "%smutex protocol is (%d) -- ", msg, protocol );
     
    5858    default:
    5959      puts( "UNKNOWN" );
    60       assert( 0 );
     60      rtems_test_assert( 0 );
    6161      break;
    6262  }
     
    6565
    6666  status = pthread_mutexattr_getprioceiling( attr, &prioceiling );
    67   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   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       assert( 0 );
     84      rtems_test_assert( 0 );
    8585      break;
    8686  }
     
    124124  int                  priority;
    125125
    126   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   assert( status == EINVAL );
     144  rtems_test_assert( status == EINVAL );
    145145
    146146  puts( "Init: pthread_mutexattr_init - SUCCESSFUL" );
    147147  status = pthread_mutexattr_init( &attr );
    148   assert( !status );
     148  rtems_test_assert( !status );
    149149
    150150  Print_mutexattr( "Init: ", &attr );
     
    153153
    154154  status = pthread_mutexattr_init( &destroyed_attr );
    155   assert( !status );
     155  rtems_test_assert( !status );
    156156
    157157  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    158158  status = pthread_mutexattr_destroy( &destroyed_attr );
    159   assert( !status );
     159  rtems_test_assert( !status );
    160160
    161161  puts( "Init: pthread_mutexattr_destroy - EINVAL (NULL attr)" );
    162162  status = pthread_mutexattr_destroy( NULL );
    163   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   assert( status == EINVAL );
     298  rtems_test_assert( status == EINVAL );
    299299
    300300  /* bad kind */
    301301  status = pthread_mutexattr_init( &attr );
    302   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   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   assert( !status );
     313  rtems_test_assert( !status );
    314314
    315315  puts( "Init: Changing mutex attributes" );
    316316  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    317   assert( !status );
     317  rtems_test_assert( !status );
    318318
    319319  status = pthread_mutexattr_setprioceiling(
     
    321321    (sched_get_priority_max(SCHED_FIFO) / 2) + 1
    322322  );
    323   assert( !status );
     323  rtems_test_assert( !status );
    324324
    325325  status = pthread_mutexattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    326   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   assert( !status );
     332  rtems_test_assert( !status );
    333333
    334334  /*
     
    338338
    339339  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    340   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   assert( !status );
     346  rtems_test_assert( !status );
    347347
    348348  /*
     
    356356  if ( !status )
    357357    printf( "status = %d\n", status );
    358   assert( status == EBUSY );
     358  rtems_test_assert( status == EBUSY );
    359359#endif
    360360
     
    363363  if ( status != EINVAL )
    364364    printf( "status = %d\n", status );
    365   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   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   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   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   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   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   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   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   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   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   assert( status == EBUSY );
     435  rtems_test_assert( status == EBUSY );
    436436
    437437     /* switch to idle */
     
    447447  if ( status )
    448448    printf( "status = %d\n", status );
    449   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   assert( status == EAGAIN );
     453  rtems_test_assert( status == EAGAIN );
    454454
    455455  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    456456  status = pthread_mutexattr_destroy( &attr );
    457   assert( !status );
     457  rtems_test_assert( !status );
    458458
    459459  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    460460  status = pthread_mutex_destroy( &Mutex2_id );
    461   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   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   assert( !status );
     473  rtems_test_assert( !status );
    474474
    475475  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    476476  status = pthread_mutex_init( &Mutex2_id, &attr );
    477   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   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   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   assert( !status );
     493  rtems_test_assert( !status );
    494494
    495495  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    496496  status = pthread_mutex_destroy( &Mutex2_id );
    497   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   assert( !status );
     505  rtems_test_assert( !status );
    506506
    507507  puts(
     
    509509  );
    510510  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    511   assert( !status );
     511  rtems_test_assert( !status );
    512512
    513513  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    514514  status = pthread_mutex_init( &Mutex2_id, &attr );
    515   assert( !status );
     515  rtems_test_assert( !status );
    516516
    517517  puts( "Init: pthread_mutex_trylock - SUCCESSFUL" );
    518518  status = pthread_mutex_trylock( &Mutex2_id );
    519   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   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   assert( !status );
     532  rtems_test_assert( !status );
    533533
    534534  /* switching to Task2 */
    535535
    536536  status = pthread_getschedparam( pthread_self(), &policy, &param );
    537   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   assert( !status );
     542  rtems_test_assert( !status );
    543543
    544544  puts( "Init: pthread_mutexattr_destroy - SUCCESSFUL" );
    545545  status = pthread_mutexattr_destroy( &attr );
    546   assert( !status );
     546  rtems_test_assert( !status );
    547547
    548548  puts( "Init: pthread_mutex_destroy - SUCCESSFUL" );
    549549  status = pthread_mutex_destroy( &Mutex2_id );
    550   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   assert( !status );
     558  rtems_test_assert( !status );
    559559
    560560  puts(
     
    562562  );
    563563  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
    564   assert( !status );
     564  rtems_test_assert( !status );
    565565
    566566  puts( "Init: pthread_mutex_init - SUCCESSFUL" );
    567567  status = pthread_mutex_init( &Mutex2_id, &attr );
    568   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   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   assert( status == EINVAL );
     576  rtems_test_assert( status == EINVAL );
    577577
    578578  status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
    579   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   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   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   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   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   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   assert( !status );
     614  rtems_test_assert( !status );
    615615
    616616  status = pthread_getschedparam( pthread_self(), &policy, &param );
    617   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   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   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   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   assert( !status );
     645  rtems_test_assert( !status );
    646646
    647647  status = pthread_mutex_getprioceiling( &Mutex2_id, &ceiling );
    648   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   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   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   assert( !status );
     681  rtems_test_assert( !status );
    682682
    683683  puts( "*** END OF POSIX TEST 5 ***" );
  • testsuites/psxtests/psx05/task.c

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3232  if ( status != EBUSY )
    3333    printf( "status = %d\n", status );
    34   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   assert( !status );
     40  rtems_test_assert( !status );
    4141
    4242     /* switch to init */
  • testsuites/psxtests/psx05/task2.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3131  if ( status )
    3232    printf( "status =%d\n", status );
    33   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   assert( !status );
     40  rtems_test_assert( !status );
    4141
    4242  printf( "Task 2: exit\n" );
  • testsuites/psxtests/psx05/task3.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3232  status = pthread_mutex_lock( &Mutex2_id );
    3333  printf( "Task 3: mutex acquired\n" );
    34   assert( !status );
     34  rtems_test_assert( !status );
    3535
    3636  printf( "Task 3: unlock Mutex 2\n" );
    3737  status = pthread_mutex_unlock( &Mutex2_id );
    38   assert( !status );
     38  rtems_test_assert( !status );
    3939
    4040  status = pthread_getschedparam( pthread_self(), &policy, &param );
    41   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

    r500fcd5 r2317457  
    5353
    5454  status = pthread_create( &Task_id, NULL, Task_1, NULL );
    55   assert( !status );
     55  rtems_test_assert( !status );
    5656
    5757  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    58   assert( !status );
     58  rtems_test_assert( !status );
    5959
    6060  /* create a key */
     
    6767  if ( status )
    6868    printf( "status = %d\n", status );
    69   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   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   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   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   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   assert( !status );
     93  rtems_test_assert( !status );
    9494
    9595     /* switch to task 1 */
     
    102102  if ( remaining )
    103103     printf( "seconds remaining = %d\n", remaining );
    104   assert( !remaining );
     104  rtems_test_assert( !remaining );
    105105
    106106     /* switch to task 1 */
     
    112112  if ( status )
    113113    printf( "status = %d\n", status );
    114   assert( !status );
     114  rtems_test_assert( !status );
    115115
    116116  printf( "Destructor invoked %d times\n", Destructor_invoked );
  • testsuites/psxtests/psx06/task.c

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3333  if ( status )
    3434    printf( "status = %d\n", status );
    35   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   assert( !status );
     42  rtems_test_assert( !status );
    4343
    4444  puts( "Task_1: exitting" );
  • testsuites/psxtests/psx06/task2.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3434  if ( status )
    3535    printf( "status = %d\n", status );
    36   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   assert( !status );
     43  rtems_test_assert( !status );
    4444
    4545  puts( "Task2: exitting" );
  • testsuites/psxtests/psx07/init.c

    r500fcd5 r2317457  
    583583  puts( "Init - pthread_attr_setinheritsched - EXPLICIT - SUCCESSFUL" );
    584584  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    585   assert( !status );
     585  rtems_test_assert( !status );
    586586
    587587  schedparam.ss_replenish_period.tv_sec = 3;
     
    600600
    601601  status = pthread_create( &Task2_id, &attr, Task_2, NULL );
    602   assert( !status );
     602  rtems_test_assert( !status );
    603603
    604604  status = pthread_join( Task2_id, NULL );
  • testsuites/psxtests/psx08/init.c

    r500fcd5 r2317457  
    3434  puts( "Init: pthread_detach - ESRCH (invalid id)" );
    3535  status = pthread_detach( (pthread_t) -1 );
    36   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   assert( !status );
     42  rtems_test_assert( !status );
    4343
    4444  /* create thread */
    4545
    4646  status = pthread_create( &Task1_id, NULL, Task_1, NULL );
    47   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   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   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   assert( !status );
     72  rtems_test_assert( !status );
    7373
    7474  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
    75   assert( !status );
     75  rtems_test_assert( !status );
    7676
    7777  puts( "Init: pthread_join - SUCCESSFUL" );
     
    8282  if ( status )
    8383    printf( "status = %d\n", status );
    84   assert( !status );
     84  rtems_test_assert( !status );
    8585
    8686  if ( return_pointer == &Task2_id )
  • testsuites/psxtests/psx08/task2.c

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3838  if ( status != EINVAL )
    3939    printf( "status = %d\n", status );
    40   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   assert( status == EDEADLK );
     46  rtems_test_assert( status == EDEADLK );
    4747
    4848  puts( "Task_2: exitting" );
  • testsuites/psxtests/psx08/task3.c

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3434  if ( status )
    3535    printf( "status = %d\n", status );
    36   assert( !status );
     36  rtems_test_assert( !status );
    3737
    3838  if ( return_pointer == &Task2_id )
  • testsuites/psxtests/psx09/init.c

    r500fcd5 r2317457  
    7373  puts( "Init: pthread_getschedparam - SUCCESSFUL" );
    7474  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    75   assert( !status );
     75  rtems_test_assert( !status );
    7676
    7777  priority = schedparam.sched_priority;
     
    8989  puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
    9090  status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
    91   assert( !status );
    92 
    93   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    94   assert( !status );
     91  rtems_test_assert( !status );
     92
     93  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     94  rtems_test_assert( !status );
    9595
    9696  priority = schedparam.sched_priority;
     
    102102  for ( passes=0 ; passes <= 3 ; ) {
    103103    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    104     assert( !status );
     104    rtems_test_assert( !status );
    105105
    106106    if ( priority != schedparam.sched_priority ) {
     
    117117
    118118  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    119   assert( !status );
     119  rtems_test_assert( !status );
    120120
    121121  schedparam.ss_replenish_period.tv_sec = 0;
     
    133133  puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
    134134  status = pthread_setschedparam( pthread_self(), SCHED_SPORADIC, &schedparam );
    135   assert( !status );
     135  rtems_test_assert( !status );
    136136
    137137  puts( "Init: Initializing mutex attributes for priority ceiling" );
    138138  status = pthread_mutexattr_init( &attr );
    139   assert( !status );
     139  rtems_test_assert( !status );
    140140
    141141  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
    142   assert( !status );
     142  rtems_test_assert( !status );
    143143
    144144  puts( "Init: Creating a mutex" );
     
    146146  if ( status )
    147147    printf( "status = %d\n", status );
    148   assert( !status );
    149 
    150   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    151   assert( !status );
     148  rtems_test_assert( !status );
     149
     150  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     151  rtems_test_assert( !status );
    152152
    153153  priority = schedparam.sched_priority;
     
    163163  if ( status )
    164164    printf( "status = %d %s\n", status, strerror(status) );
    165   assert( !status );
     165  rtems_test_assert( !status );
    166166
    167167  for ( ; ; ) {
    168168    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    169     assert( !status );
     169    rtems_test_assert( !status );
    170170
    171171    if ( schedparam.sched_priority == LOW_PRIORITY ) {
     
    183183
    184184    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    185     assert( !status );
     185    rtems_test_assert( !status );
    186186
    187187    priority = schedparam.sched_priority;
     
    198198  if ( status )
    199199    printf( "status = %d\n", status );
    200   assert( !status );
    201 
    202   status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    203   assert( !status );
     200  rtems_test_assert( !status );
     201
     202  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
     203  rtems_test_assert( !status );
    204204
    205205  priority = schedparam.sched_priority;
     
    209209  for ( ; ; ) {
    210210    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    211     assert( !status );
     211    rtems_test_assert( !status );
    212212
    213213    if ( schedparam.sched_priority == LOW_PRIORITY )
     
    216216
    217217  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
    218   assert( !status );
     218  rtems_test_assert( !status );
    219219
    220220  priority = schedparam.sched_priority;
  • testsuites/psxtests/psx10/init.c

    r500fcd5 r2317457  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2009.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    3030  puts( "Init: pthread_condattr_init" );
    3131  status = pthread_condattr_init( &attr );
    32   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   assert( status == EINVAL );
     38  rtems_test_assert( status == EINVAL );
    3939
    4040  puts( "Init: pthread_condattr_destroy" );
    4141  status = pthread_condattr_destroy( &attr );
    42   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   assert( status == EINVAL );
     48  rtems_test_assert( status == EINVAL );
    4949
    5050  puts( "Init: pthread_condattr_init" );
    5151  status = pthread_condattr_init( &attr );
    52   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   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   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   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   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   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   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   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   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   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   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   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   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   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   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   assert( !status );
     141  rtems_test_assert( !status );
    142142
    143143  empty_line();
    144144
    145145  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
    146   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   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   assert( !status );
     165  rtems_test_assert( !status );
    166166
    167167/* set timeout to 3 seconds */
    168168
    169169  status = clock_gettime( CLOCK_REALTIME, &timeout );
    170   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   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   assert( !status );
     182  rtems_test_assert( !status );
    183183
    184184/* remaining error messages */
     
    191191  if ( status != EINVAL )
    192192    printf( "status = %d\n", status );
    193   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   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   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   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   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   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   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   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   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   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   assert( !status );
     246  rtems_test_assert( !status );
    247247
    248248  status = pthread_mutex_lock( &Mutex_id );
    249   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     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   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   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  *   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  *  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  *  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   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   assert( !status );
     302  rtems_test_assert( !status );
    303303
    304304/* signal a condition variable to task3 */
  • testsuites/psxtests/psx10/task.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3232
    3333  status = pthread_mutex_init( &Mutex_id, NULL );
    34   assert( !status );
     34  rtems_test_assert( !status );
    3535
    3636  status = pthread_mutex_lock( &Mutex_id );
    37   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   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   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   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   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   assert( !status );
     58  rtems_test_assert( !status );
    5959
    6060  puts( "Task_1: task exit" );
  • testsuites/psxtests/psx10/task2.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3030
    3131  status = pthread_mutex_lock( &Mutex_id );
    32   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   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   assert( !status );
     40  rtems_test_assert( !status );
    4141
    4242  puts( "Task_2: task exit" );
  • testsuites/psxtests/psx10/task3.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3030
    3131  status = pthread_mutex_lock( &Mutex_id );
    32   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   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

    r500fcd5 r2317457  
    11/*
    2  *  COPYRIGHT (c) 1989-2008.
     2 *  COPYRIGHT (c) 1989-2009.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5353  );
    5454  status = pthread_setschedparam( Init_id, SCHED_FIFO, &param );
    55   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   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   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   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   assert( !status );
     86  rtems_test_assert( !status );
    8787
    8888  puts( "Init: join with the other thread" );
    8989  status = pthread_join( Task_id, NULL );
    90   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   assert( !status );
     96  rtems_test_assert( !status );
    9797
    9898  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    99   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   assert( !status );
     104  rtems_test_assert( !status );
    105105
    106106  puts( "Init: join with the other thread" );
    107107  status = pthread_join( Task_id, NULL );
    108   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   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   assert( !status );
     121  rtems_test_assert( !status );
    122122
    123123  puts( "Init: join with the other thread" );
    124124  status = pthread_join( Task_id, NULL );
    125   assert( !status );
     125  rtems_test_assert( !status );
    126126
    127127  puts( "*** END OF POSIX TEST 11 ***" );
  • testsuites/psxtests/psx11/task.c

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

    r500fcd5 r2317457  
    6363  puts( "Init: pthread_attr_init - SUCCESSFUL" );
    6464  status = pthread_attr_init( &attr );
    65   assert( !status );
     65  rtems_test_assert( !status );
    6666
    6767  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    68   assert( !status );
     68  rtems_test_assert( !status );
    6969  attr.schedpolicy = -1;
    7070
    7171  puts( "Init: pthread_create - EINVAL (invalid scheduling policy)" );
    7272  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    73   assert( status == EINVAL );
     73  rtems_test_assert( status == EINVAL );
    7474
    7575  /* replenish period < budget error */
     
    7777  puts( "Init: pthread_attr_init - SUCCESSFUL" );
    7878  status = pthread_attr_init( &attr );
    79   assert( !status );
     79  rtems_test_assert( !status );
    8080
    8181  puts( "Init: set scheduling parameter attributes for sporadic server" );
    8282  status = pthread_attr_setschedpolicy( &attr, SCHED_SPORADIC );
    83   assert( !status );
     83  rtems_test_assert( !status );
    8484
    8585  schedparam.ss_replenish_period.tv_sec = 1;
     
    9292
    9393  status = pthread_attr_setschedparam( &attr, &schedparam );
    94   assert( !status );
     94  rtems_test_assert( !status );
    9595
    9696  status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    97   assert( !status );
     97  rtems_test_assert( !status );
    9898
    9999  puts( "Init: pthread_create - EINVAL (replenish < budget)" );
    100100  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    101   assert( status == EINVAL );
     101  rtems_test_assert( status == EINVAL );
    102102
    103103  /* invalid ss_low_priority error */
     
    112112
    113113  status = pthread_attr_setschedparam( &attr, &schedparam );
    114   assert( !status );
     114  rtems_test_assert( !status );
    115115
    116116  puts( "Init: pthread_create - EINVAL (invalid ss_low_priority)" );
    117117  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    118   assert( status == EINVAL );
     118  rtems_test_assert( status == EINVAL );
    119119
    120120  /* create a thread as a sporadic server */
     
    129129
    130130  status = pthread_attr_setschedparam( &attr, &schedparam );
    131   assert( !status );
     131  rtems_test_assert( !status );
    132132
    133133  puts( "Init: pthread_create - SUCCESSFUL" );
    134134  status = pthread_create( &Task_id, &attr, Task_1, NULL );
    135   assert( !status );
     135  rtems_test_assert( !status );
    136136
    137137  status = pthread_join( Task_id, NULL );
    138   assert( status );
     138  rtems_test_assert( status );
    139139
    140140    /* switch to Task_1 */
  • testsuites/psxtests/psxalarm01/init.c

    r500fcd5 r2317457  
    7171
    7272  sc = sigemptyset( &act.sa_mask );
    73   assert( !sc );
     73  rtems_test_assert( !sc );
    7474
    7575  act.sa_handler = Signal_handler;
     
    7979
    8080  sc = sigemptyset( &mask );
    81   assert( !sc );
     81  rtems_test_assert( !sc );
    8282
    8383  sc = sigaddset( &mask, SIGALRM );
    84   assert( !sc );
     84  rtems_test_assert( !sc );
    8585
    8686  puts( "Init: Unblock SIGALRM" );
    8787  sc = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    88   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   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   assert( remaining == 0 );
     103  rtems_test_assert( remaining == 0 );
    104104
    105105  puts( "*** END OF POSIX ALARM TEST 01***" );
  • testsuites/psxtests/psxbarrier01/test.c

    r500fcd5 r2317457  
    1212 */
    1313
    14 #include <assert.h>
    1514#include <stdio.h>
    1615#include <errno.h>
     
    3534  status = pthread_barrier_wait( &Barrier );
    3635  printf( "pthread_barrier_wait - 0x%08" PRIxpthread_t " released\n", id );
    37   assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
     36  rtems_test_assert( (status == 0) || (status == PTHREAD_BARRIER_SERIAL_THREAD) );
    3837
    3938  return NULL;
     
    6766  puts( "pthread_barrierattr_init( NULL ) -- EINVAL" );
    6867  status = pthread_barrierattr_init( NULL );
    69   assert( status == EINVAL );
     68  rtems_test_assert( status == EINVAL );
    7069
    7170  puts( "pthread_barrierattr_setpshared( NULL, private ) -- EINVAL" );
    7271  status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
    73   assert( status == EINVAL );
     72  rtems_test_assert( status == EINVAL );
    7473
    7574  puts( "pthread_barrierattr_setpshared( NULL, shared ) -- EINVAL" );
    7675  status = pthread_barrierattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
    77   assert( status == EINVAL );
     76  rtems_test_assert( status == EINVAL );
    7877
    7978  puts( "pthread_barrierattr_getpshared( NULL, &p ) -- EINVAL" );
    8079  status = pthread_barrierattr_getpshared( NULL, &p );
    81   assert( status == EINVAL );
     80  rtems_test_assert( status == EINVAL );
    8281
    8382  puts( "pthread_barrierattr_destroy( NULL ) -- EINVAL" );
    8483  status = pthread_barrierattr_destroy( NULL );
    85   assert( status == EINVAL );
     84  rtems_test_assert( status == EINVAL );
    8685
    8786  /*************** NOT INITIALIZED CHECKS *****************/
     
    9089  puts( "pthread_barrierattr_setpshared( &attr, shared ) -- EINVAL" );
    9190  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    92   assert( status == EINVAL );
     91  rtems_test_assert( status == EINVAL );
    9392
    9493  puts( "pthread_barrierattr_getpshared( &attr, NULL ) -- EINVAL" );
    9594  status = pthread_barrierattr_getpshared( &attr, NULL );
    96   assert( status == EINVAL );
     95  rtems_test_assert( status == EINVAL );
    9796
    9897  puts( "pthread_barrierattr_destroy( &attr ) -- EINVAL" );
    9998  status = pthread_barrierattr_destroy( &attr );
    100   assert( status == EINVAL );
     99  rtems_test_assert( status == EINVAL );
    101100
    102101
     
    105104  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    106105  status = pthread_barrierattr_init( &attr );
    107   assert( status == 0 );
     106  rtems_test_assert( status == 0 );
    108107
    109108  puts( "pthread_barrierattr_setpshared( &attr, private ) -- OK" );
    110109  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
    111   assert( status == 0 );
     110  rtems_test_assert( status == 0 );
    112111
    113112  puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
    114113  status = pthread_barrierattr_getpshared( &attr, &p );
    115   assert( status == 0 );
    116   assert( p == PTHREAD_PROCESS_PRIVATE );
     114  rtems_test_assert( status == 0 );
     115  rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
    117116
    118117  puts( "pthread_barrierattr_setpshared( &attr, shared ) -- OK" );
    119118  status = pthread_barrierattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    120   assert( status == 0 );
     119  rtems_test_assert( status == 0 );
    121120
    122121  puts( "pthread_barrierattr_getpshared( &attr, &p ) -- OK" );
    123122  status = pthread_barrierattr_getpshared( &attr, &p );
    124   assert( status == 0 );
    125   assert( p == PTHREAD_PROCESS_SHARED );
     123  rtems_test_assert( status == 0 );
     124  rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
    126125
    127126  /*************** BAD PSHARED CHECK *****************/
    128127  puts( "pthread_barrierattr_setpshared( &attr, private ) -- EINVAL" );
    129128  status = pthread_barrierattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
    130   assert( status == EINVAL );
     129  rtems_test_assert( status == EINVAL );
    131130
    132131  /*************** DESTROY/REUSE CHECK *****************/
    133132  puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
    134133  status = pthread_barrierattr_destroy( &attr );
    135   assert( status == 0 );
     134  rtems_test_assert( status == 0 );
    136135
    137136  puts( "pthread_barrierattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
    138137  status = pthread_barrierattr_getpshared( &attr, &p );
    139   assert( status == EINVAL );
     138  rtems_test_assert( status == EINVAL );
    140139
    141140  /*************** pthread_barrier_init ERROR CHECKs *********/
     
    143142  puts( "pthread_barrier_init( NULL, NULL, 2 ) -- EINVAL" );
    144143  status = pthread_barrier_init( NULL, NULL, 2 );
    145   assert( status == EINVAL );
     144  rtems_test_assert( status == EINVAL );
    146145
    147146  /* uninitialized attr argument */
    148147  puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- EINVAL" );
    149148  status = pthread_barrier_init( &barrier, &attr, 2 );
    150   assert( status == EINVAL );
     149  rtems_test_assert( status == EINVAL );
    151150
    152151  /* zero count argument */
    153152  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    154153  status = pthread_barrierattr_init( &attr );
    155   assert( status == 0 );
     154  rtems_test_assert( status == 0 );
    156155
    157156  puts( "pthread_barrier_init( &barrier, &attr, 0 ) -- EINVAL" );
    158157  status = pthread_barrier_init( &barrier, &attr, 0 );
    159   assert( status == EINVAL );
     158  rtems_test_assert( status == EINVAL );
    160159
    161160  /* allocating too many */
    162161  puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- OK" );
    163162  status = pthread_barrier_init( &barrier, NULL, 1 );
    164   assert( status == 0 );
     163  rtems_test_assert( status == 0 );
    165164
    166165  puts( "pthread_barrier_init( &barrier, NULL, 1 ) -- EAGAIN" );
    167166  status = pthread_barrier_init( &barrier, NULL, 1 );
    168   assert( status == EAGAIN );
     167  rtems_test_assert( status == EAGAIN );
    169168
    170169  /* clean up */
    171170  puts( "pthread_barrier_destroy( &barrier ) -- OK" );
    172171  status = pthread_barrier_destroy( &barrier );
    173   assert( status == 0 );
     172  rtems_test_assert( status == 0 );
    174173
    175174  puts( "pthread_barrierattr_destroy( &attr ) -- OK" );
    176175  status = pthread_barrierattr_destroy( &attr );
    177   assert( status == 0 );
     176  rtems_test_assert( status == 0 );
    178177
    179178  /*************** pthread_barrier_destroy ERROR CHECKs *********/
     
    181180  puts( "pthread_barrier_destroy( NULL ) -- EINVAL" );
    182181  status = pthread_barrier_destroy( NULL );
    183   assert( status == EINVAL );
     182  rtems_test_assert( status == EINVAL );
    184183
    185184  puts( "pthread_barrier_destroy( &bad_barrier ) -- EINVAL" );
    186185  status = pthread_barrier_destroy( &bad_barrier );
    187   assert( status == EINVAL );
     186  rtems_test_assert( status == EINVAL );
    188187
    189188  /*************** pthread_barrier_wait ERROR CHECKs *********/
     
    191190  puts( "pthread_barrier_wait( NULL ) -- EINVAL" );
    192191  status = pthread_barrier_wait( NULL );
    193   assert( status == EINVAL );
     192  rtems_test_assert( status == EINVAL );
    194193
    195194  puts( "pthread_barrier_wait( &bad_barrier ) -- EINVAL" );
    196195  status = pthread_barrier_wait( &bad_barrier );
    197   assert( status == EINVAL );
     196  rtems_test_assert( status == EINVAL );
    198197
    199198  /*************** ACTUALLY CREATE ONE CHECK *****************/
    200199  puts( "pthread_barrierattr_init( &attr ) -- OK" );
    201200  status = pthread_barrierattr_init( &attr );
    202   assert( status == 0 );
     201  rtems_test_assert( status == 0 );
    203202
    204203  puts( "pthread_barrier_init( &barrier, &attr, 2 ) -- OK" );
    205204  status = pthread_barrier_init( &barrier, &attr, 2 );
    206   assert( status == 0 );
    207   assert( barrier != 0 );
     205  rtems_test_assert( status == 0 );
     206  rtems_test_assert( barrier != 0 );
    208207
    209208  puts( "pthread_barrier_destroy( &barrier ) -- OK" );
    210209  status = pthread_barrier_destroy( &barrier );
    211   assert( status == 0 );
     210  rtems_test_assert( status == 0 );
    212211
    213212  /*************** CREATE THREADS AND LET THEM RELEASE *****************/
    214213  puts( "pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS ) -- OK" );
    215214  status = pthread_barrier_init( &Barrier, &attr, NUMBER_THREADS );
    216   assert( status == 0 );
    217   assert( barrier != 0 );
     215  rtems_test_assert( status == 0 );
     216  rtems_test_assert( barrier != 0 );
    218217
    219218  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
     
    223222      puts( "pthread_barrier_destroy( &Barrier ) -- EBUSY" );
    224223      status = pthread_barrier_destroy( &Barrier );
    225       assert( status == EBUSY );
     224      rtems_test_assert( status == EBUSY );
    226225    }
    227226
     
    229228    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    230229    status = pthread_create(&ThreadIds[i], NULL, BarrierThread, &ThreadIds[i]);
    231     assert( !status );
     230    rtems_test_assert( !status );
    232231
    233232    sleep(1);
  • testsuites/psxtests/psxcancel01/init.c

    r500fcd5 r2317457  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2009.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    6464
    6565  status = rtems_timer_fire_after( timer_id, 10, TSR, NULL );
    66   assert( !status );
     66  rtems_test_assert( !status );
    6767
    6868  start = rtems_clock_get_ticks_since_boot();
     
    9595    &timer_id
    9696  );
    97   assert( !status );
     97  rtems_test_assert( !status );
    9898
    9999  doit( Cancel_duringISR_TSR, "pthread_cancel" );
  • testsuites/psxtests/psxchroot01/test.c

    r500fcd5 r2317457  
    1616 *  record where DIRENT_SIZE seems to be 12 bytes.
    1717 *
     18 *  COPYRIGHT (c) 1989-2009.
     19 *  On-Line Applications Research Corporation (OAR).
    1820 *
     21 *  The license and distribution terms for this file may be
     22 *  found in the file LICENSE in this distribution or at
     23 *  http://www.rtems.com/license/LICENSE.
    1924 *
    2025 *  $Id$
     
    2530#include <fcntl.h>
    2631#include <string.h>
    27 #include <assert.h>
    2832#include <unistd.h>
    2933#include <errno.h>
     
    3640  int fd;
    3741
    38   assert( file );
     42  rtems_test_assert( file );
    3943
    4044  fd = open( file, O_RDWR|O_CREAT, 0777 );
    41   assert( fd != -1 );
     45  rtems_test_assert( fd != -1 );
    4246  close( fd );
    4347}
     
    4852  struct stat statbuf;
    4953
    50   assert( file );
     54  rtems_test_assert( file );
    5155
    5256  status = stat( file, &statbuf );
     
    8791
    8892  status = mkdir( "/one", 0777);
    89   assert( status == 0 );
     93  rtems_test_assert( status == 0 );
    9094
    9195  status = mkdir( "/one/one", 0777);
    92   assert( status == 0 );
     96  rtems_test_assert( status == 0 );
    9397
    9498  status = mkdir( "/one/two", 0777);
    95   assert( status == 0 );
     99  rtems_test_assert( status == 0 );
    96100
    97101  touch( "/one/one.test" );
     
    99103
    100104  status = chroot( "/one" );
    101   assert( status == 0 );
     105  rtems_test_assert( status == 0 );
    102106
    103107  status = fileexists( "/one/one.test" );
  • testsuites/psxtests/psxclock/init.c

    r500fcd5 r2317457  
    211211  delay_request.tv_nsec = 35000000;
    212212  sc = nanosleep( &delay_request, NULL );
    213   assert( !sc );
     213  rtems_test_assert( !sc );
    214214
    215215  /* print the current real time again */
  • testsuites/psxtests/psxfile01/test.c

    r500fcd5 r2317457  
    3232#include <ctype.h>
    3333
    34 #include <assert.h>
    3534#include <rtems.h>
    3635#include <rtems/libio.h>
     
    101100  struct stat statbuf;
    102101
    103   assert( file );
     102  rtems_test_assert( file );
    104103
    105104  printf( "stat( %s ) returned ", file );
     
    170169  puts( "stat of /dev/console" );
    171170  status = stat( "/dev/console", &buf );
    172   assert( !status );
     171  rtems_test_assert( !status );
    173172
    174173  dump_statbuf( &buf );
     
    181180  puts( "mkdir /dev/tty" );
    182181  status = mkdir( "/dev/tty", S_IRWXU );
    183   assert( !status );
     182  rtems_test_assert( !status );
    184183
    185184  puts( "" );
    186185  puts( "mkdir /usr" );
    187186  status = mkdir( "/usr", S_IRWXU );
    188   assert( !status );
     187  rtems_test_assert( !status );
    189188  puts( "mkdir /etc" );
    190189  status = mkdir( "/etc", S_IRWXU );
    191   assert( !status );
     190  rtems_test_assert( !status );
    192191
    193192  puts( "mkdir /tmp" );
    194193  status = mkdir( "/tmp", S_IRWXU );
    195   assert( !status );
     194  rtems_test_assert( !status );
    196195
    197196  /* this tests the ".." path in path name evaluation */
    198197  puts( "mkdir /tmp/.." );
    199198  status = mkdir( "/tmp/..", S_IRWXU );
    200   assert( status == -1 );
    201   assert( errno == EEXIST );
     199  rtems_test_assert( status == -1 );
     200  rtems_test_assert( errno == EEXIST );
    202201
    203202  /* now check out trailing separators */
    204203  puts( "mkdir /tmp/" );
    205204  status = mkdir( "/tmp/", S_IRWXU );
    206   assert( status == -1 );
    207   assert( errno == EEXIST );
     205  rtems_test_assert( status == -1 );
     206  rtems_test_assert( errno == EEXIST );
    208207
    209208  /* try to make a directory under a non-existent subdirectory */
    210209  puts( "mkdir /j/j1" );
    211210  status = mkdir( "/j/j1", S_IRWXU );
    212   assert( status == -1 );
    213   assert( errno == ENOENT );
     211  rtems_test_assert( status == -1 );
     212  rtems_test_assert( errno == ENOENT );
    214213
    215214  /* this tests the ability to make a directory in the current one */
    216215  puts( "mkdir tmp" );
    217216  status = mkdir( "tmp", S_IRWXU );
    218   assert( status == -1 );
    219   assert( errno == EEXIST );
     217  rtems_test_assert( status == -1 );
     218  rtems_test_assert( errno == EEXIST );
    220219
    221220  /* test rtems_filesystem_evaluate_path by sending NULL path */
    222221  status = chdir( NULL );
    223   assert( status == -1 );
     222  rtems_test_assert( status == -1 );
    224223
    225224  /*
     
    230229  puts( "rmdir /usr" );
    231230  status = rmdir( "/usr" );
    232   assert( !status );
     231  rtems_test_assert( !status );
    233232
    234233  puts( "rmdir /dev" );
    235234  status = rmdir( "/dev" );
    236   assert( status == -1 );
    237   assert( errno ==  ENOTEMPTY);
     235  rtems_test_assert( status == -1 );
     236  rtems_test_assert( errno ==  ENOTEMPTY);
    238237
    239238  puts( "rmdir /fred" );
    240239  status = rmdir ("/fred");
    241   assert (status == -1);
    242   assert( errno == ENOENT );
     240  rtems_test_assert (status == -1);
     241  rtems_test_assert( errno == ENOENT );
    243242
    244243  puts( "mknod /dev/test_console" );
    245244  status = mknod( "/dev/test_console", S_IFCHR, 0LL );
    246   assert( !status );
     245  rtems_test_assert( !status );
    247246
    248247  puts( "mknod /dev/tty/S3" );
    249248  status = mknod( "/dev/tty/S3", S_IFCHR, 0xFF00000080LL );
    250   assert( !status );
     249  rtems_test_assert( !status );
    251250
    252251  puts ("mknod /etc/passwd");
    253252  status = mknod( "/etc/passwd", (S_IFREG | S_IRWXU), 0LL );
    254   assert( !status );
     253  rtems_test_assert( !status );
    255254
    256255  puts( "mkdir /tmp/my_dir");
    257256  status = mkdir( "/tmp/my_dir", S_IRWXU );
    258   assert( status == 0 );
     257  rtems_test_assert( status == 0 );
    259258
    260259  puts("mkfifo /c/my_dir" );
    261260  status = mkfifo( "/c/my_dir", S_IRWXU );
    262   assert( status == -1 );
     261  rtems_test_assert( status == -1 );
    263262
    264263  /*
     
    268267  puts( "mkdir /etc/passwd/j" );
    269268  status = mkdir( "/etc/passwd/j", S_IRWXU );
    270   assert( status == -1 );
    271   assert( errno == ENOTDIR );
     269  rtems_test_assert( status == -1 );
     270  rtems_test_assert( errno == ENOTDIR );
    272271
    273272  /*
     
    277276  puts( "open /tmp/joel - should fail with ENOENT" );
    278277  fd = open( "/tmp/joel", O_RDONLY );
    279   assert( fd == -1 );
    280   assert( errno == ENOENT );
     278  rtems_test_assert( fd == -1 );
     279  rtems_test_assert( errno == ENOENT );
    281280
    282281  /*
     
    286285  puts( "open /tmp/j" );
    287286  fd = open( "/tmp/j", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
    288   assert( fd != -1 );
     287  rtems_test_assert( fd != -1 );
    289288  printf( "open returned file descriptor %d\n", fd );
    290289
    291290  puts( "close /tmp/j" );
    292291  status = close( fd );
    293   assert( !status );
     292  rtems_test_assert( !status );
    294293
    295294  puts( "close /tmp/j again" );
    296295  status = close( fd );
    297   assert( status == -1 );
     296  rtems_test_assert( status == -1 );
    298297
    299298  puts( "unlink /tmp/j" );
    300299  status = unlink( "/tmp/j" );
    301   assert( !status );
     300  rtems_test_assert( !status );
    302301
    303302  puts( "unlink /tmp" );
    304303  status = unlink( "/tmp" );
    305   assert( status );
     304  rtems_test_assert( status );
    306305
    307306  /*
     
    311310  puts("create and close /tmp/tom");
    312311  fd = open( "/tmp/tom", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
    313   assert( fd != -1 );
     312  rtems_test_assert( fd != -1 );
    314313  status = close( fd );
    315   assert( status == 0 );
     314  rtems_test_assert( status == 0 );
    316315
    317316  puts("Attempt to recreate /tmp/tom");
    318317  fd = open( "/tmp/tom", O_CREAT | O_EXCL, S_IRWXU|S_IRWXG|S_IRWXO );
    319   assert( fd == -1 );
    320   assert( errno == EEXIST );
     318  rtems_test_assert( fd == -1 );
     319  rtems_test_assert( errno == EEXIST );
    321320
    322321  puts("create /tmp/john");
    323322  fd = open( "/tmp/john", O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO );
    324   assert( fd != -1 );
     323  rtems_test_assert( fd != -1 );
    325324
    326325  puts("tcdrain /tmp/john" );
    327326  status = tcdrain( fd );
    328   assert( status == 0 );
     327  rtems_test_assert( status == 0 );
    329328
    330329  /*
     
    342341
    343342  status = unlink( "/tmp/joel" );
    344   assert( !status );
     343  rtems_test_assert( !status );
    345344
    346345  status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL );
    347   assert( !status );
     346  rtems_test_assert( !status );
    348347
    349348  test_write( "/tmp/joel", 10, "the first write!!!\n" );
     
    358357  puts("unlink /tmp/joel");
    359358  status = unlink( "/tmp/joel" );
    360   assert( !status );
     359  rtems_test_assert( !status );
    361360
    362361  /* Test a failure path */
     
    364363  puts( "unlink /tmp/joel" );
    365364  status = unlink( "/tmp/joel" );
    366   assert( status == -1 );
     365  rtems_test_assert( status == -1 );
    367366
    368367  puts( "mknod /tmp/joel");
    369368  status = mknod( "/tmp/joel", (S_IFREG | S_IRWXU), 0LL );
    370   assert( !status );
     369  rtems_test_assert( !status );
    371370
    372371  test_write( "/tmp/joel", 514, "the first write!!!\n" );
     
    411410  puts( "fopen of /tmp/j" );
    412411  file = fopen( "/tmp/j", "w+" );
    413   assert( file );
     412  rtems_test_assert( file );
    414413
    415414  puts( "fprintf to /tmp/j" );
    416415  for (i=1 ; i<=5 ; i++) {
    417416    status = fprintf( file, "This is call %d to fprintf\n", i );
    418     assert( status );
     417    rtems_test_assert( status );
    419418    printf( "(%d) %d characters written to the file\n", i, status );
    420419  }
     
    423422
    424423  status = stat( "/tmp/j", &buf );
    425   assert( !status );
     424  rtems_test_assert( !status );
    426425  dump_statbuf( &buf );
    427426  atime2 = buf.st_atime;
     
    439438   */
    440439  status = stat( "/tmp/j", &buf );
    441   assert( !status );
     440  rtems_test_assert( !status );
    442441  dump_statbuf( &buf );
    443442  atime1 = buf.st_atime;
    444443  mtime1 = buf.st_mtime;
    445444  ctime1 = buf.st_ctime;
    446   assert( atime1 != atime2);
    447   assert( mtime1 == mtime2);
    448   assert( ctime1 == ctime2);
     445  rtems_test_assert( atime1 != atime2);
     446  rtems_test_assert( mtime1 == mtime2);
     447  rtems_test_assert( ctime1 == ctime2);
    449448
    450449  IMFS_dump();
     
    459458  puts( "truncate /tmp/j to length of 40" );
    460459  status = truncate( "/tmp/j", 40 );
    461   assert( !status );
     460  rtems_test_assert( !status );
    462461
    463462  /*
     
    465464   */
    466465  status = stat( "/tmp/j", &buf );
    467   assert( !status );
     466  rtems_test_assert( !status );
    468467  dump_statbuf( &buf );
    469468  atime2 = buf.st_atime;
    470469  mtime2 = buf.st_mtime;
    471470  ctime2 = buf.st_ctime;
    472   assert( atime1 != atime2);
    473   assert( mtime1 == mtime2);
    474   assert( ctime1 == ctime2);
     471  rtems_test_assert( atime1 != atime2);
     472  rtems_test_assert( mtime1 == mtime2);
     473  rtems_test_assert( ctime1 == ctime2);
    475474
    476475  IMFS_dump();
     
    478477  /* try to truncate the console and see what happens */
    479478  status = truncate( "/dev/console", 40 );
    480   assert( status == 0 );
     479  rtems_test_assert( status == 0 );
    481480
    482481  puts( "truncate /tmp/j to length of 0" );
    483482  status = truncate( "/tmp/j", 0 );
    484   assert( !status );
     483  rtems_test_assert( !status );
    485484
    486485  puts( "truncate /tmp to length of 0 should fail with EISDIR\n");
    487486  status = truncate( "/tmp", 0 );
    488   assert( status == -1 );
     487  rtems_test_assert( status == -1 );
    489488  printf( "%d: %s\n", errno, strerror( errno ) );
    490   assert( errno == EISDIR );
     489  rtems_test_assert( errno == EISDIR );
    491490
    492491  IMFS_dump();
    493492
    494493  status = truncate( "/tmp/fred", 10 );
    495   assert( status == -1);
     494  rtems_test_assert( status == -1);
    496495
    497496  rtems_status = rtems_io_register_name( "/dev/console", 0, 0 );
  • testsuites/psxtests/psxfile01/test_cat.c

    r500fcd5 r2317457  
    22 *  A test support function which performs a crude version of
    33 *  "cat" so you can look at specific parts of a file.
     4 *
     5 *  COPYRIGHT (c) 1989-2009.
     6 *  On-Line Applications Research Corporation (OAR).
     7 *
     8 *  The license and distribution terms for this file may be
     9 *  found in the file LICENSE in this distribution or at
     10 *  http://www.rtems.com/license/LICENSE.
     11 *
    412 *
    513 *  $Id$
     
    1523#include <string.h>
    1624#include <ctype.h>
    17 
    18 #include <assert.h>
    1925
    2026#include <pmacros.h>
     
    4248
    4349  my_length = (length) ? length : sizeof( test_cat_buffer );
    44   assert( my_length <= sizeof( test_cat_buffer ) );
     50  rtems_test_assert( my_length <= sizeof( test_cat_buffer ) );
    4551
    4652  fd = open( file, O_RDONLY );
     
    5258  for ( ;; ) {
    5359    status = lseek( fd, offset, SEEK_SET );
    54     assert( status != -1 );
     60    rtems_test_assert( status != -1 );
    5561
    5662    status = read( fd, test_cat_buffer, sizeof(test_cat_buffer) );
     
    8086
    8187  status = close( fd );
    82   assert( !status );
     88  rtems_test_assert( !status );
    8389}
  • testsuites/psxtests/psxfile01/test_extend.c

    r500fcd5 r2317457  
    66 *  The defined behavior is a seek() followed by a write() extends the file
    77 *  and zero fills the new length part.
     8 *
     9 *  COPYRIGHT (c) 1989-2009.
     10 *  On-Line Applications Research Corporation (OAR).
     11 *
     12 *  The license and distribution terms for this file may be
     13 *  found in the file LICENSE in this distribution or at
     14 *  http://www.rtems.com/license/LICENSE.
    815 *
    916 *  $Id$
     
    1926#include <string.h>
    2027#include <ctype.h>
    21 
    22 #include <assert.h>
    2328
    2429#include <pmacros.h>
     
    4449
    4550  status = lseek( fd, offset - 1, SEEK_SET );
    46   assert( status != -1 );
     51  rtems_test_assert( status != -1 );
    4752
    4853  status = write( fd, &c, 1 );
     
    5964
    6065  status = close( fd );
    61   assert( !status );
     66  rtems_test_assert( !status );
    6267}
  • testsuites/psxtests/psxfile01/test_write.c

    r500fcd5 r2317457  
    22 *  A test support function which performs a write() and
    33 *  handles implied open(), lseek(), write(), and close() operations.
     4 *
     5 *  COPYRIGHT (c) 1989-2009.
     6 *  On-Line Applications Research Corporation (OAR).
     7 *
     8 *  The license and distribution terms for this file may be
     9 *  found in the file LICENSE in this distribution or at
     10 *  http://www.rtems.com/license/LICENSE.
    411 *
    512 *  $Id$
     
    1421#include <errno.h>
    1522#include <string.h>
    16 
    17 #include <assert.h>
    1823
    1924#include <pmacros.h>
     
    4348
    4449  status = lseek( fd, offset, SEEK_SET );
    45   assert( status != -1 );
     50  rtems_test_assert( status != -1 );
    4651
    4752  status = write( fd, buffer, length );
     
    5863
    5964  status = close( fd );
    60   assert( !status );
     65  rtems_test_assert( !status );
    6166}
  • testsuites/psxtests/psxitimer/init.c

    r500fcd5 r2317457  
    2727  puts( "getitimer -- bad which - EINVAL " );
    2828  status = getitimer( 1234, &itimer );
    29   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   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   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   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   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   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   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   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   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   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   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

    r500fcd5 r2317457  
    99 *  Output parameters:  NONE
    1010 *
    11  *  COPYRIGHT (c) 1989-1999.
     11 *  COPYRIGHT (c) 1989-2009.
    1212 *  On-Line Applications Research Corporation (OAR).
    1313 *
     
    3535  if ( status )
    3636    printf( "status = %d\n", status );
    37   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   assert( !status );
     44  rtems_test_assert( !status );
    4545
    4646  puts( "Task_1: exitting" );
  • testsuites/psxtests/psxkey02/init.c

    r500fcd5 r2317457  
    3131  puts( "Init - rtems_workspace_get_information - OK" );
    3232  sb = rtems_workspace_get_information( &start );
    33   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   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   assert( sb );
    61   assert( info.Free.largest == start.Free.largest );
    62   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     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     assert( sb );
    92     assert( info.Free.largest == start.Free.largest );
    93     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   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   assert( sb );
    117   assert( info.Free.largest == start.Free.largest );
    118   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

    r500fcd5 r2317457  
    3131  puts( "Test_Thread - pthread_setspecific - OK" );
    3232  sc = pthread_setspecific( Key, key_value );
    33   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   assert( !sc );
     54  rtems_test_assert( !sc );
    5555
    5656  puts( "Init - pthread_create - OK" );
    5757  sc = pthread_create( &thread, NULL, Test_Thread, &sc );
    58   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   assert( !sc );
     64  rtems_test_assert( !sc );
    6565
    6666  puts( "Init - pthread_key_delete - OK" );
    6767  sc = pthread_key_delete( Key );
    68   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   assert( !sc );
     76  rtems_test_assert( !sc );
    7777
    7878  puts( "Init - pthread_create - OK" );
    7979  sc = pthread_create( &thread, NULL, Test_Thread, NULL );
    80   assert( !sc );
     80  rtems_test_assert( !sc );
    8181
    8282  puts( "Init - sleep - let thread run - OK" );
    8383  sc = nanosleep( &delay_request, NULL );
    84   assert( !sc );
     84  rtems_test_assert( !sc );
    8585
    8686  puts( "Init - verify destructor did NOT ran" );
    87   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   assert( sc == 0 );
     91  rtems_test_assert( sc == 0 );
    9292
    9393  puts( "*** END OF TEST KEY 03 ***" );
  • testsuites/psxtests/psxmount/test.c

    r500fcd5 r2317457  
    1616 *  record where DIRENT_SIZE seems to be 12 bytes.
    1717 *
    18  *
     18 *  COPYRIGHT (c) 1989-2009.
     19 *  On-Line Applications Research Corporation (OAR).
     20 *
     21 *  The license and distribution terms for this file may be
     22 *  found in the file LICENSE in this distribution or at
     23 *  http://www.rtems.com/license/LICENSE.
    1924 *
    2025 *  $Id$
    2126 */
     27
    2228#include <stdio.h>
    2329#include <sys/types.h>
     
    2632#include <dirent.h>
    2733#include <string.h>
    28 #include <assert.h>
    2934#include <unistd.h>
    3035#include <errno.h>
     
    128133  printf("create /b/my_file\n");
    129134  fd = open ("/b/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    130   assert( fd != 0 );
     135  rtems_test_assert( fd != 0 );
    131136  close (fd);
    132137
    133138  printf("Verify /b/my_file\n");
    134139  fd = open("/b/my_file", S_IRWXU|S_IRWXG|S_IRWXO);
    135   assert( fd != 0 );
     140  rtems_test_assert( fd != 0 );
    136141  close( fd );
    137142
     
    139144  printf("create c/y/my_mount_point/my_dir/d\n");
    140145  fd = open ("c/y/my_mount_point/my_dir/d", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    141   assert( fd != 0 );
     146  rtems_test_assert( fd != 0 );
    142147  close (fd);
    143148
    144149  printf("Verify c/y/my_mount_point/my_dir/d\n");
    145150  fd = open("c/y/my_mount_point/my_dir/d", S_IRWXU|S_IRWXG|S_IRWXO);
    146   assert( fd != 0 );
     151  rtems_test_assert( fd != 0 );
    147152  close( fd );
    148153
     
    158163     NULL,
    159164     mount_point_string );
    160   assert( status == 0 );
     165  rtems_test_assert( status == 0 );
    161166  if( mt_entry == NULL ){
    162167     printf(" NULL mount table entry was returned\n");
     
    219224   NULL,
    220225   mount_point_string );
    221   assert( status == -1 );
    222   assert( errno == EINVAL );
     226  rtems_test_assert( status == -1 );
     227  rtems_test_assert( errno == EINVAL );
    223228
    224229  /*
     
    233238     NULL,
    234239     "/c/y/my_mount_point" );
    235   assert( status == -1 );
    236   assert( errno == EINVAL );
     240  rtems_test_assert( status == -1 );
     241  rtems_test_assert( errno == EINVAL );
    237242
    238243  /*
     
    247252     NULL,
    248253     "/c/y/my_mount_point" );
    249   assert( status == 0 );
     254  rtems_test_assert( status == 0 );
    250255  if( mt_entry == NULL ){
    251256     printf(" NULL mount table entry was returned\n");
     
    261266  printf("create c/y/my_mount_point/../../y/my_mount_point/new_dir\n");
    262267  status = mkdir("c/y/my_mount_point/../../y/my_mount_point/new_dir",S_IRWXU );
    263   assert( status == 0 );
     268  rtems_test_assert( status == 0 );
    264269  status = stat("c/y/my_mount_point/../../y/my_mount_point/new_dir",&statbuf );
    265   assert( status == 0 );
     270  rtems_test_assert( status == 0 );
    266271  status = stat("c/y/my_mount_point/new_dir/..", &statbuf );
    267   assert( status == 0 );
     272  rtems_test_assert( status == 0 );
    268273
    269274  /*
     
    278283     NULL,
    279284     "/c/y/my_mount_point" );
    280   assert( status == -1 );
    281   assert( errno == EBUSY);
     285  rtems_test_assert( status == -1 );
     286  rtems_test_assert( errno == EBUSY);
    282287
    283288  /*
     
    292297     NULL,
    293298     "/b/my_file" );
    294   assert( status == -1 );
    295   assert( errno == ENOTDIR );
     299  rtems_test_assert( status == -1 );
     300  rtems_test_assert( errno == ENOTDIR );
    296301
    297302
     
    302307  printf("Create and chdir to /c/y/my_mount_point/mydir\n");
    303308  status = mkdir( "/c/y/my_mount_point/mydir", 0777);
    304   assert( status == 0 );
     309  rtems_test_assert( status == 0 );
    305310
    306311  status = chdir( "/c/y/my_mount_point/mydir" );
    307   assert( status == 0 );
     312  rtems_test_assert( status == 0 );
    308313
    309314  printf("unmount of /c/y/my_mount_point should fail with EBUSY\n");
    310315  status = unmount( "/c/y/my_mount_point" );
    311   assert( status == -1 );
    312   assert( errno == EBUSY );
     316  rtems_test_assert( status == -1 );
     317  rtems_test_assert( errno == EBUSY );
    313318
    314319  /*
     
    318323  printf("chdir to / and verify we can unmount /c/y/my_mount_point\n");
    319324  status = chdir( "/" );
    320   assert( status == 0 );
     325  rtems_test_assert( status == 0 );
    321326
    322327  printf("unmount /c/y/my_mount_point \n");
    323328  status = unmount( "/c/y/my_mount_point" );
    324   assert( status == 0 );
     329  rtems_test_assert( status == 0 );
    325330
    326331  /*
     
    330335  printf("unmount /b/mount_point should fail with EINVAL\n");
    331336  status = unmount( "/b/mount_point" );
    332   assert( status == -1 );
    333   assert( errno == ENOENT );
     337  rtems_test_assert( status == -1 );
     338  rtems_test_assert( errno == ENOENT );
    334339
    335340  /*
     
    344349     NULL,
    345350     "/c/y/my_mount_point" );
    346   assert( status == 0 );
     351  rtems_test_assert( status == 0 );
    347352
    348353  /*
     
    353358  printf("Create and open /c/y/my_mount_point/my_file\n");
    354359  fd = open( "/c/y/my_mount_point/my_file", O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
    355   assert( fd != -1 );
     360  rtems_test_assert( fd != -1 );
    356361  status = close( fd );
    357   assert( status == 0 );
     362  rtems_test_assert( status == 0 );
    358363
    359364  printf("\nmkdir /c/y/my_mount_point/my_dir\n");
     
    361366  printf("Open /c/y/my_mount_point/my_dir\n");
    362367  directory = opendir( "/c/y/my_mount_point/my_dir" );
    363   assert( directory );
     368  rtems_test_assert( directory );
    364369
    365370  printf("Unmount /c/y/my_mount_point should fail with EBUSY\n");
    366371  status = unmount( "/c/y/my_mount_point" );
    367   assert( status == -1 );
    368   assert( errno == EBUSY );
     372  rtems_test_assert( status == -1 );
     373  rtems_test_assert( errno == EBUSY );
    369374
    370375  printf("Close /c/y/my_mount_point/my_dir\n");
    371376  status = closedir( directory );
    372   assert( status == 0 );
     377  rtems_test_assert( status == 0 );
    373378
    374379  /*
     
    378383  printf("Unmount /c/y/my_mount_point/my_dir should fail with EACCES\n");
    379384  status = unmount( "/c/y/my_mount_point/my_dir" );
    380   assert( status == -1 );
    381   assert( errno == EACCES );
     385  rtems_test_assert( status == -1 );
     386  rtems_test_assert( errno == EACCES );
    382387
    383388  /*
     
    393398     NULL,
    394399     "/c/y/my_mount_point/my_dir");
    395   assert( status == 0 );
     400  rtems_test_assert( status == 0 );
    396401
    397402  printf("unmount /c/y/my_mount_point should fail with EBUSY\n");
    398403  status = unmount( "/c/y/my_mount_point" );
    399   assert( status == -1 );
    400   assert( errno == EBUSY );
     404  rtems_test_assert( status == -1 );
     405  rtems_test_assert( errno == EBUSY );
    401406
    402407  /*
     
    406411  printf("Verify a hard link across filesystems fails with EXDEV\n");
    407412  status = mkdir( "/c/y/my_mount_point/my_dir2", S_IRWXU  );
    408   assert( status == 0 );
     413  rtems_test_assert( status == 0 );
    409414
    410415  status = link( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
    411   assert( status == -1 );
    412   assert( errno == EXDEV );
     416  rtems_test_assert( status == -1 );
     417  rtems_test_assert( errno == EXDEV );
    413418
    414419  /*
     
    418423  printf("Verify a symbolic link across file systems works\n");
    419424  status = symlink( "/c/y/my_mount_point/my_dir2", "/c/y/my_mount_point/my_dir/my_link" );
    420   assert( status == 0 );
     425  rtems_test_assert( status == 0 );
    421426  status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
    422   assert( status == 0 );
     427  rtems_test_assert( status == 0 );
    423428
    424429  printf("unmount /c/y/my_mount_point/my_dir\n");
    425430  status = unmount( "/c/y/my_mount_point/my_dir" );
    426   assert( status == 0 );
     431  rtems_test_assert( status == 0 );
    427432
    428433  /*
     
    432437  printf("Verify the symbolic link now fails\n");
    433438  status = stat( "/c/y/my_mount_point/my_dir/my_link", &statbuf );
    434   assert( status != 0 );
     439  rtems_test_assert( status != 0 );
    435440
    436441  printf("unmount /c/y/my_mount_point\n");
    437442  status = unmount( "/c/y/my_mount_point" );
    438   assert( status == 0 );
     443  rtems_test_assert( status == 0 );
    439444
    440445  printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" );
  • testsuites/psxtests/psxmsgq01/init.c

    r500fcd5 r2317457  
    131131      Test_q[que].mq = mq_open( tq->name, tq->oflag, 0x777, &attr );
    132132
    133     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   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     assert( open_mq[i] != (-1) );
    249     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   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   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   assert( n_mq != (-1) );
    708   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   assert( !status );
     891  rtems_test_assert( !status );
    892892
    893893  status = sigaddset( waitset, SIGUSR1 );
    894   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   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   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   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   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   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   assert( 0 );
     1274  rtems_test_assert( 0 );
    12751275  return NULL; /* just so the compiler thinks we returned something */
    12761276}
  • testsuites/psxtests/psxmsgq03/init.c

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

    r500fcd5 r2317457  
    4444  if ( Queue == (-1) )
    4545    perror( "mq_open failed" );
    46   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   assert( second_Queue == (-1) );
    53   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   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   assert( sc == 0 );
     65  rtems_test_assert( sc == 0 );
    6666
    6767  sb = rtems_workspace_get_information( &start );
    68   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     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     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     assert( sc == 0 );
     123    rtems_test_assert( sc == 0 );
    124124
    125125  puts( "*** END OF POSIX MESSAGE QUEUE TEST 4 ***" );
  • testsuites/psxtests/psxreaddir/test.c

    r500fcd5 r2317457  
    1616 *  record where DIRENT_SIZE seems to be 12 bytes.
    1717 *
     18 *  COPYRIGHT (c) 1989-2009.
     19 *  On-Line Applications Research Corporation (OAR).
    1820 *
     21 *  The license and distribution terms for this file may be
     22 *  found in the file LICENSE in this distribution or at
     23 *  http://www.rtems.com/license/LICENSE.
    1924 *
    2025 *  $Id$
     
    2631#include <dirent.h>
    2732#include <string.h>
    28 #include <assert.h>
    2933#include <unistd.h>
    3034#include <errno.h>
    3135#include <rtems/imfs.h>
    32 #include <assert.h>
    3336
    3437DIR *directory;
     
    7275
    7376  the_dir = opendir( path );
    74   assert( the_dir );
     77  rtems_test_assert( the_dir );
    7578  printdir( the_dir );
    7679  status = closedir( the_dir );
     
    189192
    190193  printf("Validate readdir across mount point\n");
    191   assert( mkdir( "/imfs", 0777 ) == 0 );
    192   assert( mkdir( "/imfs/should_be_hidden", 0777 ) == 0 );
     194  rtems_test_assert( mkdir( "/imfs", 0777 ) == 0 );
     195  rtems_test_assert( mkdir( "/imfs/should_be_hidden", 0777 ) == 0 );
    193196  complete_printdir("/imfs" );
    194197  printf("Attempting to mount IMFS file system at /imfs \n");
     
    199202     NULL,
    200203     "/imfs" );
    201   assert( status == 0 );
     204  rtems_test_assert( status == 0 );
    202205  if( mt_entry == NULL ){
    203206     printf(" NULL mount table entry was returned\n");
     
    206209
    207210  status = mkdir( "/imfs/testdir", 0777 );
    208   assert( status == 0 );
     211  rtems_test_assert( status == 0 );
    209212  status = mkdir( "/imfs/testdir/testsubdir", 0777 );
    210   assert( status == 0 );
     213  rtems_test_assert( status == 0 );
    211214
    212215  complete_printdir("/imfs" );
     
    274277  printf("open /b/myfile\n");
    275278  fd = open ("/b/my_file", O_CREAT, S_IRWXU);
    276   assert( fd != -1 );
     279  rtems_test_assert( fd != -1 );
    277280  close (fd);
    278281
     
    288291  printf("Open /b/new_file\n");
    289292  fd  = open( "/b/new_file", O_CREAT, S_IRWXU );
    290   assert( fd != -1 );
     293  rtems_test_assert( fd != -1 );
    291294
    292295  printf("fcntl F_SETFD should return 0\n");
    293296  status = fcntl( fd, F_SETFD, 1 );
    294   assert( status == 0 );
     297  rtems_test_assert( status == 0 );
    295298
    296299  printf("fcntl F_SETFD should return 1\n");
    297300  status = fcntl( fd, F_GETFD, 1 );
    298   assert( status == 1 );
     301  rtems_test_assert( status == 1 );
    299302
    300303#if 0
    301304  printf("fcntl F_DUPFD should return 0\n");
    302305  status = fcntl( fd, F_DUPFD, 0 );
    303   assert ( status == 0 );
     306  rtems_test_assert ( status == 0 );
    304307#else
    305308  printf("fcntl F_DUPFD should return 0 -- skip until implemented\n");
     
    309312  status = fcntl( fd, F_GETFL, 1 );
    310313  printf("fcntl F_GETFL returned 0x%x\n", status );
    311   assert( status != -1 );
     314  rtems_test_assert( status != -1 );
    312315
    313316  printf("fcntl F_SETFL to add O_APPEND and O_NONBLOCK\n");
    314317  status = fcntl( fd, F_SETFL, O_APPEND|O_NONBLOCK );
    315   assert ( status != -1 );
     318  rtems_test_assert ( status != -1 );
    316319
    317320  printf("fcntl F_GETFL return current flags to see changes\n");
    318321  status = fcntl( fd, F_GETFL, 1 );
    319322  printf("fcntl F_GETFL returned 0x%x\n", status );
    320   assert( status != -1 );
     323  rtems_test_assert( status != -1 );
    321324
    322325  printf("fcntl F_GETLK should return -1\n");
    323326  status = fcntl( fd, F_GETLK, 1 );
    324   assert ( status == -1 );
     327  rtems_test_assert ( status == -1 );
    325328
    326329  printf("fcntl F_SETLK should return -1\n");
    327330  status = fcntl( fd, F_SETLK, 1 );
    328   assert ( status == -1 );
     331  rtems_test_assert ( status == -1 );
    329332
    330333  printf("fcntl F_SETLKW should return -1\n");
    331334  status = fcntl( fd, F_SETLKW, 1 );
    332   assert ( status == -1 );
     335  rtems_test_assert ( status == -1 );
    333336
    334337  printf("fcntl F_SETOWN should return -1\n");
    335338  status = fcntl( fd, F_SETOWN, 1 );
    336   assert ( status == -1 );
     339  rtems_test_assert ( status == -1 );
    337340
    338341  printf("fcntl F_GETOWN should return -1\n");
    339342  status = fcntl( fd, F_GETOWN, 1 );
    340   assert ( status == -1 );
     343  rtems_test_assert ( status == -1 );
    341344
    342345  printf("fcntl invalid argument should return -1\n");
    343346  status = fcntl( fd, 0xb, 1 );
    344347  printf("Status %d\n",status);
    345   assert( status == -1 );
     348  rtems_test_assert( status == -1 );
    346349
    347350  printf("opendir and readdir /b/myfile\n");
     
    355358  printf("chdir to /b/myfile\n");
    356359  status = chdir ("/b/my_file");
    357   assert (status == -1);
     360  rtems_test_assert (status == -1);
    358361
    359362  printf( "\nPerforming stat of directory /\n");
     
    363366  puts( "\nOpen and print directory /" );
    364367  directory = opendir("/");
    365   assert( directory );
     368  rtems_test_assert( directory );
    366369  printdir(directory);
    367370
     
    370373  printf("Open /d/my_dir\n");
    371374  directory_not = opendir( "/d/my_dir" );
    372   assert( directory_not );
     375  rtems_test_assert( directory_not );
    373376
    374377  printf( "remove /d/my_dir.\n" );
    375378  status = rmdir( "/d/my_dir" );
    376   assert( status == 0 );
     379  rtems_test_assert( status == 0 );
    377380
    378381  printf( "close /d/my_dir.\n" );
     
    382385  directory2 = opendir("/c");
    383386
    384   assert( directory2 );
     387  rtems_test_assert( directory2 );
    385388
    386389  printdir(directory2);
     
    389392  printf( "\nOpening directory /c/y\n" );
    390393  directory3 = opendir("/c/y");
    391   assert( directory3 );
     394  rtems_test_assert( directory3 );
    392395  printdir(directory3);
    393396  status = closedir( directory3 );
  • testsuites/psxtests/psxrwlock01/test.c

    r500fcd5 r2317457  
    22 *  This test exercises the POSIX RWLock manager.
    33 *
    4  *  COPYRIGHT (c) 1989-2006.
     4 *  COPYRIGHT (c) 1989-2009.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    1212 */
    1313
    14 #include <assert.h>
    1514#include <stdio.h>
    1615#include <errno.h>
     
    3837  puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" );
    3938  status = pthread_rwlock_rdlock(&RWLock);
    40   assert( !status );
     39  rtems_test_assert( !status );
    4140  puts( "ReadThread - pthread_rwlock_rdlock(RWLock) unblocked -- OK" );
    4241
    4342  status = pthread_rwlock_unlock(&RWLock);
    44   assert( !status );
     43  rtems_test_assert( !status );
    4544  return NULL;
    4645}
     
    5554  puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" );
    5655  status = pthread_rwlock_wrlock(&RWLock);
    57   assert( !status );
     56  rtems_test_assert( !status );
    5857  puts( "WriteThread - pthread_rwlock_wrlock(RWLock) unblocked -- OK" );
    5958
     
    6261  puts( "WriteThread - pthread_rwlock_unlock(RWLock) -- OK" );
    6362  status = pthread_rwlock_unlock(&RWLock);
    64   assert( !status );
     63  rtems_test_assert( !status );
    6564  return NULL;
    6665}
     
    9190  puts( "pthread_rwlockattr_init( NULL ) -- EINVAL" );
    9291  status = pthread_rwlockattr_init( NULL );
    93   assert( status == EINVAL );
     92  rtems_test_assert( status == EINVAL );
    9493
    9594  puts( "pthread_rwlockattr_setpshared( NULL, private ) -- EINVAL" );
    9695  status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_PRIVATE );
    97   assert( status == EINVAL );
     96  rtems_test_assert( status == EINVAL );
    9897
    9998  puts( "pthread_rwlockattr_setpshared( NULL, shared ) -- EINVAL" );
    10099  status = pthread_rwlockattr_setpshared( NULL, PTHREAD_PROCESS_SHARED );
    101   assert( status == EINVAL );
     100  rtems_test_assert( status == EINVAL );
    102101
    103102  puts( "pthread_rwlockattr_getpshared( NULL, &p ) -- EINVAL" );
    104103  status = pthread_rwlockattr_getpshared( NULL, &p );
    105   assert( status == EINVAL );
     104  rtems_test_assert( status == EINVAL );
    106105
    107106  puts( "pthread_rwlockattr_destroy( NULL ) -- EINVAL" );
    108107  status = pthread_rwlockattr_destroy( NULL );
    109   assert( status == EINVAL );
     108  rtems_test_assert( status == EINVAL );
    110109
    111110  /*************** NOT INITIALIZED CHECKS *****************/
     
    114113  puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- EINVAL" );
    115114  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    116   assert( status == EINVAL );
     115  rtems_test_assert( status == EINVAL );
    117116
    118117  puts( "pthread_rwlockattr_getpshared( &attr, NULL ) -- EINVAL" );
    119118  status = pthread_rwlockattr_getpshared( &attr, NULL );
    120   assert( status == EINVAL );
     119  rtems_test_assert( status == EINVAL );
    121120
    122121  puts( "pthread_rwlockattr_destroy( &attr ) -- EINVAL" );
    123122  status = pthread_rwlockattr_destroy( &attr );
    124   assert( status == EINVAL );
     123  rtems_test_assert( status == EINVAL );
    125124
    126125  /*************** BAD PSHARED CHECK *****************/
    127126  puts( "pthread_rwlockattr_setpshared( &attr, private ) -- EINVAL" );
    128127  status = pthread_rwlockattr_setpshared( &attr, ~PTHREAD_PROCESS_PRIVATE );
    129   assert( status == EINVAL );
     128  rtems_test_assert( status == EINVAL );
    130129
    131130  /*************** ACTUALLY WORK THIS TIME *****************/
    132131  puts( "pthread_rwlockattr_init( &attr ) -- OK" );
    133132  status = pthread_rwlockattr_init( &attr );
    134   assert( status == 0 );
     133  rtems_test_assert( status == 0 );
    135134
    136135  puts( "pthread_rwlockattr_setpshared( &attr, private ) -- OK" );
    137136  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_PRIVATE );
    138   assert( status == 0 );
     137  rtems_test_assert( status == 0 );
    139138
    140139  puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
    141140  status = pthread_rwlockattr_getpshared( &attr, &p );
    142   assert( status == 0 );
    143   assert( p == PTHREAD_PROCESS_PRIVATE );
     141  rtems_test_assert( status == 0 );
     142  rtems_test_assert( p == PTHREAD_PROCESS_PRIVATE );
    144143
    145144  puts( "pthread_rwlockattr_setpshared( &attr, shared ) -- OK" );
    146145  status = pthread_rwlockattr_setpshared( &attr, PTHREAD_PROCESS_SHARED );
    147   assert( status == 0 );
     146  rtems_test_assert( status == 0 );
    148147
    149148  puts( "pthread_rwlockattr_getpshared( &attr, &p ) -- OK" );
    150149  status = pthread_rwlockattr_getpshared( &attr, &p );
    151   assert( status == 0 );
    152   assert( p == PTHREAD_PROCESS_SHARED );
     150  rtems_test_assert( status == 0 );
     151  rtems_test_assert( p == PTHREAD_PROCESS_SHARED );
    153152
    154153  /*************** DESTROY/REUSE CHECK *****************/
    155154  puts( "pthread_rwlockattr_destroy( &attr ) -- OK" );
    156155  status = pthread_rwlockattr_destroy( &attr );
    157   assert( status == 0 );
     156  rtems_test_assert( status == 0 );
    158157
    159158  puts( "pthread_rwlockattr_getpshared( &attr, &p ) destroyed -- EINVAL" );
    160159  status = pthread_rwlockattr_getpshared( &attr, &p );
    161   assert( status == EINVAL );
     160  rtems_test_assert( status == EINVAL );
    162161
    163162  /*************** NULL ARGUMENT CHECKS *****************/
     
    167166  puts( "pthread_rwlock_init(NULL, &attr) -- EINVAL" );
    168167  status = pthread_rwlock_init(NULL, &attr);
    169   assert( status == EINVAL );
     168  rtems_test_assert( status == EINVAL );
    170169
    171170  puts( "pthread_rwlock_destroy(NULL) -- EINVAL" );
    172171  status = pthread_rwlock_destroy(NULL);
    173   assert( status == EINVAL );
     172  rtems_test_assert( status == EINVAL );
    174173
    175174  puts( "pthread_rwlock_rdlock(NULL) -- EINVAL" );
    176175  status = pthread_rwlock_rdlock(NULL);
    177   assert( status == EINVAL );
     176  rtems_test_assert( status == EINVAL );
    178177
    179178  puts( "pthread_rwlock_timedrdlock( NULL, &abstime) -- EINVAL" );
    180179  status = pthread_rwlock_timedrdlock( NULL, &abstime);
    181   assert( status == EINVAL );
     180  rtems_test_assert( status == EINVAL );
    182181
    183182  puts( "pthread_rwlock_timedrdlock( &rwlock, NULL) -- EINVAL" );
    184183  status = pthread_rwlock_timedrdlock( &rwlock, NULL);
    185   assert( status == EINVAL );
     184  rtems_test_assert( status == EINVAL );
    186185
    187186  puts( "pthread_rwlock_tryrdlock(NULL) -- EINVAL" );
    188187  status = pthread_rwlock_tryrdlock(NULL);
    189   assert( status == EINVAL );
     188  rtems_test_assert( status == EINVAL );
    190189
    191190  puts( "pthread_rwlock_wrlock(NULL) -- EINVAL" );
    192191  status = pthread_rwlock_wrlock(NULL);
    193   assert( status == EINVAL );
     192  rtems_test_assert( status == EINVAL );
    194193
    195194  puts( "pthread_rwlock_timedwrlock( NULL, &abstime) -- EINVAL" );
    196195  status = pthread_rwlock_timedwrlock( NULL, &abstime );
    197   assert( status == EINVAL );
     196  rtems_test_assert( status == EINVAL );
    198197
    199198  puts( "pthread_rwlock_timedwrlock( &rwlock, NULL) -- EINVAL" );
    200199  status = pthread_rwlock_timedwrlock( &rwlock, NULL);
    201   assert( status == EINVAL );
     200  rtems_test_assert( status == EINVAL );
    202201
    203202  puts( "pthread_rwlock_trywrlock(NULL) -- EINVAL" );
    204203  status = pthread_rwlock_trywrlock(NULL);
    205   assert( status == EINVAL );
     204  rtems_test_assert( status == EINVAL );
    206205
    207206  puts( "pthread_rwlock_unlock(NULL) -- EINVAL" );
    208207  status = pthread_rwlock_unlock(NULL);
    209   assert( status == EINVAL );
     208  rtems_test_assert( status == EINVAL );
    210209
    211210  /*************** BAD ID CHECK *****************/
     
    214213  puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
    215214  status = clock_gettime( CLOCK_REALTIME, &abstime );
    216   assert( !status );
     215  rtems_test_assert( !status );
    217216  abstime.tv_sec += 5;
    218217
    219218  puts( "pthread_rwlock_destroy(BadId) -- EINVAL" );
    220219  status = pthread_rwlock_destroy(&rwlock);
    221   assert( status == EINVAL );
     220  rtems_test_assert( status == EINVAL );
    222221
    223222  puts( "pthread_rwlock_rdlock(BadId) -- EINVAL" );
    224223  status = pthread_rwlock_rdlock(&rwlock);
    225   assert( status == EINVAL );
     224  rtems_test_assert( status == EINVAL );
    226225
    227226  puts( "pthread_rwlock_timedrdlock(BadId, &abstime) -- EINVAL" );
    228227  status = pthread_rwlock_timedrdlock( &rwlock, &abstime);
    229   assert( status == EINVAL );
     228  rtems_test_assert( status == EINVAL );
    230229
    231230  puts( "pthread_rwlock_tryrdlock(BadId) -- EINVAL" );
    232231  status = pthread_rwlock_tryrdlock(&rwlock);
    233   assert( status == EINVAL );
     232  rtems_test_assert( status == EINVAL );
    234233
    235234  puts( "pthread_rwlock_wrlock(BadId) -- EINVAL" );
    236235  status = pthread_rwlock_wrlock(&rwlock);
    237   assert( status == EINVAL );
     236  rtems_test_assert( status == EINVAL );
    238237
    239238  puts( "pthread_rwlock_timedwrlock(BadId, &abstime) -- EINVAL" );
    240239  status = pthread_rwlock_timedwrlock( &rwlock, &abstime );
    241   assert( status == EINVAL );
     240  rtems_test_assert( status == EINVAL );
    242241
    243242  puts( "pthread_rwlock_trywrlock(BadId) -- EINVAL" );
    244243  status = pthread_rwlock_trywrlock(&rwlock);
    245   assert( status == EINVAL );
     244  rtems_test_assert( status == EINVAL );
    246245
    247246  puts( "pthread_rwlock_unlock(BadId) -- EINVAL" );
    248247  status = pthread_rwlock_unlock(&rwlock);
    249   assert( status == EINVAL );
     248  rtems_test_assert( status == EINVAL );
    250249
    251250  /*************** BAD ABSTIME CHECK *****************/
     
    264263  puts( "pthread_rwlockattr_init( &attr ) -- OK" );
    265264  status = pthread_rwlockattr_init( &attr );
    266   assert( status == 0 );
     265  rtems_test_assert( status == 0 );
    267266
    268267  puts( "pthread_rwlock_init( &rwlock, &attr ) -- OK" );
    269268  status = pthread_rwlock_init( &rwlock, &attr );
    270   assert( status == 0 );
    271   assert( rwlock != 0 );
     269  rtems_test_assert( status == 0 );
     270  rtems_test_assert( rwlock != 0 );
    272271
    273272  puts( "pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN" );
    274273  status = pthread_rwlock_init( &rwlock, &attr );
    275   assert( status == EAGAIN );
     274  rtems_test_assert( status == EAGAIN );
    276275
    277276  puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
    278277  status = pthread_rwlock_destroy( &rwlock );
    279   assert( status == 0 );
     278  rtems_test_assert( status == 0 );
    280279
    281280  /********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
    282281  puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
    283282  status = pthread_rwlock_init( &rwlock, NULL );
    284   assert( status == 0 );
     283  rtems_test_assert( status == 0 );
    285284
    286285  puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
    287286  status = pthread_rwlock_destroy( &rwlock );
    288   assert( status == 0 );
     287  rtems_test_assert( status == 0 );
    289288
    290289  /*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
    291290  puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
    292291  status = pthread_rwlock_init( &RWLock, &attr );
    293   assert( status == 0 );
     292  rtems_test_assert( status == 0 );
    294293
    295294  puts( "pthread_rwlock_tryrdlock(RWLock) -- OK" );
    296295  status = pthread_rwlock_tryrdlock(&RWLock);
    297   assert( !status );
     296  rtems_test_assert( !status );
    298297
    299298  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
    300299    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    301300    status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
    302     assert( !status );
     301    rtems_test_assert( !status );
    303302
    304303    sleep(1);
     
    307306  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    308307  status = pthread_rwlock_unlock(&RWLock);
    309   assert( !status );
     308  rtems_test_assert( !status );
    310309
    311310  sleep(1);
     
    314313  puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
    315314  status = pthread_rwlock_trywrlock(&RWLock);
    316   assert( !status );
     315  rtems_test_assert( !status );
    317316
    318317  puts( "pthread_rwlock_tryrdlock(&RWLock) -- EBUSY" );
    319318  status = pthread_rwlock_tryrdlock(&RWLock);
    320   assert( status == EBUSY );
     319  rtems_test_assert( status == EBUSY );
    321320
    322321  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
    323322    printf( "Init: pthread_create - thread %d OK\n", i+1 );
    324323    status = pthread_create(&ThreadIds[i], NULL, ReadLockThread, &ThreadIds[i]);
    325     assert( !status );
     324    rtems_test_assert( !status );
    326325
    327326    sleep(1);
     
    331330  puts( "pthread_rwlock_destroy( &RWLock ) -- EBUSY" );
    332331  status = pthread_rwlock_destroy( &RWLock );
    333   assert( status == EBUSY );
     332  rtems_test_assert( status == EBUSY );
    334333
    335334  /* now unlock it so the threads can continue */
    336335  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    337336  status = pthread_rwlock_unlock(&RWLock);
    338   assert( !status );
     337  rtems_test_assert( !status );
    339338
    340339  sleep(2);
     
    343342  puts( "pthread_rwlock_trywrlock(RWLock) -- OK" );
    344343  status = pthread_rwlock_trywrlock(&RWLock);
    345   assert( !status );
     344  rtems_test_assert( !status );
    346345
    347346  puts( "pthread_rwlock_trywrlock(&RWLock) -- EBUSY" );
    348347  status = pthread_rwlock_trywrlock(&RWLock);
    349   assert( status == EBUSY );
     348  rtems_test_assert( status == EBUSY );
    350349
    351350  for (i=0 ; i<NUMBER_THREADS ; i++ ) {
     
    353352    status =
    354353      pthread_create(&ThreadIds[i], NULL, WriteLockThread, &ThreadIds[i]);
    355     assert( !status );
     354    rtems_test_assert( !status );
    356355
    357356    sleep(1);
     
    360359  puts( "pthread_rwlock_unlock(RWLock) -- OK" );
    361360  status = pthread_rwlock_unlock(&RWLock);
    362   assert( !status );
     361  rtems_test_assert( !status );
    363362
    364363  sleep(2);
     
    367366  puts( "clock_gettime(CLOCK_REALTIME, &abstime) -- OK" );
    368367  status = clock_gettime( CLOCK_REALTIME, &abstime );
    369   assert( !status );
     368  rtems_test_assert( !status );
    370369
    371370  abstime.tv_sec += 1;
    372371  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- OK" );
    373372  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    374   assert( status == 0 );
     373  rtems_test_assert( status == 0 );
    375374
    376375  abstime.tv_sec += 1;
    377376  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
    378377  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    379   assert( status == ETIMEDOUT );
     378  rtems_test_assert( status == ETIMEDOUT );
    380379
    381380  abstime.tv_sec -= 1;
    382381  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT" );
    383382  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    384   assert( status == ETIMEDOUT );
     383  rtems_test_assert( status == ETIMEDOUT );
    385384
    386385  abstime.tv_sec -= 1;
    387386  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT" );
    388387  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    389   assert( status == ETIMEDOUT );
     388  rtems_test_assert( status == ETIMEDOUT );
    390389
    391390  /*************** OBTAIN RWLOCK WITH ABSTIME IN PAST ***************/
    392391  status = pthread_rwlock_unlock(&RWLock);
    393   assert( !status );
     392  rtems_test_assert( !status );
    394393
    395394  abstime.tv_sec -= 1;
    396395  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK" );
    397396  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
    398   assert( status == 0 );
     397  rtems_test_assert( status == 0 );
    399398
    400399  /*************** OBTAIN RWLOCK FOR WRITE WITH ABSTIME IN PAST ***************/
    401400  status = pthread_rwlock_unlock(&RWLock);
    402   assert( !status );
     401  rtems_test_assert( !status );
    403402
    404403  abstime.tv_sec -= 1;
    405404  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK" );
    406405  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    407   assert( status == 0 );
     406  rtems_test_assert( status == 0 );
    408407
    409408  /*************** DESTROY RWLOCK ***************/
    410409  puts( "pthread_rwlock_destroy( &RWLock ) -- OK" );
    411410  status = pthread_rwlock_destroy( &RWLock );
    412   assert( status == 0 );
     411  rtems_test_assert( status == 0 );
    413412
    414413  /*************** OBTAIN A LOCK AND THEN RELEASE IT TWICE ***************/
     
    416415  puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
    417416  status = pthread_rwlock_init( &rwlock, NULL );
    418   assert( status == 0 );
    419   assert( rwlock != 0 );
     417  rtems_test_assert( status == 0 );
     418  rtems_test_assert( rwlock != 0 );
    420419
    421420  puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
    422421  status = pthread_rwlock_unlock( &rwlock );
    423   assert( status == 0 );
     422  rtems_test_assert( status == 0 );
    424423
    425424  puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
    426425  status = pthread_rwlock_unlock( &rwlock );
    427   assert( status == 0 );
     426  rtems_test_assert( status == 0 );
    428427
    429428  /*************** END OF TEST *****************/
  • testsuites/psxtests/psxsem01/init.c

    r500fcd5 r2317457  
    179179  puts( "Init: sem_open - sem1 SUCCESSFUL" );
    180180  n_sem1 = sem_open( "sem1",O_CREAT, 0777, 1 );
    181   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   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   assert( n_sem2 != SEM_FAILED );
    235   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   assert( (status == -1) && (errno == ENOENT) );
     292  rtems_test_assert( (status == -1) && (errno == ENOENT) );
    293293
    294294
  • testsuites/psxtests/psxsignal01/init.c

    r500fcd5 r2317457  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2009.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    125125/* unblock Signal and see if it happened */
    126126  status = sigemptyset( &mask );
    127   assert( !status );
     127  rtems_test_assert( !status );
    128128
    129129  status = sigaddset( &mask, SIGUSR1 );
    130   assert( !status );
     130  rtems_test_assert( !status );
    131131
    132132  status = sigaddset( &mask, SIGFPE );
    133   assert( !status );
     133  rtems_test_assert( !status );
    134134
    135135  status = sigaddset( &mask, SIGILL );
    136   assert( !status );
     136  rtems_test_assert( !status );
    137137
    138138  status = sigaddset( &mask, SIGSEGV );
    139   assert( !status );
     139  rtems_test_assert( !status );
    140140
    141141  puts( "Init: Unblock SIGUSR1 SIGFPE SIGILL SIGSEGV" );
    142142  status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
    143   assert( !status );
     143  rtems_test_assert( !status );
    144144
    145145/* install a signal handler for SIGUSR1 */
  • testsuites/psxtests/psxsignal01/task1.c

    r500fcd5 r2317457  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    3131  seconds = sleep( 5 );
    3232  printf( "Task_1: %d seconds left\n", seconds );
    33   assert( seconds );
     33  rtems_test_assert( seconds );
    3434
    3535     /* switch to Init */
  • testsuites/psxtests/psxsignal02/init.c

    r500fcd5 r2317457  
    3636
    3737  sc = sigemptyset( &mask );
    38   assert( !sc );
     38  rtems_test_assert( !sc );
    3939
    4040  sc = sigaddset( &mask, SIGUSR1 );
    41   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   assert( !sc );
     45  rtems_test_assert( !sc );
    4646}
    4747
     
    138138  puts( "Init - Raise my priority" );
    139139  sc = pthread_attr_init( &attr );
    140   assert( !sc );
     140  rtems_test_assert( !sc );
    141141
    142142  param.sched_priority = 30;
    143143  sc = pthread_setschedparam( pthread_self(), SCHED_RR, &param );
    144   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     assert( !sc );
     149    rtems_test_assert( !sc );
    150150
    151151    sc = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    152     assert( !sc );
     152    rtems_test_assert( !sc );
    153153
    154154    sc = pthread_attr_setschedpolicy( &attr, SCHED_RR );
    155     assert( !sc );
     155    rtems_test_assert( !sc );
    156156
    157157    param.sched_priority = test->priority;
    158158    sc = pthread_attr_setschedparam( &attr, &param );
    159     assert( !sc );
     159    rtems_test_assert( !sc );
    160160
    161161    sc = pthread_create( &id, &attr, Test_Thread, test );
    162     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     assert( !sc );
     168    rtems_test_assert( !sc );
    169169  }
    170170
    171171  puts( "Init - sending SIGUSR1" );
    172172  sc =  kill( getpid(), SIGUSR1 );
    173   assert( !sc );
     173  rtems_test_assert( !sc );
    174174
    175175  /* we are just scheduling the signal, not delivering it */
    176   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

    r500fcd5 r2317457  
    9595  /* build unblocked mask */
    9696  sc = sigemptyset( &mask );
    97   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   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     assert( !sc );
     106    rtems_test_assert( !sc );
    107107  }
    108108
    109109  /* unblocked signals */
    110110  sc = pthread_sigmask( SIG_UNBLOCK, &mask, NULL );
    111   assert( !sc );
     111  rtems_test_assert( !sc );
    112112
    113113  /* build wait mask */
    114114  sc = sigemptyset( &wait_mask );
    115   assert( !sc );
     115  rtems_test_assert( !sc );
    116116
    117117  sc = sigaddset( &wait_mask, SIGNAL_ONE );
    118   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   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   assert( info.si_signo == SIGNAL_TWO );
    136   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   assert( !sc );
     166  rtems_test_assert( !sc );
    167167
    168168  sc = pthread_create( &id, NULL, Test_Thread, &trueArg );
    169   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   assert( !sc );
     175  rtems_test_assert( !sc );
    176176
    177177  puts( "Init - sleep - SignalBlocked thread settle - OK" );
    178178  sc = nanosleep( &delay_request, NULL );
    179   assert( !sc );
     179  rtems_test_assert( !sc );
    180180
    181181  printf( "Init - sending %s - deliver to one thread\n",
    182182