From d8024895e30c6ad773bda91d5bc4038db675b033 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 2 Aug 2002 00:53:21 +0000 Subject: 2002-08-01 Joel Sherrill * 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. * include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c, psx05/init.c, psx06/init.c, psx07/init.c, psx08/task3.c, psx09/init.c, psx10/init.c, psx11/init.c, psx12/init.c, psx13/Makefile.am, psx13/main.c, psx13/test.c, psxcancel/init.c, psxchroot01/Makefile.am, psxchroot01/main.c, psxchroot01/test.c, psxfile01/Makefile.am, psxfile01/main.c, psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c, psxfile01/test_write.c, psxmount/Makefile.am, psxmount/main.c, psxmount/test.c, psxmsgq01/init.c, psxreaddir/Makefile.am, psxreaddir/main.c, psxreaddir/test.c, psxsem01/init.c, psxstat/Makefile.am, psxstat/main.c, psxstat/test.c, psxtime/main.c, psxtime/test.c, psxtimer/psxtimer.c: Modified. --- testsuites/psxtests/ChangeLog | 22 ++++++++++++++++++++++ testsuites/psxtests/include/pmacros.h | 10 ++++++---- testsuites/psxtests/psx01/task.c | 2 +- testsuites/psxtests/psx02/init.c | 2 +- testsuites/psxtests/psx02/task.c | 2 +- testsuites/psxtests/psx03/init.c | 2 +- testsuites/psxtests/psx04/init.c | 2 +- testsuites/psxtests/psx05/init.c | 2 +- testsuites/psxtests/psx06/init.c | 2 +- testsuites/psxtests/psx07/init.c | 2 +- testsuites/psxtests/psx08/task3.c | 2 +- testsuites/psxtests/psx09/init.c | 2 +- testsuites/psxtests/psx10/init.c | 2 +- testsuites/psxtests/psx11/init.c | 2 +- testsuites/psxtests/psx12/init.c | 2 +- testsuites/psxtests/psx13/Makefile.am | 2 ++ testsuites/psxtests/psx13/main.c | 3 ++- testsuites/psxtests/psx13/test.c | 4 +++- testsuites/psxtests/psxcancel/init.c | 7 ++++--- testsuites/psxtests/psxchroot01/Makefile.am | 2 ++ testsuites/psxtests/psxchroot01/main.c | 3 ++- testsuites/psxtests/psxchroot01/test.c | 3 ++- testsuites/psxtests/psxfile01/Makefile.am | 2 ++ testsuites/psxtests/psxfile01/main.c | 3 ++- testsuites/psxtests/psxfile01/test.c | 2 +- testsuites/psxtests/psxfile01/test_cat.c | 4 +++- testsuites/psxtests/psxfile01/test_extend.c | 8 +++++--- testsuites/psxtests/psxfile01/test_write.c | 8 +++++--- testsuites/psxtests/psxmount/Makefile.am | 2 ++ testsuites/psxtests/psxmount/main.c | 3 ++- testsuites/psxtests/psxmount/test.c | 3 ++- testsuites/psxtests/psxmsgq01/init.c | 2 +- testsuites/psxtests/psxreaddir/Makefile.am | 2 ++ testsuites/psxtests/psxreaddir/main.c | 3 ++- testsuites/psxtests/psxreaddir/test.c | 3 ++- testsuites/psxtests/psxsem01/init.c | 2 +- testsuites/psxtests/psxstat/Makefile.am | 2 ++ testsuites/psxtests/psxstat/main.c | 3 ++- testsuites/psxtests/psxstat/test.c | 3 ++- testsuites/psxtests/psxtime/main.c | 3 ++- testsuites/psxtests/psxtime/test.c | 2 +- testsuites/psxtests/psxtimer/psxtimer.c | 2 +- 42 files changed, 100 insertions(+), 44 deletions(-) (limited to 'testsuites') diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 22d93e57ec..bc18cb5c01 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,25 @@ +2002-08-01 Joel Sherrill + + * 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. + * include/pmacros.h, psx01/task.c, psx02/init.c, psx02/task.c, + psx03/init.c, psx04/init.c, psx05/init.c, psx06/init.c, psx07/init.c, + psx08/task3.c, psx09/init.c, psx10/init.c, psx11/init.c, + psx12/init.c, psx13/Makefile.am, psx13/main.c, psx13/test.c, + psxcancel/init.c, psxchroot01/Makefile.am, psxchroot01/main.c, + psxchroot01/test.c, psxfile01/Makefile.am, psxfile01/main.c, + psxfile01/test.c, psxfile01/test_cat.c, psxfile01/test_extend.c, + psxfile01/test_write.c, psxmount/Makefile.am, psxmount/main.c, + psxmount/test.c, psxmsgq01/init.c, psxreaddir/Makefile.am, + psxreaddir/main.c, psxreaddir/test.c, psxsem01/init.c, + psxstat/Makefile.am, psxstat/main.c, psxstat/test.c, psxtime/main.c, + psxtime/test.c, psxtimer/psxtimer.c: Modified. + 2002-07-05 Joel Sherrill * psxcancel/Makefile.am, psxcancel/init.c, psxcancel/psxcancel.scn: diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h index 38d0ee1904..0338038d51 100644 --- a/testsuites/psxtests/include/pmacros.h +++ b/testsuites/psxtests/include/pmacros.h @@ -13,6 +13,8 @@ #include #include +#include + /* * These help manipulate the "struct tm" form of time */ @@ -67,16 +69,16 @@ #define print_current_time(s1, s2) \ do { \ - char _buffer[32]; \ + char _time_buffer[32]; \ int _status; \ struct timespec _tv; \ \ _status = clock_gettime( CLOCK_REALTIME, &_tv ); \ assert( !_status ); \ \ - (void) ctime_r( &_tv.tv_sec, _buffer ); \ - _buffer[ strlen( _buffer ) - 1 ] = 0; \ - printf( "%s%s%s\n", s1, _buffer, s2 ); \ + (void) ctime_r( &_tv.tv_sec, _time_buffer ); \ + _time_buffer[ strlen( _time_buffer ) - 1 ] = 0; \ + printf( "%s%s%s\n", s1, _time_buffer, s2 ); \ fflush(stdout); \ } while ( 0 ) diff --git a/testsuites/psxtests/psx01/task.c b/testsuites/psxtests/psx01/task.c index 612d69d2e3..affafd2dca 100644 --- a/testsuites/psxtests/psx01/task.c +++ b/testsuites/psxtests/psx01/task.c @@ -87,7 +87,7 @@ void *Task_1_through_3( assert( !status ); puts( "*** END OF POSIX TEST 1 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx02/init.c b/testsuites/psxtests/psx02/init.c index 55e360b6f9..48060fd7ae 100644 --- a/testsuites/psxtests/psx02/init.c +++ b/testsuites/psxtests/psx02/init.c @@ -139,7 +139,7 @@ void *POSIX_Init( /* exit this thread */ puts( "*** END OF POSIX TEST 2 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx02/task.c b/testsuites/psxtests/psx02/task.c index 0f2730983b..8d0a711c21 100644 --- a/testsuites/psxtests/psx02/task.c +++ b/testsuites/psxtests/psx02/task.c @@ -38,7 +38,7 @@ void *Task_1_through_3( assert( !seconds ); } puts( "*** END OF POSIX TEST 2 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx03/init.c b/testsuites/psxtests/psx03/init.c index 4547ac7221..7ea046b94a 100644 --- a/testsuites/psxtests/psx03/init.c +++ b/testsuites/psxtests/psx03/init.c @@ -197,7 +197,7 @@ void *POSIX_Init( /* exit this thread */ puts( "*** END OF POSIX TEST 3 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c index 11b6828581..b6b160ef21 100644 --- a/testsuites/psxtests/psx04/init.c +++ b/testsuites/psxtests/psx04/init.c @@ -551,7 +551,7 @@ void *POSIX_Init( /* exit this thread */ puts( "*** END OF POSIX TEST 4 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 30998fbc95..836aa927bc 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -577,7 +577,7 @@ void *POSIX_Init( assert( status == EINVAL ); puts( "*** END OF POSIX TEST 5 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx06/init.c b/testsuites/psxtests/psx06/init.c index 0ccceeca12..f1a4ec6906 100644 --- a/testsuites/psxtests/psx06/init.c +++ b/testsuites/psxtests/psx06/init.c @@ -114,7 +114,7 @@ void *POSIX_Init( printf( "Destructor invoked %d times\n", Destructor_invoked ); puts( "*** END OF POSIX TEST 6 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c index 0226f6df48..aa506f8a71 100644 --- a/testsuites/psxtests/psx07/init.c +++ b/testsuites/psxtests/psx07/init.c @@ -487,7 +487,7 @@ void *POSIX_Init( assert( status == EINVAL ); puts( "*** END OF POSIX TEST 7 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx08/task3.c b/testsuites/psxtests/psx08/task3.c index 6b0de52f59..cb80de9c09 100644 --- a/testsuites/psxtests/psx08/task3.c +++ b/testsuites/psxtests/psx08/task3.c @@ -45,7 +45,7 @@ void *Task_3( ); puts( "*** END OF POSIX TEST 8 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx09/init.c b/testsuites/psxtests/psx09/init.c index 2c5729752a..b1a79ef832 100644 --- a/testsuites/psxtests/psx09/init.c +++ b/testsuites/psxtests/psx09/init.c @@ -219,7 +219,7 @@ void *POSIX_Init( print_current_time( "Init: ", buffer ); puts( "*** END OF POSIX TEST 9 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c index b08fafc937..37c6912dbb 100644 --- a/testsuites/psxtests/psx10/init.c +++ b/testsuites/psxtests/psx10/init.c @@ -305,7 +305,7 @@ void *POSIX_Init( sleep( 1 ); puts( "*** END OF POSIX TEST 10 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx11/init.c b/testsuites/psxtests/psx11/init.c index 5122d5a13f..aedb0429d2 100644 --- a/testsuites/psxtests/psx11/init.c +++ b/testsuites/psxtests/psx11/init.c @@ -101,7 +101,7 @@ void *POSIX_Init( assert( !status ); puts( "*** END OF POSIX TEST 11 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c index e14ff91d73..656bf11641 100644 --- a/testsuites/psxtests/psx12/init.c +++ b/testsuites/psxtests/psx12/init.c @@ -133,7 +133,7 @@ void *POSIX_Init( /* switch to Task_1 */ puts( "*** END OF POSIX TEST 12 ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psx13/Makefile.am b/testsuites/psxtests/psx13/Makefile.am index 09d66c1fca..c47d87f500 100644 --- a/testsuites/psxtests/psx13/Makefile.am +++ b/testsuites/psxtests/psx13/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psx13/main.c b/testsuites/psxtests/psx13/main.c index 36175c90a5..6590cc2f24 100644 --- a/testsuites/psxtests/psx13/main.c +++ b/testsuites/psxtests/psx13/main.c @@ -14,6 +14,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -22,7 +23,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c index 6e4de0de8c..e871b11689 100644 --- a/testsuites/psxtests/psx13/test.c +++ b/testsuites/psxtests/psx13/test.c @@ -34,6 +34,8 @@ #include +#include + /*------------------------------------------------------------------- * InitFiles function * @@ -669,7 +671,7 @@ int main( printf ("\n\nError opening files for write!!!!\n"); printf( "\n\n*** END OF TEST PSX13 ***" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxcancel/init.c b/testsuites/psxtests/psxcancel/init.c index ada11bdd8d..cbd69925b4 100644 --- a/testsuites/psxtests/psxcancel/init.c +++ b/testsuites/psxtests/psxcancel/init.c @@ -29,6 +29,7 @@ #include #include /* for device driver prototypes */ +#include rtems_task Init( rtems_task_argument argument); @@ -92,7 +93,7 @@ int main(){ task_ret = pthread_create(&count, NULL, (void *) countTaskDeferred, (void *) &taskparameter); if (task_ret) { perror("pthread_create: countTask"); - exit(EXIT_FAILURE); + rtems_test_exit(EXIT_FAILURE); } /* sleep for 5 seconds, then cancel it */ sleep(5); @@ -106,7 +107,7 @@ int main(){ task_ret = pthread_create(&count, NULL, (void *) countTaskAsync, (void *) &taskparameter); if (task_ret) { perror("pthread_create: countTask"); - exit(EXIT_FAILURE); + rtems_test_exit(EXIT_FAILURE); } /* sleep for 5 seconds, then cancel it */ sleep(5); @@ -120,7 +121,7 @@ int main(){ #ifdef __linux__ return 0; #else - exit(EXIT_SUCCESS); + rtems_test_exit(EXIT_SUCCESS); #endif } diff --git a/testsuites/psxtests/psxchroot01/Makefile.am b/testsuites/psxtests/psxchroot01/Makefile.am index f07e645dfd..90c70823bb 100644 --- a/testsuites/psxtests/psxchroot01/Makefile.am +++ b/testsuites/psxtests/psxchroot01/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psxchroot01/main.c b/testsuites/psxtests/psxchroot01/main.c index c19138573a..4ce4bae422 100644 --- a/testsuites/psxtests/psxchroot01/main.c +++ b/testsuites/psxtests/psxchroot01/main.c @@ -5,6 +5,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -13,7 +14,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxchroot01/test.c b/testsuites/psxtests/psxchroot01/test.c index da93a96f05..6f7ebb8e89 100644 --- a/testsuites/psxtests/psxchroot01/test.c +++ b/testsuites/psxtests/psxchroot01/test.c @@ -28,6 +28,7 @@ #include #include #include +#include void touch( char *file ) { @@ -117,6 +118,6 @@ int main( printf( "%s on /two/two.test\n", (!status) ? "SUCCESS" : "FAILURE" ); printf( "*** END OF CHROOT01 TEST ***\n" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxfile01/Makefile.am b/testsuites/psxtests/psxfile01/Makefile.am index b3327d2bde..6c17d6f002 100644 --- a/testsuites/psxtests/psxfile01/Makefile.am +++ b/testsuites/psxtests/psxfile01/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psxfile01/main.c b/testsuites/psxtests/psxfile01/main.c index 36175c90a5..6590cc2f24 100644 --- a/testsuites/psxtests/psxfile01/main.c +++ b/testsuites/psxtests/psxfile01/main.c @@ -14,6 +14,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -22,7 +23,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c index 4f42e32a38..eb23ff5667 100644 --- a/testsuites/psxtests/psxfile01/test.c +++ b/testsuites/psxtests/psxfile01/test.c @@ -503,7 +503,7 @@ int main( test_case_reopen_append(); printf( "*** END OF FILE TEST 1 ***\n" ); - exit( 0 ); + rtems_test_exit( 0 ); } /* diff --git a/testsuites/psxtests/psxfile01/test_cat.c b/testsuites/psxtests/psxfile01/test_cat.c index f6daecfad7..ea1e63ef7e 100644 --- a/testsuites/psxtests/psxfile01/test_cat.c +++ b/testsuites/psxtests/psxfile01/test_cat.c @@ -17,6 +17,8 @@ #include +#include + /* * test_cat routine */ @@ -44,7 +46,7 @@ void test_cat( fd = open( file, O_RDONLY ); if ( fd == -1 ) { printf( "test_cat: open( %s ) failed : %s\n", file, strerror( errno ) ); - exit( 0 ); + rtems_test_exit( 0 ); } for ( ;; ) { diff --git a/testsuites/psxtests/psxfile01/test_extend.c b/testsuites/psxtests/psxfile01/test_extend.c index ae284aab46..3ab66c1410 100644 --- a/testsuites/psxtests/psxfile01/test_extend.c +++ b/testsuites/psxtests/psxfile01/test_extend.c @@ -21,6 +21,8 @@ #include +#include + /* * test_extend routine */ @@ -37,7 +39,7 @@ void test_extend( fd = open( file, O_WRONLY ); if ( fd == -1 ) { printf( "test_extend: open( %s ) failed : %s\n", file, strerror( errno ) ); - exit( 0 ); + rtems_test_exit( 0 ); } status = lseek( fd, offset - 1, SEEK_SET ); @@ -46,13 +48,13 @@ void test_extend( status = write( fd, &c, 1 ); if ( status == -1 ) { printf( "test_extend: write( %s ) failed : %s\n", file, strerror( errno ) ); - exit( 0 ); + rtems_test_exit( 0 ); } if ( status != 1 ) { printf( "test_extend: write( %s ) only wrote %d of %d bytes\n", file, status, 1 ); - exit( 0 ); + rtems_test_exit( 0 ); } status = close( fd ); diff --git a/testsuites/psxtests/psxfile01/test_write.c b/testsuites/psxtests/psxfile01/test_write.c index c025734532..b87ba06624 100644 --- a/testsuites/psxtests/psxfile01/test_write.c +++ b/testsuites/psxtests/psxfile01/test_write.c @@ -16,6 +16,8 @@ #include +#include + /* * test_write routine */ @@ -36,7 +38,7 @@ void test_write( fd = open( file, O_WRONLY ); if ( fd == -1 ) { printf( "test_write: open( %s ) failed : %s\n", file, strerror( errno ) ); - exit( 0 ); + rtems_test_exit( 0 ); } status = lseek( fd, offset, SEEK_SET ); @@ -45,13 +47,13 @@ void test_write( status = write( fd, buffer, length ); if ( status == -1 ) { printf( "test_write: write( %s ) failed : %s\n", file, strerror( errno ) ); - exit( 0 ); + rtems_test_exit( 0 ); } if ( status != length ) { printf( "test_write: write( %s ) only wrote %d of %d bytes\n", file, status, length ); - exit( 0 ); + rtems_test_exit( 0 ); } status = close( fd ); diff --git a/testsuites/psxtests/psxmount/Makefile.am b/testsuites/psxtests/psxmount/Makefile.am index 7f754da195..10b5f3a7be 100644 --- a/testsuites/psxtests/psxmount/Makefile.am +++ b/testsuites/psxtests/psxmount/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psxmount/main.c b/testsuites/psxtests/psxmount/main.c index d448d5fa3c..8bf5f72b7f 100644 --- a/testsuites/psxtests/psxmount/main.c +++ b/testsuites/psxtests/psxmount/main.c @@ -7,6 +7,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -15,7 +16,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxmount/test.c b/testsuites/psxtests/psxmount/test.c index fb420391e0..bf4a704c26 100644 --- a/testsuites/psxtests/psxmount/test.c +++ b/testsuites/psxtests/psxmount/test.c @@ -31,6 +31,7 @@ #include #include #include +#include extern rtems_filesystem_location_info_t rtems_filesystem_current; @@ -441,6 +442,6 @@ int main( assert( status == 0 ); printf( "\n\n*** END OF MOUNT/UNMOUNT TEST ***\n" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c index fcb52dee1b..56587254b4 100644 --- a/testsuites/psxtests/psxmsgq01/init.c +++ b/testsuites/psxtests/psxmsgq01/init.c @@ -1157,7 +1157,7 @@ void *POSIX_Init( verify_with_threads(); puts( "*** END OF POSIX MESSAGE QUEUE TEST ***" ); - exit( 0 ); + rtems_test_exit( 0 ); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psxreaddir/Makefile.am b/testsuites/psxtests/psxreaddir/Makefile.am index 6cdc9026bf..2019e2d790 100644 --- a/testsuites/psxtests/psxreaddir/Makefile.am +++ b/testsuites/psxtests/psxreaddir/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psxreaddir/main.c b/testsuites/psxtests/psxreaddir/main.c index c19138573a..4ce4bae422 100644 --- a/testsuites/psxtests/psxreaddir/main.c +++ b/testsuites/psxtests/psxreaddir/main.c @@ -5,6 +5,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -13,7 +14,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c index 0bdc186e5f..f8615dc578 100644 --- a/testsuites/psxtests/psxreaddir/test.c +++ b/testsuites/psxtests/psxreaddir/test.c @@ -48,6 +48,7 @@ int scandir ( const char *dirname, #if defined(__rtems__) #define d_type d_reclen +#include #endif void printdir( DIR *directory ) @@ -495,6 +496,6 @@ int main( test_across_mount(); printf( "\n\n*** END OF READDIR TEST ***\n" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c index b39e2e0ada..4985c3a148 100644 --- a/testsuites/psxtests/psxsem01/init.c +++ b/testsuites/psxtests/psxsem01/init.c @@ -239,7 +239,7 @@ void *POSIX_Init( /* Try adding in unlinking before closing... (can we still open?) */ puts( "*** POSIX SEMAPHORE MANAGER TEST 1 COMPLETED ***" ); - exit(0); + rtems_test_exit(0); return NULL; /* just so the compiler thinks we returned something */ } diff --git a/testsuites/psxtests/psxstat/Makefile.am b/testsuites/psxtests/psxstat/Makefile.am index de4e33dfa0..a33da8cd08 100644 --- a/testsuites/psxtests/psxstat/Makefile.am +++ b/testsuites/psxtests/psxstat/Makefile.am @@ -29,6 +29,8 @@ include $(top_srcdir)/psxtests.am # (OPTIONAL) Add local stuff here using += # +AM_CPPFLAGS += -I$(top_srcdir)/include + ${PGM}: $(OBJS) $(LINK_FILES) $(make-exe) diff --git a/testsuites/psxtests/psxstat/main.c b/testsuites/psxtests/psxstat/main.c index f358a6ddb6..4a67c31542 100644 --- a/testsuites/psxtests/psxstat/main.c +++ b/testsuites/psxtests/psxstat/main.c @@ -14,6 +14,7 @@ #define TEST_INIT #include +#include void test_main( void ); @@ -22,7 +23,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c index 04517de986..8852674181 100644 --- a/testsuites/psxtests/psxstat/test.c +++ b/testsuites/psxtests/psxstat/test.c @@ -24,6 +24,7 @@ #include #include #include +#include #define MAXSYMLINK 5 /* There needs to be a better way of getting this. */ #define TIMEOUT_VALUE ( 5 * TICKS_PER_SECOND ) @@ -845,7 +846,7 @@ int main( chown_multiple_files( Links_to_Dirs ); puts( "\n\n*** END OF STAT TEST 01 ***" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxtime/main.c b/testsuites/psxtests/psxtime/main.c index 7643c1fbd4..38e6d1a951 100644 --- a/testsuites/psxtests/psxtime/main.c +++ b/testsuites/psxtests/psxtime/main.c @@ -14,6 +14,7 @@ #define TEST_INIT #include +#include /* instantiate buffering code if needed */ void test_main( void ); @@ -22,7 +23,7 @@ rtems_task Init( ) { test_main(); - exit( 0 ); + rtems_test_exit( 0 ); } /* configuration information */ diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c index e21eb2da9e..0c1cd88d33 100644 --- a/testsuites/psxtests/psxtime/test.c +++ b/testsuites/psxtests/psxtime/test.c @@ -110,6 +110,6 @@ int main( } puts( "\n\n*** END OF TIME OF DAY TEST 01 ***" ); - exit(0); + rtems_test_exit(0); } diff --git a/testsuites/psxtests/psxtimer/psxtimer.c b/testsuites/psxtests/psxtimer/psxtimer.c index 844ede1caa..3d6bb3eb36 100644 --- a/testsuites/psxtests/psxtimer/psxtimer.c +++ b/testsuites/psxtests/psxtimer/psxtimer.c @@ -332,6 +332,6 @@ void *POSIX_Init ( /* execute 20 seconds and finish */ sleep (20); puts( "\n\n*** End of POSIX Timers Test ***" ); - exit (0); + rtems_test_exit (0); } -- cgit v1.2.3