summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-02 00:55:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-02 00:55:27 +0000
commit016a926defe59ea4d0483da43b59b9f347e97e59 (patch)
tree4c97fe8c7ea90a76d4f294ebfa13bf8b2d741e12 /testsuites
parent0428ddf33ecf04619a8bc8839102d6553b662191 (diff)
downloadrtems-016a926defe59ea4d0483da43b59b9f347e97e59.tar.bz2
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. * cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c, rtmonuse/task1.c, termios/init.c: Modified.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/ChangeLog12
-rw-r--r--testsuites/libtests/cpuuse/task2.c2
-rw-r--r--testsuites/libtests/malloctest/task1.c4
-rw-r--r--testsuites/libtests/putenvtest/init.c2
-rw-r--r--testsuites/libtests/rtmonuse/task1.c6
-rw-r--r--testsuites/libtests/termios/init.c12
6 files changed, 26 insertions, 12 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog
index ab6951bab1..0da519f766 100644
--- a/testsuites/libtests/ChangeLog
+++ b/testsuites/libtests/ChangeLog
@@ -1,3 +1,15 @@
+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.
+ * cpuuse/task2.c, malloctest/task1.c, putenvtest/init.c,
+ rtmonuse/task1.c, termios/init.c: Modified.
+
2002-04-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Remove ENABLE_GCC28.
diff --git a/testsuites/libtests/cpuuse/task2.c b/testsuites/libtests/cpuuse/task2.c
index 8a9880d0ba..888ee8062e 100644
--- a/testsuites/libtests/cpuuse/task2.c
+++ b/testsuites/libtests/cpuuse/task2.c
@@ -43,5 +43,5 @@ rtems_task Task_2(
showTaskSwitches ();
CPU_usage_Dump();
puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/libtests/malloctest/task1.c b/testsuites/libtests/malloctest/task1.c
index 737a8dab59..0b21c6adec 100644
--- a/testsuites/libtests/malloctest/task1.c
+++ b/testsuites/libtests/malloctest/task1.c
@@ -39,7 +39,7 @@ rtems_task Task_1_through_5(
{
if ( passes++ > NUM_PASSES ) {
puts("*** END OF MALLOC TEST ***");
- exit(0);
+ rtems_test_exit(0);
}
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
@@ -63,7 +63,7 @@ rtems_task Task_1_through_5(
if ( mem_ptr[i] != (mem_amt & 0xff))
{
printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff);
- exit(1);
+ rtems_test_exit(1);
}
}
directive_failed( status, "rtems_task_wake_after" );
diff --git a/testsuites/libtests/putenvtest/init.c b/testsuites/libtests/putenvtest/init.c
index 53530db941..15061265c2 100644
--- a/testsuites/libtests/putenvtest/init.c
+++ b/testsuites/libtests/putenvtest/init.c
@@ -57,5 +57,5 @@ rtems_task Init(
printf ("getenv(\"FOO\") ==> \"%s\"\n", getenv ("FOO"));
puts( "*** END OF PUTENV/GETENV TEST ***" );
- exit(0);
+ rtems_test_exit(0);
}
diff --git a/testsuites/libtests/rtmonuse/task1.c b/testsuites/libtests/rtmonuse/task1.c
index 2d9a828f04..f1959bca70 100644
--- a/testsuites/libtests/rtmonuse/task1.c
+++ b/testsuites/libtests/rtmonuse/task1.c
@@ -50,7 +50,7 @@ rtems_task Task_1_through_5(
if ( rmid != test_rmid ) {
printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ argument ], FALSE );
@@ -102,7 +102,7 @@ rtems_task Task_1_through_5(
}
if ( failed == 5 )
- exit( 0 );
+ rtems_test_exit( 0 );
pass += 1;
@@ -114,7 +114,7 @@ rtems_task Task_1_through_5(
puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" );
CPU_usage_Dump();
Period_usage_Dump();
- exit( 0 );
+ rtems_test_exit( 0 );
}
}
diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c
index b4cd7df06d..aff6b08384 100644
--- a/testsuites/libtests/termios/init.c
+++ b/testsuites/libtests/termios/init.c
@@ -46,6 +46,8 @@ rtems_task Init (rtems_task_argument argument);
#include <errno.h>
#include <string.h>
+#include <tmacros.h>
+
#if !defined(fileno)
int fileno( FILE *stream); /* beyond ANSI */
#endif
@@ -589,7 +591,7 @@ void change_line_settings( struct termios *tp )
tp->c_cflag = CLOCAL | CREAD | parity | stop_bits | data_bits | baud_rate;
if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
perror( "change_line_settings(): tcsetattr() failed" );
- exit( 1 );
+ rtems_test_exit( 1 );
}
printf( "Line settings set.\n" );
}
@@ -606,7 +608,7 @@ void canonical_input( struct termios *tp )
tp->c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) {
perror( "canonical_input(): tcsetattr() failed" );
- exit( 1 );
+ rtems_test_exit( 1 );
}
while ( ( c = getchar () ) != '\n');
@@ -725,7 +727,7 @@ Init (rtems_task_argument ignored)
if( tcgetattr( fileno( stdin ), &orig_termios ) < 0 ) {
perror( "tcgetattr() failed" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
test_termios = orig_termios;
@@ -738,7 +740,7 @@ Init (rtems_task_argument ignored)
test_termios = orig_termios;
if( tcsetattr( fileno( stdin ), TCSADRAIN, &test_termios ) < 0 ) {
perror( "tcsetattr() failed" );
- exit( 1 );
+ rtems_test_exit( 1 );
}
usage();
break;
@@ -764,7 +766,7 @@ Init (rtems_task_argument ignored)
break;
case '9':
- exit( 1 );
+ rtems_test_exit( 1 );
case '\n':
break;