summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/ChangeLog22
-rw-r--r--testsuites/psxtests/include/pmacros.h10
-rw-r--r--testsuites/psxtests/psx01/task.c2
-rw-r--r--testsuites/psxtests/psx02/init.c2
-rw-r--r--testsuites/psxtests/psx02/task.c2
-rw-r--r--testsuites/psxtests/psx03/init.c2
-rw-r--r--testsuites/psxtests/psx04/init.c2
-rw-r--r--testsuites/psxtests/psx05/init.c2
-rw-r--r--testsuites/psxtests/psx06/init.c2
-rw-r--r--testsuites/psxtests/psx07/init.c2
-rw-r--r--testsuites/psxtests/psx08/task3.c2
-rw-r--r--testsuites/psxtests/psx09/init.c2
-rw-r--r--testsuites/psxtests/psx10/init.c2
-rw-r--r--testsuites/psxtests/psx11/init.c2
-rw-r--r--testsuites/psxtests/psx12/init.c2
-rw-r--r--testsuites/psxtests/psx13/Makefile.am2
-rw-r--r--testsuites/psxtests/psx13/main.c3
-rw-r--r--testsuites/psxtests/psx13/test.c4
-rw-r--r--testsuites/psxtests/psxcancel/init.c7
-rw-r--r--testsuites/psxtests/psxchroot01/Makefile.am2
-rw-r--r--testsuites/psxtests/psxchroot01/main.c3
-rw-r--r--testsuites/psxtests/psxchroot01/test.c3
-rw-r--r--testsuites/psxtests/psxfile01/Makefile.am2
-rw-r--r--testsuites/psxtests/psxfile01/main.c3
-rw-r--r--testsuites/psxtests/psxfile01/test.c2
-rw-r--r--testsuites/psxtests/psxfile01/test_cat.c4
-rw-r--r--testsuites/psxtests/psxfile01/test_extend.c8
-rw-r--r--testsuites/psxtests/psxfile01/test_write.c8
-rw-r--r--testsuites/psxtests/psxmount/Makefile.am2
-rw-r--r--testsuites/psxtests/psxmount/main.c3
-rw-r--r--testsuites/psxtests/psxmount/test.c3
-rw-r--r--testsuites/psxtests/psxmsgq01/init.c2
-rw-r--r--testsuites/psxtests/psxreaddir/Makefile.am2
-rw-r--r--testsuites/psxtests/psxreaddir/main.c3
-rw-r--r--testsuites/psxtests/psxreaddir/test.c3
-rw-r--r--testsuites/psxtests/psxsem01/init.c2
-rw-r--r--testsuites/psxtests/psxstat/Makefile.am2
-rw-r--r--testsuites/psxtests/psxstat/main.c3
-rw-r--r--testsuites/psxtests/psxstat/test.c3
-rw-r--r--testsuites/psxtests/psxtime/main.c3
-rw-r--r--testsuites/psxtests/psxtime/test.c2
-rw-r--r--testsuites/psxtests/psxtimer/psxtimer.c2
42 files changed, 100 insertions, 44 deletions
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 <joel@OARcorp.com>
+
+ * 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 <joel@OARcorp.com>
* 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 <time.h>
#include <unistd.h>
+#include <buffer_test_io.h>
+
/*
* 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 <bsp.h>
+#include <pmacros.h>
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 <stdio.h>
+#include <pmacros.h>
+
/*-------------------------------------------------------------------
* 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 <sched.h>
#include <bsp.h> /* for device driver prototypes */
+#include <pmacros.h>
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 <bsp.h>
+#include <pmacros.h>
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 <unistd.h>
#include <errno.h>
#include <rtems/libio.h>
+#include <pmacros.h>
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 <bsp.h>
+#include <pmacros.h>
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 <assert.h>
+#include <pmacros.h>
+
/*
* 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 <assert.h>
+#include <pmacros.h>
+
/*
* 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 <assert.h>
+#include <pmacros.h>
+
/*
* 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 <bsp.h>
+#include <pmacros.h>
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 <rtems.h>
#include <rtems/libio.h>
#include <imfs.h>
+#include <pmacros.h>
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 <bsp.h>
+#include <pmacros.h>
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 <pmacros.h>
#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 <bsp.h>
+#include <pmacros.h>
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 <rtems.h>
#include <rtems/libio.h>
#include <imfs.h>
+#include <pmacros.h>
#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 <bsp.h>
+#include <tmacros.h> /* 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);
}