Changeset 016a926 in rtems


Ignore:
Timestamp:
Aug 2, 2002, 12:55:27 AM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
6ada2b1e
Parents:
0428ddf3
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.
  • cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c, rtmonuse/task1.c, termios/init.c: Modified.
Files:
12 edited

Legend:

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

    r0428ddf3 r016a926  
     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        * cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c,
     11        rtmonuse/task1.c, termios/init.c: Modified.
     12
    1132002-04-14      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    214
  • c/src/tests/libtests/cpuuse/task2.c

    r0428ddf3 r016a926  
    4444  CPU_usage_Dump();
    4545  puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • c/src/tests/libtests/malloctest/task1.c

    r0428ddf3 r016a926  
    4040    if ( passes++ > NUM_PASSES ) {
    4141        puts("*** END OF MALLOC TEST ***");
    42         exit(0);
     42        rtems_test_exit(0);
    4343    }
    4444
     
    6464       {
    6565          printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff);
    66           exit(1);
     66          rtems_test_exit(1);
    6767       }
    6868    }
  • c/src/tests/libtests/putenvtest/init.c

    r0428ddf3 r016a926  
    5858
    5959  puts( "*** END OF PUTENV/GETENV TEST ***" );
    60   exit(0);
     60  rtems_test_exit(0);
    6161}
  • c/src/tests/libtests/rtmonuse/task1.c

    r0428ddf3 r016a926  
    5151  if ( rmid != test_rmid ) {
    5252     printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
    53      exit( 0 );
     53     rtems_test_exit( 0 );
    5454  }
    5555
     
    103103
    104104        if ( failed == 5 )
    105           exit( 0 );
     105          rtems_test_exit( 0 );
    106106
    107107        pass += 1;
     
    115115          CPU_usage_Dump();
    116116          Period_usage_Dump();
    117           exit( 0 );
     117          rtems_test_exit( 0 );
    118118        }
    119119
  • c/src/tests/libtests/termios/init.c

    r0428ddf3 r016a926  
    4646#include <errno.h>
    4747#include <string.h>
     48
     49#include <tmacros.h>
    4850
    4951#if !defined(fileno)
     
    590592  if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
    591593    perror( "change_line_settings(): tcsetattr() failed" );
    592     exit( 1 );
     594    rtems_test_exit( 1 );
    593595  }
    594596  printf( "Line settings set.\n" );
     
    607609  if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
    608610    perror( "canonical_input(): tcsetattr() failed" );
    609     exit( 1 );
     611    rtems_test_exit( 1 );
    610612  }
    611613 
     
    726728  if( tcgetattr( fileno( stdin ), &orig_termios ) < 0 ) {
    727729    perror( "tcgetattr() failed" );
    728     exit( 0 );
     730    rtems_test_exit( 0 );
    729731  }
    730732
     
    739741        if( tcsetattr( fileno( stdin ), TCSADRAIN, &test_termios ) < 0 ) {
    740742          perror( "tcsetattr() failed" );
    741           exit( 1 );
     743          rtems_test_exit( 1 );
    742744        }
    743745        usage();
     
    765767
    766768      case '9':
    767         exit( 1 );
     769        rtems_test_exit( 1 );
    768770
    769771      case '\n':
  • testsuites/libtests/ChangeLog

    r0428ddf3 r016a926  
     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        * cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c,
     11        rtmonuse/task1.c, termios/init.c: Modified.
     12
    1132002-04-14      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    214
  • testsuites/libtests/cpuuse/task2.c

    r0428ddf3 r016a926  
    4444  CPU_usage_Dump();
    4545  puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
    46   exit( 0 );
     46  rtems_test_exit( 0 );
    4747}
  • testsuites/libtests/malloctest/task1.c

    r0428ddf3 r016a926  
    4040    if ( passes++ > NUM_PASSES ) {
    4141        puts("*** END OF MALLOC TEST ***");
    42         exit(0);
     42        rtems_test_exit(0);
    4343    }
    4444
     
    6464       {
    6565          printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff);
    66           exit(1);
     66          rtems_test_exit(1);
    6767       }
    6868    }
  • testsuites/libtests/putenvtest/init.c

    r0428ddf3 r016a926  
    5858
    5959  puts( "*** END OF PUTENV/GETENV TEST ***" );
    60   exit(0);
     60  rtems_test_exit(0);
    6161}
  • testsuites/libtests/rtmonuse/task1.c

    r0428ddf3 r016a926  
    5151  if ( rmid != test_rmid ) {
    5252     printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
    53      exit( 0 );
     53     rtems_test_exit( 0 );
    5454  }
    5555
     
    103103
    104104        if ( failed == 5 )
    105           exit( 0 );
     105          rtems_test_exit( 0 );
    106106
    107107        pass += 1;
     
    115115          CPU_usage_Dump();
    116116          Period_usage_Dump();
    117           exit( 0 );
     117          rtems_test_exit( 0 );
    118118        }
    119119
  • testsuites/libtests/termios/init.c

    r0428ddf3 r016a926  
    4646#include <errno.h>
    4747#include <string.h>
     48
     49#include <tmacros.h>
    4850
    4951#if !defined(fileno)
     
    590592  if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
    591593    perror( "change_line_settings(): tcsetattr() failed" );
    592     exit( 1 );
     594    rtems_test_exit( 1 );
    593595  }
    594596  printf( "Line settings set.\n" );
     
    607609  if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
    608610    perror( "canonical_input(): tcsetattr() failed" );
    609     exit( 1 );
     611    rtems_test_exit( 1 );
    610612  }
    611613 
     
    726728  if( tcgetattr( fileno( stdin ), &orig_termios ) < 0 ) {
    727729    perror( "tcgetattr() failed" );
    728     exit( 0 );
     730    rtems_test_exit( 0 );
    729731  }
    730732
     
    739741        if( tcsetattr( fileno( stdin ), TCSADRAIN, &test_termios ) < 0 ) {
    740742          perror( "tcsetattr() failed" );
    741           exit( 1 );
     743          rtems_test_exit( 1 );
    742744        }
    743745        usage();
     
    765767
    766768      case '9':
    767         exit( 1 );
     769        rtems_test_exit( 1 );
    768770
    769771      case '\n':
Note: See TracChangeset for help on using the changeset viewer.