Changeset d35734d in rtems


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

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

  • itronmbf01/init.c, itronsem01/init.c, itronsem01/system.h, itrontask02/dormant.c, itrontask02/init.c, itrontask03/init.c, itrontask03/preempt.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/itrontests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • testsuites/itrontests/ChangeLog

    r0160b3b rd35734d  
     12009-12-08      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * itronmbf01/init.c, itronsem01/init.c, itronsem01/system.h,
     4        itrontask02/dormant.c, itrontask02/init.c, itrontask03/init.c,
     5        itrontask03/preempt.c: Use rtems_test_assert() consistently instead
     6        of system assert(). rtems_test_assert() is designed to integrate into
     7        the RTEMS test suite infrastructure.
     8
    192009-10-30      Ralf Corsépius <ralf.corsepius@rtems.org>
    210
  • testsuites/itrontests/itronmbf01/init.c

    r0160b3b rd35734d  
    1111 *  Output parameters:  NONE
    1212 *
    13  *  COPYRIGHT (c) 1989-2007.
     13 *  COPYRIGHT (c) 1989-2009.
    1414 *  On-Line Applications Research Corporation (OAR).
    1515 *
     
    2424#include "system.h"
    2525#include <stdio.h>
    26 #include <assert.h>
    2726
    2827/*
     
    7776    puts( "Init - cre_mbf - NULL pk_cmbf returns E_PAR" );
    7877    status = cre_mbf( 1, NULL );
    79     assert( status == E_PAR );
     78    rtems_test_assert( status == E_PAR );
    8079
    8180    puts( "Init - cre_mbf - negative values for bufsz returns E_PAR" );
     
    8584    pk_cmbf.exinf   = NULL;
    8685    status = cre_mbf( 1, &pk_cmbf );
    87     assert( status == E_PAR );
     86    rtems_test_assert( status == E_PAR );
    8887
    8988    puts( "Init - cre_mbf - negative values for maxmsz returns E_PAR" );
     
    9190    pk_cmbf.maxmsz  = -1;
    9291    status = cre_mbf( 1, &pk_cmbf );
    93     assert( status == E_PAR );
     92    rtems_test_assert( status == E_PAR );
    9493
    9594    puts( "Init - cre_mbf - bufsz < maxmsz returns E_PAR" );
     
    9796    pk_cmbf.maxmsz  = 101;
    9897    status = cre_mbf( 1, &pk_cmbf );
    99     assert( status == E_PAR );
     98    rtems_test_assert( status == E_PAR );
    10099
    101100    /*
     
    107106    puts( "Init - cre_mbf - bad id (less than -4) - E_OACV" );
    108107    status = cre_mbf( -5, &pk_cmbf );
    109     assert( status == E_OACV );
     108    rtems_test_assert( status == E_OACV );
    110109
    111110    puts( "Init - cre_mbf - bad id (between 0 and -4) - E_ID" );
    112111    status = cre_mbf( -4, &pk_cmbf );
    113     assert( status == E_ID );
     112    rtems_test_assert( status == E_ID );
    114113
    115114    puts( "Init - cre_mbf - bad id (0) - E_ID" );
    116115    status = cre_mbf( 0, &pk_cmbf );
    117     assert( status == E_ID );
     116    rtems_test_assert( status == E_ID );
    118117
    119118    puts( "Init - cre_mbf - bad id (too great) - E_ID" );
    120119    status = cre_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, &pk_cmbf );
    121     assert( status == E_ID );
     120    rtems_test_assert( status == E_ID );
    122121
    123122    puts( "Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK" );
     
    126125    pk_cmbf.mbfatr  = TA_TFIFO;
    127126    status = cre_mbf( 1, &pk_cmbf );
    128     assert( status == E_OK );
     127    rtems_test_assert( status == E_OK );
    129128
    130129    puts( "Init - cre_mbf - create mbf 1 again - E_OBJ" );
    131130    status = cre_mbf( 1, &pk_cmbf );
    132     assert( status == E_OBJ );
     131    rtems_test_assert( status == E_OBJ );
    133132
    134133    puts( "Init - cre_mbf - create mbf 2 TA_TPRI - E_OK" );
     
    137136    pk_cmbf.mbfatr  = TA_TPRI;
    138137    status = cre_mbf( 2, &pk_cmbf );
    139     assert( status == E_OK );
     138    rtems_test_assert( status == E_OK );
    140139}
    141140
     
    150149    puts( "Init - del_mbf - bad id (less than -4) - E_OACV" );
    151150    status = del_mbf( -5 );
    152     assert( status == E_OACV );
     151    rtems_test_assert( status == E_OACV );
    153152
    154153    puts( "Init - del_mbf - bad id (between 0 and -4) - E_ID" );
    155154    status = del_mbf( -4 );
    156     assert( status == E_ID );
     155    rtems_test_assert( status == E_ID );
    157156
    158157    puts( "Init - del_mbf - bad id (0) - E_ID" );
    159158    status = del_mbf( 0 );
    160     assert( status == E_ID );
     159    rtems_test_assert( status == E_ID );
    161160
    162161    puts( "Init - del_mbf - bad id (too great) - E_ID" );
    163162    status = del_mbf( CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1 );
    164     assert( status == E_ID );
     163    rtems_test_assert( status == E_ID );
    165164
    166165
    167166    puts("Init - del_mbf   - E_OK" );
    168167    status = del_mbf(2);
    169     assert(status == E_OK);
     168    rtems_test_assert(status == E_OK);
    170169}
    171170
     
    181180    puts( "Init - psnd_mbf - bad id (less than -4) - E_OACV" );
    182181    status = psnd_mbf(-5, msg, sizeof(msg));
    183     assert( status == E_OACV );
     182    rtems_test_assert( status == E_OACV );
    184183
    185184    puts( "Init - psnd_mbf - bad id (between 0 and -4) - E_ID" );
    186185    status = psnd_mbf(-4, msg, sizeof(msg));
    187     assert( status == E_ID );
     186    rtems_test_assert( status == E_ID );
    188187
    189188    puts( "Init - psnd_mbf - bad id (0) - E_ID" );
    190189    status = psnd_mbf(0, msg, sizeof(msg));
    191     assert( status == E_ID );
     190    rtems_test_assert( status == E_ID );
    192191
    193192    puts( "Init - psnd_mbf - bad id (too great) - E_ID" );
    194193    status = psnd_mbf(CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1, msg,
    195194                      sizeof(msg));
    196     assert( status == E_ID );
     195    rtems_test_assert( status == E_ID );
    197196
    198197    puts( "Init - psnd_mbf - msg == 0, E_PAR" );
    199198    status = psnd_mbf(1, 0, sizeof(msg));
    200     assert( status == E_PAR );
     199    rtems_test_assert( status == E_PAR );
    201200
    202201    puts( "Init - psnd_mbf - msgsz too big - E_PAR" );
    203202    status = psnd_mbf(1, msg, 300);
    204     assert( status == E_PAR );
     203    rtems_test_assert( status == E_PAR );
    205204
    206205    puts( "Init - psnd_mbf - msgsz <0 - E_PAR" );
    207206    status = psnd_mbf(1, msg, -10);
    208     assert( status == E_PAR );
     207    rtems_test_assert( status == E_PAR );
    209208
    210209    puts( "Init - psnd_mbf - E_OK" );
    211210    status = psnd_mbf(1, msg, sizeof(msg));
    212     assert( status == E_OK );
     211    rtems_test_assert( status == E_OK );
    213212}
    214213
     
    220219    puts( "Init - ref_mbf - bad id (less than -4) - E_OACV" );
    221220    status = ref_mbf(&pk_rmbf, -5);
    222     assert( status == E_OACV );
     221    rtems_test_assert( status == E_OACV );
    223222
    224223    puts( "Init - ref_mbf - bad id (between 0 and -4) - E_ID" );
    225224    status = ref_mbf(&pk_rmbf, -4);
    226     assert( status == E_ID );
     225    rtems_test_assert( status == E_ID );
    227226
    228227    puts( "Init - ref_mbf - bad id (0) - E_ID" );
    229228    status = ref_mbf(&pk_rmbf, 0);
    230     assert( status == E_ID );
     229    rtems_test_assert( status == E_ID );
    231230
    232231    puts( "Init - ref_mbf - bad id (too great) - E_ID" );
    233232    status = ref_mbf(&pk_rmbf,
    234233                     CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
    235     assert( status == E_ID );
     234    rtems_test_assert( status == E_ID );
    236235
    237236    puts( "Init - ref_mbf - NULL pk_mbf returns E_PAR" );
    238237    status = ref_mbf( NULL, 1 );
    239     assert( status == E_PAR );
     238    rtems_test_assert( status == E_PAR );
    240239
    241240    puts( "Init - ref_mbf - mbf 1 - E_OK" );
    242241    status = ref_mbf( &pk_rmbf, 1 );
    243     assert( status == E_OK );
     242    rtems_test_assert( status == E_OK );
    244243
    245244    printf( "Init - mbf 1 msgsz = %" PRId32 "\n", pk_rmbf.msgsz );
     
    257256    puts( "Init - rcv_mbf - bad id (less than -4) - E_OACV" );
    258257    status = rcv_mbf(buffer, &s, -5);
    259     assert( status == E_OACV );
     258    rtems_test_assert( status == E_OACV );
    260259
    261260    puts( "Init - rcv_mbf - bad id (between 0 and -4) - E_ID" );
    262261    status = rcv_mbf(buffer, &s, -4);
    263     assert( status == E_ID );
     262    rtems_test_assert( status == E_ID );
    264263
    265264    puts( "Init - rcv_mbf - bad id (0) - E_ID" );
    266265    status = rcv_mbf(buffer, &s, 0);
    267     assert( status == E_ID );
     266    rtems_test_assert( status == E_ID );
    268267
    269268    puts( "Init - rcv_mbf - bad id (too great) - E_ID" );
    270269    status = rcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
    271     assert( status == E_ID );
     270    rtems_test_assert( status == E_ID );
    272271
    273272    puts( "Init - rcv_mbf - NULL msg returns E_PAR" );
    274273    status = rcv_mbf(NULL, &s, 1);
    275     assert( status == E_PAR );
     274    rtems_test_assert( status == E_PAR );
    276275
    277276    puts( "Init - rcv_mbf - NULL p_msgsz returns E_PAR" );
    278277    status = rcv_mbf(buffer, 0, 1);
    279     assert( status == E_PAR );
     278    rtems_test_assert( status == E_PAR );
    280279
    281280    puts("Init - rcv_mbf -- OK");
    282281    status = rcv_mbf(buffer, &s, 1);
    283     assert(status == E_OK);
     282    rtems_test_assert(status == E_OK);
    284283    printf("Message:[%s], length:%" PRId32 "\n", buffer, s);
    285284}
     
    294293    puts( "Init - prcv_mbf - bad id (less than -4) - E_OACV" );
    295294    status = prcv_mbf(buffer, &s, -5);
    296     assert( status == E_OACV );
     295    rtems_test_assert( status == E_OACV );
    297296
    298297    puts( "Init - prcv_mbf - bad id (between 0 and -4) - E_ID" );
    299298    status = prcv_mbf(buffer, &s, -4);
    300     assert( status == E_ID );
     299    rtems_test_assert( status == E_ID );
    301300
    302301    puts( "Init - prcv_mbf - bad id (0) - E_ID" );
    303302    status = prcv_mbf(buffer, &s, 0);
    304     assert( status == E_ID );
     303    rtems_test_assert( status == E_ID );
    305304
    306305    puts( "Init - prcv_mbf - bad id (too great) - E_ID" );
    307306    status = prcv_mbf(buffer, &s, CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1);
    308     assert( status == E_ID );
     307    rtems_test_assert( status == E_ID );
    309308
    310309    puts( "Init - prcv_mbf - NULL msg returns E_PAR" );
    311310    status = prcv_mbf(NULL, &s, 1);
    312     assert( status == E_PAR );
     311    rtems_test_assert( status == E_PAR );
    313312
    314313    puts( "Init - prcv_mbf - NULL p_msgsz returns E_PAR" );
    315314    status = prcv_mbf(buffer, 0, 1);
    316     assert( status == E_PAR );
     315    rtems_test_assert( status == E_PAR );
    317316
    318317    puts("Init - prcv_mbf -- E_TMOUT");
    319318    status = prcv_mbf(buffer, &s, 1);
    320     assert(status == E_TMOUT);
     319    rtems_test_assert(status == E_TMOUT);
    321320}
    322321
     
    330329    puts( "Init - trcv_mbf - bad id (less than -4) - E_OACV" );
    331330    status = trcv_mbf(buffer, &s, -5, 5000);
    332     assert( status == E_OACV );
     331    rtems_test_assert( status == E_OACV );
    333332
    334333    puts( "Init - trcv_mbf - bad id (between 0 and -4) - E_ID" );
    335334    status = trcv_mbf(buffer, &s, -4, 5000);
    336     assert( status == E_ID );
     335    rtems_test_assert( status == E_ID );
    337336
    338337    puts( "Init - trcv_mbf - bad id (0) - E_ID" );
    339338    status = trcv_mbf(buffer, &s, 0, 5000);
    340     assert( status == E_ID );
     339    rtems_test_assert( status == E_ID );
    341340
    342341    puts( "Init - trcv_mbf - bad id (too great) - E_ID" );
     
    344343                      CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS + 1,
    345344                      5000);
    346     assert( status == E_ID );
     345    rtems_test_assert( status == E_ID );
    347346
    348347    puts( "Init - trcv_mbf - NULL msg returns E_PAR" );
    349348    status = trcv_mbf(NULL, &s, 1, 5000);
    350     assert( status == E_PAR );
     349    rtems_test_assert( status == E_PAR );
    351350
    352351    puts( "Init - trcv_mbf - NULL p_msgsz returns E_PAR" );
    353352    status = trcv_mbf(buffer, 0, 1, 5000);
    354     assert( status == E_PAR );
     353    rtems_test_assert( status == E_PAR );
    355354
    356355    puts( "Init - trcv_mbf - tmout <-2  returns E_PAR" );
    357356    status = trcv_mbf(buffer, &s, 1, -2);
    358     assert( status == E_PAR );
     357    rtems_test_assert( status == E_PAR );
    359358
    360359    puts("\nInit - trcv_mbf -- E_TMOUT");
    361360    put_time( "Init - starting to block at ");
    362361    status = trcv_mbf(buffer, &s, 1, 1000);
    363     assert(status == E_TMOUT);
     362    rtems_test_assert(status == E_TMOUT);
    364363    put_time( "Init - time out at ");
    365364}
  • testsuites/itrontests/itronsem01/init.c

    r0160b3b rd35734d  
    1111 *  Output parameters:  NONE
    1212 *
    13  *  COPYRIGHT (c) 1989-1999.
     13 *  COPYRIGHT (c) 1989-2009.
    1414 *  On-Line Applications Research Corporation (OAR).
    1515 *
     
    5252  puts( "Init - cre_sem - NULL pk_sem returns E_PAR" );
    5353  status = cre_sem( 1, NULL );
    54   assert( status == E_PAR );
     54  rtems_test_assert( status == E_PAR );
    5555
    5656  puts( "Init - cre_sem - isemcnt > maxsem returns E_PAR" );
     
    5959  pk_csem.maxsem  = 2;
    6060  status = cre_sem( 1, &pk_csem );
    61   assert( status == E_PAR );
     61  rtems_test_assert( status == E_PAR );
    6262
    6363  puts( "Init - cre_sem - maxsem of 0 returns E_PAR" );
     
    6565  pk_csem.maxsem  = 0;
    6666  status = cre_sem( 1, &pk_csem );
    67   assert( status == E_PAR );
     67  rtems_test_assert( status == E_PAR );
    6868
    6969  /*
     
    7575  puts( "Init - cre_sem - bad id (less than -4) - E_OACV" );
    7676  status = cre_sem( -5, &pk_csem );
    77   assert( status == E_OACV );
     77  rtems_test_assert( status == E_OACV );
    7878
    7979  puts( "Init - cre_sem - bad id (between 0 and -4) - E_ID" );
    8080  status = cre_sem( -4, &pk_csem );
    81   assert( status == E_ID );
     81  rtems_test_assert( status == E_ID );
    8282
    8383  puts( "Init - cre_sem - bad id (0) - E_ID" );
    8484  status = cre_sem( 0, &pk_csem );
    85   assert( status == E_ID );
     85  rtems_test_assert( status == E_ID );
    8686
    8787  puts( "Init - cre_sem - bad id (too great) - E_ID" );
    8888  status = cre_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_csem );
    89   assert( status == E_ID );
     89  rtems_test_assert( status == E_ID );
    9090
    9191  puts( "Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK" );
     
    9494  pk_csem.sematr  = TA_TFIFO;
    9595  status = cre_sem( 1, &pk_csem );
    96   assert( status == E_OK );
     96  rtems_test_assert( status == E_OK );
    9797
    9898  puts( "Init - cre_sem - create semaphore 1 again - E_OBJ" );
    9999  status = cre_sem( 1, &pk_csem );
    100   assert( status == E_OBJ );
     100  rtems_test_assert( status == E_OBJ );
    101101
    102102  puts( "Init - cre_sem - create semaphore 2 TA_TPRI - E_OK" );
     
    105105  pk_csem.sematr  = TA_TPRI;
    106106  status = cre_sem( 2, &pk_csem );
    107   assert( status == E_OK );
     107  rtems_test_assert( status == E_OK );
    108108
    109109  /*
     
    113113  puts( "Init - del_sem - bad id (less than -4) - E_OACV" );
    114114  status = del_sem( -5 );
    115   assert( status == E_OACV );
     115  rtems_test_assert( status == E_OACV );
    116116
    117117  puts( "Init - del_sem - bad id (between 0 and -4) - E_ID" );
    118118  status = del_sem( -4 );
    119   assert( status == E_ID );
     119  rtems_test_assert( status == E_ID );
    120120
    121121  puts( "Init - del_sem - bad id (0) - E_ID" );
    122122  status = del_sem( 0 );
    123   assert( status == E_ID );
     123  rtems_test_assert( status == E_ID );
    124124
    125125  puts( "Init - del_sem - bad id (too great) - E_ID" );
    126126  status = del_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
    127   assert( status == E_ID );
     127  rtems_test_assert( status == E_ID );
    128128
    129129  /*
     
    133133  puts( "Init - sig_sem - bad id (less than -4) - E_OACV" );
    134134  status = sig_sem( -5 );
    135   assert( status == E_OACV );
     135  rtems_test_assert( status == E_OACV );
    136136
    137137  puts( "Init - sig_sem - bad id (between 0 and -4) - E_ID" );
    138138  status = sig_sem( -4 );
    139   assert( status == E_ID );
     139  rtems_test_assert( status == E_ID );
    140140
    141141  puts( "Init - sig_sem - bad id (0) - E_ID" );
    142142  status = sig_sem( 0 );
    143   assert( status == E_ID );
     143  rtems_test_assert( status == E_ID );
    144144
    145145  puts( "Init - sig_sem - bad id (too great) - E_ID" );
    146146  status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
    147   assert( status == E_ID );
     147  rtems_test_assert( status == E_ID );
    148148
    149149  /*
     
    153153  puts( "Init - preq_sem - bad id (less than -4) - E_OACV" );
    154154  status = preq_sem( -5 );
    155   assert( status == E_OACV );
     155  rtems_test_assert( status == E_OACV );
    156156
    157157  puts( "Init - preq_sem - bad id (between 0 and -4) - E_ID" );
    158158  status = preq_sem( -4 );
    159   assert( status == E_ID );
     159  rtems_test_assert( status == E_ID );
    160160
    161161  puts( "Init - preq_sem - bad id (0) - E_ID" );
    162162  status = preq_sem( 0 );
    163   assert( status == E_ID );
     163  rtems_test_assert( status == E_ID );
    164164
    165165  puts( "Init - preq_sem - bad id (too great) - E_ID" );
    166166  status = preq_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
    167   assert( status == E_ID );
     167  rtems_test_assert( status == E_ID );
    168168
    169169  /*
     
    173173  puts( "Init - wai_sem - bad id (less than -4) - E_OACV" );
    174174  status = wai_sem( -5 );
    175   assert( status == E_OACV );
     175  rtems_test_assert( status == E_OACV );
    176176
    177177  puts( "Init - wai_sem - bad id (between 0 and -4) - E_ID" );
    178178  status = wai_sem( -4 );
    179   assert( status == E_ID );
     179  rtems_test_assert( status == E_ID );
    180180
    181181  puts( "Init - wai_sem - bad id (0) - E_ID" );
    182182  status = wai_sem( 0 );
    183   assert( status == E_ID );
     183  rtems_test_assert( status == E_ID );
    184184
    185185  puts( "Init - wai_sem - bad id (too great) - E_ID" );
    186186  status = wai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1 );
    187   assert( status == E_ID );
     187  rtems_test_assert( status == E_ID );
    188188
    189189  /*
     
    193193  puts( "Init - twai_sem - bad id (less than -4) - E_OACV" );
    194194  status = twai_sem( -5, 1000 );
    195   assert( status == E_OACV );
     195  rtems_test_assert( status == E_OACV );
    196196
    197197  puts( "Init - twai_sem - bad id (between 0 and -4) - E_ID" );
    198198  status = twai_sem( -4, 1000 );
    199   assert( status == E_ID );
     199  rtems_test_assert( status == E_ID );
    200200
    201201  puts( "Init - twai_sem - bad id (0) - E_ID" );
    202202  status = twai_sem( 0, 1000 );
    203   assert( status == E_ID );
     203  rtems_test_assert( status == E_ID );
    204204
    205205  puts( "Init - twai_sem - bad id (too great) - E_ID" );
    206206  status = twai_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, 1000 );
    207   assert( status == E_ID );
     207  rtems_test_assert( status == E_ID );
    208208
    209209  /*
     
    213213  puts( "Init - ref_sem - bad id (less than -4) - E_OACV" );
    214214  status = ref_sem( -5, &pk_rsem );
    215   assert( status == E_OACV );
     215  rtems_test_assert( status == E_OACV );
    216216
    217217  puts( "Init - ref_sem - bad id (between 0 and -4) - E_ID" );
    218218  status = ref_sem( -4, &pk_rsem );
    219   assert( status == E_ID );
     219  rtems_test_assert( status == E_ID );
    220220
    221221  puts( "Init - ref_sem - bad id (0) - E_ID" );
    222222  status = ref_sem( 0, &pk_rsem );
    223   assert( status == E_ID );
     223  rtems_test_assert( status == E_ID );
    224224
    225225  puts( "Init - ref_sem - bad id (too great) - E_ID" );
    226226  status = ref_sem( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES + 1, &pk_rsem );
    227   assert( status == E_ID );
     227  rtems_test_assert( status == E_ID );
    228228
    229229  /*
     
    234234  puts( "Init - preq_sem - semaphore 1 available (count --> 1) - E_OK" );
    235235  status = preq_sem( 1 );
    236   assert( status == E_OK );
     236  rtems_test_assert( status == E_OK );
    237237
    238238  puts( "Init - preq_sem - semaphore 1 available (count --> 0) - E_OK" );
    239239  status = preq_sem( 1 );
    240   assert( status == E_OK );
     240  rtems_test_assert( status == E_OK );
    241241
    242242  puts( "Init - preq_sem - semaphore 1 unavailable - E_TMOUT" );
    243243  status = preq_sem( 1 );
    244   assert( status == E_TMOUT );
     244  rtems_test_assert( status == E_TMOUT );
    245245
    246246  puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
    247247  status = sig_sem( 1 );
    248   assert( status == E_OK );
     248  rtems_test_assert( status == E_OK );
    249249
    250250  puts("Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK");
    251251  status = twai_sem( 1, TMO_POL );
    252   assert( status == E_OK );
     252  rtems_test_assert( status == E_OK );
    253253
    254254  puts( "Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT" );
    255255  status = twai_sem( 1, TMO_POL );
    256   assert( status == E_TMOUT );
     256  rtems_test_assert( status == E_TMOUT );
    257257
    258258  /*
     
    263263  put_time( "Init - starting to block at ");
    264264  status = twai_sem( 1, 1000 );
    265   assert( status == E_TMOUT );
     265  rtems_test_assert( status == E_TMOUT );
    266266  put_time( "Init - timed out at ");
    267267  puts( "Init - twai_sem - semaphore 1 unavailable - timeout completed" );
     
    273273  puts( "Init - sig_sem - semaphore 1 (count --> 1) - E_OK" );
    274274  status = sig_sem( 1 );
    275   assert( status == E_OK );
     275  rtems_test_assert( status == E_OK );
    276276
    277277  puts( "Init - sig_sem - semaphore 1 (count --> 2) - E_OK" );
    278278  status = sig_sem( 1 );
    279   assert( status == E_OK );
     279  rtems_test_assert( status == E_OK );
    280280
    281281  puts( "Init - sig_sem - semaphore 1 (count --> 3) - E_OK" );
    282282  status = sig_sem( 1 );
    283   assert( status == E_OK );
     283  rtems_test_assert( status == E_OK );
    284284
    285285  puts( "Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR" );
    286286  status = sig_sem( 1 );
    287   assert( status == E_QOVR );
     287  rtems_test_assert( status == E_QOVR );
    288288
    289289  /*
     
    293293  puts( "Init - ref_sem - NULL pk_sem returns E_PAR" );
    294294  status = ref_sem( 1, NULL );
    295   assert( status == E_PAR );
     295  rtems_test_assert( status == E_PAR );
    296296
    297297  puts( "Init - ref_sem - semaphore 1 - E_OK" );
    298298  status = ref_sem( 1, &pk_rsem );
    299   assert( status == E_OK );
     299  rtems_test_assert( status == E_OK );
    300300  printf( "Init - semaphore 1 count = %" PRId32 "\n", pk_rsem.semcnt );
    301301  printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
     
    303303  puts( "Init - preq_sem - semaphore 1 (count --> 2) - E_OK" );
    304304  status = preq_sem( 1 );
    305   assert( status == E_OK );
     305  rtems_test_assert( status == E_OK );
    306306
    307307  puts( "Init - ref_sem - semaphore 1 - E_OK" );
    308308  status = ref_sem( 1, &pk_rsem );
    309   assert( status == E_OK );
     309  rtems_test_assert( status == E_OK );
    310310  printf( "Init - semaphore 1 count = %" PRId32 "\n", pk_rsem.semcnt );
    311311  printf( "Init - semaphore 1 waiting tasks = %d\n", pk_rsem.wtsk );
     
    320320  puts( "Init - del_sem - semaphore 1 deleted - E_OK" );
    321321  status = del_sem( 1 );
    322   assert( status == E_OK );
     322  rtems_test_assert( status == E_OK );
    323323
    324324  puts( "Init - XXX need other tasks to complete the test XXX" );
     
    326326  puts( "Init - dly_tsk - 1 second to let other task run" );
    327327  status = dly_tsk( 1000 );
    328   assert( status == E_OK );
     328  rtems_test_assert( status == E_OK );
    329329
    330330  printf( "*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***\n" );
  • testsuites/itrontests/itronsem01/system.h

    r0160b3b rd35734d  
    44 *  function in the test set.
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2009.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    1616#include <tmacros.h>
    1717#include <rtems/itron.h>
    18 #include <assert.h>
    1918
    2019/* functions */
  • testsuites/itrontests/itrontask02/dormant.c

    r0160b3b rd35734d  
    1919 */
    2020
    21 #include <assert.h>
    2221#include "system.h"
    2322
     
    2827
    2928  puts( "ERROR==>ext_tsk of DORMANT returned" );
    30   assert(0);
     29  rtems_test_assert(0);
    3130}
    3231
  • testsuites/itrontests/itrontask02/init.c

    r0160b3b rd35734d  
    1111 *  Output parameters:  NONE
    1212 *
    13  *  COPYRIGHT (c) 1989-1999.
     13 *  COPYRIGHT (c) 1989-2009.
    1414 *  On-Line Applications Research Corporation (OAR).
    1515 *
     
    2424#include "system.h"
    2525#include <stdio.h>
    26 #include <assert.h>
    2726
    2827void ITRON_Init( void )
     
    332331  puts( "Init - chg_pri - change priority of TSK_SELF - E_OBJ" );
    333332  status = chg_pri( XXX - INTERRUPT, 1 );
    334   assert( status == E_OBJ );
     333  rtems_test_assert( status == E_OBJ );
    335334  */
    336335
     
    411410  puts( "Init - ref_tsk - reference INTERRUPT - E_ID" );
    412411  status = ref_tsk( &pk_rtsk, TSK_SELF );
    413   assert( status == E_ID );
     412  rtems_test_assert( status == E_ID );
    414413  */
    415414
  • testsuites/itrontests/itrontask03/init.c

    r0160b3b rd35734d  
    1111 *  Output parameters:  NONE
    1212 *
    13  *  COPYRIGHT (c) 1989-1999.
     13 *  COPYRIGHT (c) 1989-2009.
    1414 *  On-Line Applications Research Corporation (OAR).
    1515 *
     
    2424#include "system.h"
    2525#include <stdio.h>
    26 #include <assert.h>
    2726
    2827void ITRON_Init( void )
     
    135134
    136135  exd_tsk();
    137   assert(0);
     136  rtems_test_assert(0);
    138137}
  • testsuites/itrontests/itrontask03/preempt.c

    r0160b3b rd35734d  
    88 *  Output parameters:  NONE
    99 *
    10  *  COPYRIGHT (c) 1989-1999.
     10 *  COPYRIGHT (c) 1989-2009.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    1818 */
    1919
    20 #include <assert.h>
    2120#include "system.h"
    2221
     
    3130  status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
    3231  fatal_directive_status( status, E_OK , "ref_tsk of PREEMPT");
    33   assert( pk_rtsk.tskpri  == PREEMPT_PRIORITY );
    34   assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
    35   assert( pk_rtsk.task    == Preempt_task );
    36   assert( pk_rtsk.stksz   >= RTEMS_MINIMUM_STACK_SIZE );
    37   assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
     32  rtems_test_assert( pk_rtsk.tskpri  == PREEMPT_PRIORITY );
     33  rtems_test_assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
     34  rtems_test_assert( pk_rtsk.task    == Preempt_task );
     35  rtems_test_assert( pk_rtsk.stksz   >= RTEMS_MINIMUM_STACK_SIZE );
     36  rtems_test_assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
    3837
    3938  if ( Preempt_task_Count == 0 ) {
     
    4443    puts( "PREEMPT - ext_tsk - going to DORMANT state" );
    4544    ext_tsk( );
    46     assert( 0 );
     45    rtems_test_assert( 0 );
    4746  } else {
    4847    Preempt_task_Count ++;
    4948    puts( "PREEMPT - exd_tsk - Exit and Delete task" );
    5049    exd_tsk(  );
    51     assert( 0 );
     50    rtems_test_assert( 0 );
    5251  }
    5352}
Note: See TracChangeset for help on using the changeset viewer.