Changeset 3aa4c2e0 in rtems


Ignore:
Timestamp:
Aug 2, 2002, 12:52:14 AM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
b454bc9
Parents:
cd9396e
Message:

2002-08-01 Joel Sherrill <joel@…>

  • Per PR47 add support for buffered test output. This involved adding defines to redirect output to a buffer and dump it when full, at "test pause", and at exit. To avoid problems when redefining exit(), all tests were modified to call rtems_test_exit(). Some tests, notable psxtests, had to be modified to include the standard test macro .h file (pmacros.h or tmacros.h) to enable this support.
  • sp01/task1.c, sp02/task1.c, sp03/task2.c, sp04/task1.c, sp05/task1.c, sp06/task1.c, sp07/taskexit.c, sp08/task1.c, sp09/task1.c, sp11/task1.c, sp12/pritask.c, sp12/task5.c, sp13/task1.c, sp14/task2.c, sp15/task1.c, sp16/task1.c, sp17/task1.c, sp19/fptask.c, sp20/task1.c, sp21/task1.c, sp22/task1.c, sp23/task1.c, sp24/task1.c, sp25/task1.c, sp26/init.c, sp26/task1.c, sp30/task1.c, sp31/task1.c, spsize/init.c, spsize/size.c: Modified.
Files:
62 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/sptests/ChangeLog

    rcd9396e r3aa4c2e0  
     12002-08-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * Per PR47 add support for buffered test output.  This involved
     4        adding defines to redirect output to a buffer and dump it when
     5        full, at "test pause", and at exit.  To avoid problems when redefining
     6        exit(), all tests were modified to call rtems_test_exit().
     7        Some tests, notable psxtests, had to be modified to include
     8        the standard test macro .h file (pmacros.h or tmacros.h) to
     9        enable this support.
     10        * sp01/task1.c, sp02/task1.c, sp03/task2.c, sp04/task1.c, sp05/task1.c,
     11        sp06/task1.c, sp07/taskexit.c, sp08/task1.c, sp09/task1.c,
     12        sp11/task1.c, sp12/pritask.c, sp12/task5.c, sp13/task1.c,
     13        sp14/task2.c, sp15/task1.c, sp16/task1.c, sp17/task1.c,
     14        sp19/fptask.c, sp20/task1.c, sp21/task1.c, sp22/task1.c,
     15        sp23/task1.c, sp24/task1.c, sp25/task1.c, sp26/init.c, sp26/task1.c,
     16        sp30/task1.c, sp31/task1.c, spsize/init.c, spsize/size.c: Modified.
     17
    1182002-07-30      Joel Sherrill <joel@OARcorp.com>
    219
  • c/src/tests/sptests/sp01/task1.c

    rcd9396e r3aa4c2e0  
    3838    if ( time.second >= 35 ) {
    3939      puts( "*** END OF TEST 1 ***" );
    40       exit( 0 );
     40      rtems_test_exit( 0 );
    4141    }
    4242
  • c/src/tests/sptests/sp02/task1.c

    rcd9396e r3aa4c2e0  
    6262
    6363  puts( "*** END OF TEST 2 ***" );
    64   exit( 0 );
     64  rtems_test_exit( 0 );
    6565}
  • c/src/tests/sptests/sp03/task2.c

    rcd9396e r3aa4c2e0  
    3737    if ( time.second >= 17 ) {
    3838      puts( "*** END OF TEST 3 *** " );
    39       exit( 0 );
     39      rtems_test_exit( 0 );
    4040    }
    4141
  • c/src/tests/sptests/sp04/task1.c

    rcd9396e r3aa4c2e0  
    112112      showTaskSwitches ();
    113113      puts( "*** END OF TEST 4 ***" );
    114       exit (0);
     114      rtems_test_exit (0);
    115115    }
    116116  }
  • c/src/tests/sptests/sp05/task1.c

    rcd9396e r3aa4c2e0  
    7474
    7575  puts( "*** END OF TEST 5 ***" );
    76   exit( 0 );
     76  rtems_test_exit( 0 );
    7777}
  • c/src/tests/sptests/sp06/task1.c

    rcd9396e r3aa4c2e0  
    3333  if ( pass == 5 ) {
    3434    puts( "*** END OF TEST 6 ***" );
    35     exit( 0 );
     35    rtems_test_exit( 0 );
    3636  }
    3737
  • c/src/tests/sptests/sp07/taskexit.c

    rcd9396e r3aa4c2e0  
    2929
    3030  puts("*** END OF TEST 7 ***" );
    31   exit( 0 );
     31  rtems_test_exit( 0 );
    3232}
  • c/src/tests/sptests/sp08/task1.c

    rcd9396e r3aa4c2e0  
    252252
    253253  puts( "*** END OF TEST 8 ***" );
    254   exit( 0 );
     254  rtems_test_exit( 0 );
    255255}
  • c/src/tests/sptests/sp09/task1.c

    rcd9396e r3aa4c2e0  
    6666
    6767  puts( "*** END OF TEST 9 ***" );
    68   exit( 0 );
     68  rtems_test_exit( 0 );
    6969}
  • c/src/tests/sptests/sp11/task1.c

    rcd9396e r3aa4c2e0  
    406406
    407407  puts( "*** END OF TEST 11 ***" );
    408   exit( 0 );
     408  rtems_test_exit( 0 );
    409409}
  • c/src/tests/sptests/sp12/pritask.c

    rcd9396e r3aa4c2e0  
    4949  if ( its_priority < 64 ) {
    5050    printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority );
    51     exit( 0 );
     51    rtems_test_exit( 0 );
    5252  }
    5353
  • c/src/tests/sptests/sp12/task5.c

    rcd9396e r3aa4c2e0  
    5151
    5252  puts( "*** END OF TEST 12 ***" );
    53   exit( 0 );
     53  rtems_test_exit( 0 );
    5454}
  • c/src/tests/sptests/sp13/task1.c

    rcd9396e r3aa4c2e0  
    336336      {
    337337          puts("TA1 - exact size size match failed");
    338           exit(1);
     338          rtems_test_exit(1);
    339339      }
    340340
     
    342342      {
    343343          puts("TA1 - exact size data match failed");
    344           exit(1);
     344          rtems_test_exit(1);
    345345      }
    346346
     
    351351          {
    352352              puts("TA1 - exact size overrun match failed");
    353               exit(1);
     353              rtems_test_exit(1);
    354354          }
    355355         
     
    360360 
    361361  puts( "*** END OF TEST 13 ***" );
    362   exit( 0 );
     362  rtems_test_exit( 0 );
    363363}
  • c/src/tests/sptests/sp14/task2.c

    rcd9396e r3aa4c2e0  
    4444
    4545  puts( "*** END OF TEST 14 ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • c/src/tests/sptests/sp15/task1.c

    rcd9396e r3aa4c2e0  
    125125
    126126  puts( "*** END OF TEST 15 ***" );
    127   exit( 0 );
     127  rtems_test_exit( 0 );
    128128}
  • c/src/tests/sptests/sp16/task1.c

    rcd9396e r3aa4c2e0  
    278278
    279279  puts( "*** END OF TEST 16 ***" );
    280   exit( 0 );
     280  rtems_test_exit( 0 );
    281281}
  • c/src/tests/sptests/sp17/task1.c

    rcd9396e r3aa4c2e0  
    4444
    4545  puts( "*** END OF TEST 17 ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • c/src/tests/sptests/sp19/fptask.c

    rcd9396e r3aa4c2e0  
    7272
    7373      puts( "*** END OF TEST 19 *** " );
    74       exit( 0 );
     74      rtems_test_exit( 0 );
    7575    }
    7676
  • c/src/tests/sptests/sp20/task1.c

    rcd9396e r3aa4c2e0  
    5454  if ( rmid != test_rmid ) {
    5555     printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
    56      exit( 0 );
     56     rtems_test_exit( 0 );
    5757  }
    5858
     
    103103
    104104        if ( failed == 5 )
    105           exit( 0 );
     105          rtems_test_exit( 0 );
    106106
    107107        pass += 1;
     
    113113        if ( pass == 10 ) {
    114114          puts( "*** END OF TEST 20 ***" );
    115           exit( 0 );
     115          rtems_test_exit( 0 );
    116116        }
    117117
  • c/src/tests/sptests/sp21/task1.c

    rcd9396e r3aa4c2e0  
    102102
    103103  puts( "*** END OF TEST 21 ***" );
    104   exit( 0 );
     104  rtems_test_exit( 0 );
    105105}
  • c/src/tests/sptests/sp22/task1.c

    rcd9396e r3aa4c2e0  
    160160
    161161  puts( "*** END OF TEST 22 *** " );
    162   exit( 0 );
     162  rtems_test_exit( 0 );
    163163}
  • c/src/tests/sptests/sp23/task1.c

    rcd9396e r3aa4c2e0  
    9292
    9393  puts( "*** END OF TEST 23 ***" );
    94   exit( 0 );
     94  rtems_test_exit( 0 );
    9595}
  • c/src/tests/sptests/sp24/task1.c

    rcd9396e r3aa4c2e0  
    4646    if ( time.second >= 35 ) {
    4747      puts( "*** END OF TEST 24 ***" );
    48       exit( 0 );
     48      rtems_test_exit( 0 );
    4949    }
    5050
  • c/src/tests/sptests/sp25/task1.c

    rcd9396e r3aa4c2e0  
    237237
    238238  puts( "*** END OF TEST 25 ***" );
    239   exit( 0 );
     239  rtems_test_exit( 0 );
    240240}
  • c/src/tests/sptests/sp26/init.c

    rcd9396e r3aa4c2e0  
    3535  /* does not return */
    3636  puts( "Init - task1 should not have returned" );
    37   exit( 0 );
     37  rtems_test_exit( 0 );
    3838}
  • c/src/tests/sptests/sp26/task1.c

    rcd9396e r3aa4c2e0  
    1717static rtems_id taskId2;
    1818rtems_interval ticksPerSecond;
     19
     20#include "system.h"
    1921
    2022static int
     
    7577 
    7678  puts( "*** END OF TEST 26 ***" );
    77   exit( 0 );
     79  rtems_test_exit( 0 );
    7880}
    7981
  • c/src/tests/sptests/sp30/task1.c

    rcd9396e r3aa4c2e0  
    4646    if ( time.second >= 35 ) {
    4747      puts( "*** END OF TEST 30 ***" );
    48       exit( 0 );
     48      rtems_test_exit( 0 );
    4949    }
    5050
  • c/src/tests/sptests/sp31/task1.c

    rcd9396e r3aa4c2e0  
    7474  if ( TSR_fired ) {
    7575    puts( "TA1 - TSR fired and should not have!" );
    76     exit(1);
     76    rtems_test_exit(1);
    7777  }
    7878
     
    271271
    272272  puts( "*** END OF TEST 31 *** " );
    273   exit( 0 );
     273  rtems_test_exit( 0 );
    274274}
  • c/src/tests/sptests/spsize/init.c

    rcd9396e r3aa4c2e0  
    4343  size_rtems( 1 );
    4444  puts( "*** END OF RTEMS SIZE PROGRAM ***" );
    45   exit( 0 );
     45  rtems_test_exit( 0 );
    4646#if defined(HAVE_MENU)
    4747  do {
     
    5656      case 1: size_rtems( 1 );  break;
    5757      case 2: size_rtems( 0 );  break;
    58       case 3: exit( 0 );
     58      case 3: rtems_test_exit( 0 );
    5959      default:  continue;
    6060    }
  • c/src/tests/sptests/spsize/size.c

    rcd9396e r3aa4c2e0  
    4747
    4848#include <stdlib.h>
     49#include <stdio.h>
     50#include <tmacros.h>
    4951
    5052/* These are always defined by the executive.
     
    127129rtems_unsigned32 sys_req;
    128130
    129 /* to avoid warnings */
    130 int puts();
    131 int printf();
    132 int getint();
    133 #undef getchar
    134 int getchar();
    135131void help_size();
    136132void print_formula();
  • testsuites/sptests/ChangeLog

    rcd9396e r3aa4c2e0  
     12002-08-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * Per PR47 add support for buffered test output.  This involved
     4        adding defines to redirect output to a buffer and dump it when
     5        full, at "test pause", and at exit.  To avoid problems when redefining
     6        exit(), all tests were modified to call rtems_test_exit().
     7        Some tests, notable psxtests, had to be modified to include
     8        the standard test macro .h file (pmacros.h or tmacros.h) to
     9        enable this support.
     10        * sp01/task1.c, sp02/task1.c, sp03/task2.c, sp04/task1.c, sp05/task1.c,
     11        sp06/task1.c, sp07/taskexit.c, sp08/task1.c, sp09/task1.c,
     12        sp11/task1.c, sp12/pritask.c, sp12/task5.c, sp13/task1.c,
     13        sp14/task2.c, sp15/task1.c, sp16/task1.c, sp17/task1.c,
     14        sp19/fptask.c, sp20/task1.c, sp21/task1.c, sp22/task1.c,
     15        sp23/task1.c, sp24/task1.c, sp25/task1.c, sp26/init.c, sp26/task1.c,
     16        sp30/task1.c, sp31/task1.c, spsize/init.c, spsize/size.c: Modified.
     17
    1182002-07-30      Joel Sherrill <joel@OARcorp.com>
    219
  • testsuites/sptests/sp01/task1.c

    rcd9396e r3aa4c2e0  
    3838    if ( time.second >= 35 ) {
    3939      puts( "*** END OF TEST 1 ***" );
    40       exit( 0 );
     40      rtems_test_exit( 0 );
    4141    }
    4242
  • testsuites/sptests/sp02/task1.c

    rcd9396e r3aa4c2e0  
    6262
    6363  puts( "*** END OF TEST 2 ***" );
    64   exit( 0 );
     64  rtems_test_exit( 0 );
    6565}
  • testsuites/sptests/sp03/task2.c

    rcd9396e r3aa4c2e0  
    3737    if ( time.second >= 17 ) {
    3838      puts( "*** END OF TEST 3 *** " );
    39       exit( 0 );
     39      rtems_test_exit( 0 );
    4040    }
    4141
  • testsuites/sptests/sp04/task1.c

    rcd9396e r3aa4c2e0  
    112112      showTaskSwitches ();
    113113      puts( "*** END OF TEST 4 ***" );
    114       exit (0);
     114      rtems_test_exit (0);
    115115    }
    116116  }
  • testsuites/sptests/sp05/task1.c

    rcd9396e r3aa4c2e0  
    7474
    7575  puts( "*** END OF TEST 5 ***" );
    76   exit( 0 );
     76  rtems_test_exit( 0 );
    7777}
  • testsuites/sptests/sp06/task1.c

    rcd9396e r3aa4c2e0  
    3333  if ( pass == 5 ) {
    3434    puts( "*** END OF TEST 6 ***" );
    35     exit( 0 );
     35    rtems_test_exit( 0 );
    3636  }
    3737
  • testsuites/sptests/sp07/taskexit.c

    rcd9396e r3aa4c2e0  
    2929
    3030  puts("*** END OF TEST 7 ***" );
    31   exit( 0 );
     31  rtems_test_exit( 0 );
    3232}
  • testsuites/sptests/sp08/task1.c

    rcd9396e r3aa4c2e0  
    252252
    253253  puts( "*** END OF TEST 8 ***" );
    254   exit( 0 );
     254  rtems_test_exit( 0 );
    255255}
  • testsuites/sptests/sp09/task1.c

    rcd9396e r3aa4c2e0  
    6666
    6767  puts( "*** END OF TEST 9 ***" );
    68   exit( 0 );
     68  rtems_test_exit( 0 );
    6969}
  • testsuites/sptests/sp11/task1.c

    rcd9396e r3aa4c2e0  
    406406
    407407  puts( "*** END OF TEST 11 ***" );
    408   exit( 0 );
     408  rtems_test_exit( 0 );
    409409}
  • testsuites/sptests/sp12/pritask.c

    rcd9396e r3aa4c2e0  
    4949  if ( its_priority < 64 ) {
    5050    printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority );
    51     exit( 0 );
     51    rtems_test_exit( 0 );
    5252  }
    5353
  • testsuites/sptests/sp12/task5.c

    rcd9396e r3aa4c2e0  
    5151
    5252  puts( "*** END OF TEST 12 ***" );
    53   exit( 0 );
     53  rtems_test_exit( 0 );
    5454}
  • testsuites/sptests/sp13/task1.c

    rcd9396e r3aa4c2e0  
    336336      {
    337337          puts("TA1 - exact size size match failed");
    338           exit(1);
     338          rtems_test_exit(1);
    339339      }
    340340
     
    342342      {
    343343          puts("TA1 - exact size data match failed");
    344           exit(1);
     344          rtems_test_exit(1);
    345345      }
    346346
     
    351351          {
    352352              puts("TA1 - exact size overrun match failed");
    353               exit(1);
     353              rtems_test_exit(1);
    354354          }
    355355         
     
    360360 
    361361  puts( "*** END OF TEST 13 ***" );
    362   exit( 0 );
     362  rtems_test_exit( 0 );
    363363}
  • testsuites/sptests/sp14/task2.c

    rcd9396e r3aa4c2e0  
    4444
    4545  puts( "*** END OF TEST 14 ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • testsuites/sptests/sp15/task1.c

    rcd9396e r3aa4c2e0  
    125125
    126126  puts( "*** END OF TEST 15 ***" );
    127   exit( 0 );
     127  rtems_test_exit( 0 );
    128128}
  • testsuites/sptests/sp16/task1.c

    rcd9396e r3aa4c2e0  
    278278
    279279  puts( "*** END OF TEST 16 ***" );
    280   exit( 0 );
     280  rtems_test_exit( 0 );
    281281}
  • testsuites/sptests/sp17/task1.c

    rcd9396e r3aa4c2e0  
    4444
    4545  puts( "*** END OF TEST 17 ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • testsuites/sptests/sp19/fptask.c

    rcd9396e r3aa4c2e0  
    7272
    7373      puts( "*** END OF TEST 19 *** " );
    74       exit( 0 );
     74      rtems_test_exit( 0 );
    7575    }
    7676
  • testsuites/sptests/sp20/task1.c

    rcd9396e r3aa4c2e0  
    5454  if ( rmid != test_rmid ) {
    5555     printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
    56      exit( 0 );
     56     rtems_test_exit( 0 );
    5757  }
    5858
     
    103103
    104104        if ( failed == 5 )
    105           exit( 0 );
     105          rtems_test_exit( 0 );
    106106
    107107        pass += 1;
     
    113113        if ( pass == 10 ) {
    114114          puts( "*** END OF TEST 20 ***" );
    115           exit( 0 );
     115          rtems_test_exit( 0 );
    116116        }
    117117
  • testsuites/sptests/sp21/task1.c

    rcd9396e r3aa4c2e0  
    102102
    103103  puts( "*** END OF TEST 21 ***" );
    104   exit( 0 );
     104  rtems_test_exit( 0 );
    105105}
  • testsuites/sptests/sp22/task1.c

    rcd9396e r3aa4c2e0  
    160160
    161161  puts( "*** END OF TEST 22 *** " );
    162   exit( 0 );
     162  rtems_test_exit( 0 );
    163163}
  • testsuites/sptests/sp23/task1.c

    rcd9396e r3aa4c2e0  
    9292
    9393  puts( "*** END OF TEST 23 ***" );
    94   exit( 0 );
     94  rtems_test_exit( 0 );
    9595}
  • testsuites/sptests/sp24/task1.c

    rcd9396e r3aa4c2e0  
    4646    if ( time.second >= 35 ) {
    4747      puts( "*** END OF TEST 24 ***" );
    48       exit( 0 );
     48      rtems_test_exit( 0 );
    4949    }
    5050
  • testsuites/sptests/sp25/task1.c

    rcd9396e r3aa4c2e0  
    237237
    238238  puts( "*** END OF TEST 25 ***" );
    239   exit( 0 );
     239  rtems_test_exit( 0 );
    240240}
  • testsuites/sptests/sp26/init.c

    rcd9396e r3aa4c2e0  
    3535  /* does not return */
    3636  puts( "Init - task1 should not have returned" );
    37   exit( 0 );
     37  rtems_test_exit( 0 );
    3838}
  • testsuites/sptests/sp26/task1.c

    rcd9396e r3aa4c2e0  
    1717static rtems_id taskId2;
    1818rtems_interval ticksPerSecond;
     19
     20#include "system.h"
    1921
    2022static int
     
    7577 
    7678  puts( "*** END OF TEST 26 ***" );
    77   exit( 0 );
     79  rtems_test_exit( 0 );
    7880}
    7981
  • testsuites/sptests/sp30/task1.c

    rcd9396e r3aa4c2e0  
    4646    if ( time.second >= 35 ) {
    4747      puts( "*** END OF TEST 30 ***" );
    48       exit( 0 );
     48      rtems_test_exit( 0 );
    4949    }
    5050
  • testsuites/sptests/sp31/task1.c

    rcd9396e r3aa4c2e0  
    7474  if ( TSR_fired ) {
    7575    puts( "TA1 - TSR fired and should not have!" );
    76     exit(1);
     76    rtems_test_exit(1);
    7777  }
    7878
     
    271271
    272272  puts( "*** END OF TEST 31 *** " );
    273   exit( 0 );
     273  rtems_test_exit( 0 );
    274274}
  • testsuites/sptests/spsize/init.c

    rcd9396e r3aa4c2e0  
    4343  size_rtems( 1 );
    4444  puts( "*** END OF RTEMS SIZE PROGRAM ***" );
    45   exit( 0 );
     45  rtems_test_exit( 0 );
    4646#if defined(HAVE_MENU)
    4747  do {
     
    5656      case 1: size_rtems( 1 );  break;
    5757      case 2: size_rtems( 0 );  break;
    58       case 3: exit( 0 );
     58      case 3: rtems_test_exit( 0 );
    5959      default:  continue;
    6060    }
  • testsuites/sptests/spsize/size.c

    rcd9396e r3aa4c2e0  
    4747
    4848#include <stdlib.h>
     49#include <stdio.h>
     50#include <tmacros.h>
    4951
    5052/* These are always defined by the executive.
     
    127129rtems_unsigned32 sys_req;
    128130
    129 /* to avoid warnings */
    130 int puts();
    131 int printf();
    132 int getint();
    133 #undef getchar
    134 int getchar();
    135131void help_size();
    136132void print_formula();
Note: See TracChangeset for help on using the changeset viewer.