summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-02 00:52:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-02 00:52:14 +0000
commit3aa4c2e0cec61dc0673d3b0ef40a124f64d917e0 (patch)
treeb5bd37bb4e83f9beded8b15a6cdac822702bd2fa /testsuites
parentcd9396e7d084473bee312f6e1cda13174247e0cc (diff)
downloadrtems-3aa4c2e0cec61dc0673d3b0ef40a124f64d917e0.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. * 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.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/ChangeLog17
-rw-r--r--testsuites/sptests/sp01/task1.c2
-rw-r--r--testsuites/sptests/sp02/task1.c2
-rw-r--r--testsuites/sptests/sp03/task2.c2
-rw-r--r--testsuites/sptests/sp04/task1.c2
-rw-r--r--testsuites/sptests/sp05/task1.c2
-rw-r--r--testsuites/sptests/sp06/task1.c2
-rw-r--r--testsuites/sptests/sp07/taskexit.c2
-rw-r--r--testsuites/sptests/sp08/task1.c2
-rw-r--r--testsuites/sptests/sp09/task1.c2
-rw-r--r--testsuites/sptests/sp11/task1.c2
-rw-r--r--testsuites/sptests/sp12/pritask.c2
-rw-r--r--testsuites/sptests/sp12/task5.c2
-rw-r--r--testsuites/sptests/sp13/task1.c8
-rw-r--r--testsuites/sptests/sp14/task2.c2
-rw-r--r--testsuites/sptests/sp15/task1.c2
-rw-r--r--testsuites/sptests/sp16/task1.c2
-rw-r--r--testsuites/sptests/sp17/task1.c2
-rw-r--r--testsuites/sptests/sp19/fptask.c2
-rw-r--r--testsuites/sptests/sp20/task1.c6
-rw-r--r--testsuites/sptests/sp21/task1.c2
-rw-r--r--testsuites/sptests/sp22/task1.c2
-rw-r--r--testsuites/sptests/sp23/task1.c2
-rw-r--r--testsuites/sptests/sp24/task1.c2
-rw-r--r--testsuites/sptests/sp25/task1.c2
-rw-r--r--testsuites/sptests/sp26/init.c2
-rw-r--r--testsuites/sptests/sp26/task1.c4
-rw-r--r--testsuites/sptests/sp30/task1.c2
-rw-r--r--testsuites/sptests/sp31/task1.c4
-rw-r--r--testsuites/sptests/spsize/init.c4
-rw-r--r--testsuites/sptests/spsize/size.c8
31 files changed, 57 insertions, 42 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index 200eb7868f..9bb19e7c14 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,20 @@
+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.
+ * 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.
+
2002-07-30 Joel Sherrill <joel@OARcorp.com>
* spsize/size.c: Don't reference the RTEMS allocated interrupt
diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c
index 34f24e2a14..4429127d91 100644
--- a/testsuites/sptests/sp01/task1.c
+++ b/testsuites/sptests/sp01/task1.c
@@ -37,7 +37,7 @@ rtems_task Task_1_through_3(
if ( time.second >= 35 ) {
puts( "*** END OF TEST 1 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ task_number( tid ) ], FALSE );
diff --git a/testsuites/sptests/sp02/task1.c b/testsuites/sptests/sp02/task1.c
index ed0d77c2e9..de46289106 100644
--- a/testsuites/sptests/sp02/task1.c
+++ b/testsuites/sptests/sp02/task1.c
@@ -61,5 +61,5 @@ rtems_task Task_1(
directive_failed( status, "rtems_task_wake_after" );
puts( "*** END OF TEST 2 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp03/task2.c b/testsuites/sptests/sp03/task2.c
index 56d7da821e..37b8354d5a 100644
--- a/testsuites/sptests/sp03/task2.c
+++ b/testsuites/sptests/sp03/task2.c
@@ -36,7 +36,7 @@ rtems_task Task_2(
if ( time.second >= 17 ) {
puts( "*** END OF TEST 3 *** " );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ 2 ], FALSE );
diff --git a/testsuites/sptests/sp04/task1.c b/testsuites/sptests/sp04/task1.c
index a2fb9bf75d..da54ffe227 100644
--- a/testsuites/sptests/sp04/task1.c
+++ b/testsuites/sptests/sp04/task1.c
@@ -111,7 +111,7 @@ rtems_task Task_1(
while ( !testsFinished );
showTaskSwitches ();
puts( "*** END OF TEST 4 ***" );
- exit (0);
+ rtems_test_exit (0);
}
}
}
diff --git a/testsuites/sptests/sp05/task1.c b/testsuites/sptests/sp05/task1.c
index 3a510cab97..60c562fd25 100644
--- a/testsuites/sptests/sp05/task1.c
+++ b/testsuites/sptests/sp05/task1.c
@@ -73,5 +73,5 @@ rtems_task Task_1(
}
puts( "*** END OF TEST 5 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp06/task1.c b/testsuites/sptests/sp06/task1.c
index 18bcae73bb..14ad40d86d 100644
--- a/testsuites/sptests/sp06/task1.c
+++ b/testsuites/sptests/sp06/task1.c
@@ -32,7 +32,7 @@ rtems_unsigned32 argument;
if ( pass == 5 ) {
puts( "*** END OF TEST 6 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
if ( pass == 1 ) {
diff --git a/testsuites/sptests/sp07/taskexit.c b/testsuites/sptests/sp07/taskexit.c
index 1452af73df..e6a6ad0c00 100644
--- a/testsuites/sptests/sp07/taskexit.c
+++ b/testsuites/sptests/sp07/taskexit.c
@@ -28,5 +28,5 @@ rtems_extension Task_exit_extension(
}
puts("*** END OF TEST 7 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp08/task1.c b/testsuites/sptests/sp08/task1.c
index 43c5f45264..3729568647 100644
--- a/testsuites/sptests/sp08/task1.c
+++ b/testsuites/sptests/sp08/task1.c
@@ -251,5 +251,5 @@ rtems_task Task_1(
/* END OF CURRENT MODE */
puts( "*** END OF TEST 8 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp09/task1.c b/testsuites/sptests/sp09/task1.c
index 7a4e107b73..84247e2711 100644
--- a/testsuites/sptests/sp09/task1.c
+++ b/testsuites/sptests/sp09/task1.c
@@ -65,5 +65,5 @@ rtems_task Task_1(
Screen14();
puts( "*** END OF TEST 9 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp11/task1.c b/testsuites/sptests/sp11/task1.c
index 77e94e3db6..8ccd73607a 100644
--- a/testsuites/sptests/sp11/task1.c
+++ b/testsuites/sptests/sp11/task1.c
@@ -405,5 +405,5 @@ rtems_test_pause();
directive_failed( status, "rtems_timer_fire_after 200 ticks" );
puts( "*** END OF TEST 11 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c
index 4ccf31f786..fb28405c44 100644
--- a/testsuites/sptests/sp12/pritask.c
+++ b/testsuites/sptests/sp12/pritask.c
@@ -48,7 +48,7 @@ rtems_task Priority_task(
if ( its_priority < 64 ) {
printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority );
- exit( 0 );
+ rtems_test_exit( 0 );
}
if ( its_index == 5 )
diff --git a/testsuites/sptests/sp12/task5.c b/testsuites/sptests/sp12/task5.c
index 06ccb3f25b..167c69228f 100644
--- a/testsuites/sptests/sp12/task5.c
+++ b/testsuites/sptests/sp12/task5.c
@@ -50,5 +50,5 @@ rtems_task Task5(
puts( "TA5 - SM1 deleted by TA1" );
puts( "*** END OF TEST 12 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index 015259b0f0..4f5e6844ae 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -335,13 +335,13 @@ rtems_test_pause();
if (size != queue_size)
{
puts("TA1 - exact size size match failed");
- exit(1);
+ rtems_test_exit(1);
}
if (memcmp(big_send_buffer, big_receive_buffer, size) != 0)
{
puts("TA1 - exact size data match failed");
- exit(1);
+ rtems_test_exit(1);
}
for (cp = (big_receive_buffer + size);
@@ -350,7 +350,7 @@ rtems_test_pause();
if (*cp != 'Z')
{
puts("TA1 - exact size overrun match failed");
- exit(1);
+ rtems_test_exit(1);
}
/* all done with this one; delete it */
@@ -359,5 +359,5 @@ rtems_test_pause();
}
puts( "*** END OF TEST 13 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp14/task2.c b/testsuites/sptests/sp14/task2.c
index 4abf718dd6..248d29840b 100644
--- a/testsuites/sptests/sp14/task2.c
+++ b/testsuites/sptests/sp14/task2.c
@@ -43,5 +43,5 @@ rtems_task Task_2(
directive_failed( status, "rtems_task_wake_after" );
puts( "*** END OF TEST 14 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp15/task1.c b/testsuites/sptests/sp15/task1.c
index 5d8a1b82dc..e3644c6427 100644
--- a/testsuites/sptests/sp15/task1.c
+++ b/testsuites/sptests/sp15/task1.c
@@ -124,5 +124,5 @@ rtems_task Task_1(
directive_failed( status, "rtems_partition_delete" );
puts( "*** END OF TEST 15 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp16/task1.c b/testsuites/sptests/sp16/task1.c
index 3891610f38..480c47fee7 100644
--- a/testsuites/sptests/sp16/task1.c
+++ b/testsuites/sptests/sp16/task1.c
@@ -277,5 +277,5 @@ rtems_test_pause();
directive_failed( status, "rtems_region_delete" );
puts( "*** END OF TEST 16 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp17/task1.c b/testsuites/sptests/sp17/task1.c
index dfcb5f0779..8ef50d8324 100644
--- a/testsuites/sptests/sp17/task1.c
+++ b/testsuites/sptests/sp17/task1.c
@@ -43,5 +43,5 @@ rtems_task Task_1(
puts("TA1 - Got Back!!!");
puts( "*** END OF TEST 17 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp19/fptask.c b/testsuites/sptests/sp19/fptask.c
index d8a7a0f22d..d82f8e6724 100644
--- a/testsuites/sptests/sp19/fptask.c
+++ b/testsuites/sptests/sp19/fptask.c
@@ -71,7 +71,7 @@ rtems_task FP_task(
directive_failed( status, "rtems_task_delete of TA3" );
puts( "*** END OF TEST 19 *** " );
- exit( 0 );
+ rtems_test_exit( 0 );
}
if (previous_seconds != time.second)
diff --git a/testsuites/sptests/sp20/task1.c b/testsuites/sptests/sp20/task1.c
index 4c4eeb142f..754686353d 100644
--- a/testsuites/sptests/sp20/task1.c
+++ b/testsuites/sptests/sp20/task1.c
@@ -53,7 +53,7 @@ rtems_task Task_1_through_6(
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_6(
}
if ( failed == 5 )
- exit( 0 );
+ rtems_test_exit( 0 );
pass += 1;
@@ -112,7 +112,7 @@ rtems_task Task_1_through_6(
if ( pass == 10 ) {
puts( "*** END OF TEST 20 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
}
diff --git a/testsuites/sptests/sp21/task1.c b/testsuites/sptests/sp21/task1.c
index c17da6f03f..b5e40e0e89 100644
--- a/testsuites/sptests/sp21/task1.c
+++ b/testsuites/sptests/sp21/task1.c
@@ -101,5 +101,5 @@ rtems_task Task_1(
puts( "TA1 - rtems_io_open - RTEMS_INVALID_NUMBER" );
puts( "*** END OF TEST 21 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp22/task1.c b/testsuites/sptests/sp22/task1.c
index a0ad5da955..1088487187 100644
--- a/testsuites/sptests/sp22/task1.c
+++ b/testsuites/sptests/sp22/task1.c
@@ -159,5 +159,5 @@ rtems_task Task_1(
directive_failed( status, "rtems_timer_delete" );
puts( "*** END OF TEST 22 *** " );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp23/task1.c b/testsuites/sptests/sp23/task1.c
index ea1f8deab7..a71856ce88 100644
--- a/testsuites/sptests/sp23/task1.c
+++ b/testsuites/sptests/sp23/task1.c
@@ -91,5 +91,5 @@ rtems_task Task_1(
puts( "TA1 - rtems_port_delete - DP1" );
puts( "*** END OF TEST 23 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp24/task1.c b/testsuites/sptests/sp24/task1.c
index 9bad11d046..b093244f8b 100644
--- a/testsuites/sptests/sp24/task1.c
+++ b/testsuites/sptests/sp24/task1.c
@@ -45,7 +45,7 @@ rtems_task Task_1_through_3(
if ( time.second >= 35 ) {
puts( "*** END OF TEST 24 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ task_number( tid ) ], FALSE );
diff --git a/testsuites/sptests/sp25/task1.c b/testsuites/sptests/sp25/task1.c
index df9207429d..d2379b14f7 100644
--- a/testsuites/sptests/sp25/task1.c
+++ b/testsuites/sptests/sp25/task1.c
@@ -236,5 +236,5 @@ rtems_test_pause();
rtems_region_delete(Region_id[ 1 ]);
puts( "*** END OF TEST 25 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp26/init.c b/testsuites/sptests/sp26/init.c
index 7682ad0011..0ccec87487 100644
--- a/testsuites/sptests/sp26/init.c
+++ b/testsuites/sptests/sp26/init.c
@@ -34,5 +34,5 @@ rtems_task Init(
task1();
/* does not return */
puts( "Init - task1 should not have returned" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/sp26/task1.c b/testsuites/sptests/sp26/task1.c
index f29adb2701..39541136e6 100644
--- a/testsuites/sptests/sp26/task1.c
+++ b/testsuites/sptests/sp26/task1.c
@@ -17,6 +17,8 @@ static rtems_id taskId1;
static rtems_id taskId2;
rtems_interval ticksPerSecond;
+#include "system.h"
+
static int
isSuspended (rtems_id tid)
{
@@ -74,7 +76,7 @@ subTask2 (rtems_task_argument arg)
isSuspended (taskId1));
puts( "*** END OF TEST 26 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
static void
diff --git a/testsuites/sptests/sp30/task1.c b/testsuites/sptests/sp30/task1.c
index b955d88b5f..38e6ad9ab2 100644
--- a/testsuites/sptests/sp30/task1.c
+++ b/testsuites/sptests/sp30/task1.c
@@ -45,7 +45,7 @@ rtems_task Task_1_through_3(
if ( time.second >= 35 ) {
puts( "*** END OF TEST 30 ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
}
put_name( Task_name[ task_number( tid ) - 1 ], FALSE );
diff --git a/testsuites/sptests/sp31/task1.c b/testsuites/sptests/sp31/task1.c
index 661fab1b4f..9330993197 100644
--- a/testsuites/sptests/sp31/task1.c
+++ b/testsuites/sptests/sp31/task1.c
@@ -73,7 +73,7 @@ rtems_task Task_1(
if ( TSR_fired ) {
puts( "TA1 - TSR fired and should not have!" );
- exit(1);
+ rtems_test_exit(1);
}
puts( "TA1 - rtems_timer_cancel - timer 1" );
@@ -270,5 +270,5 @@ rtems_task Task_1(
directive_failed( status, "rtems_timer_delete" );
puts( "*** END OF TEST 31 *** " );
- exit( 0 );
+ rtems_test_exit( 0 );
}
diff --git a/testsuites/sptests/spsize/init.c b/testsuites/sptests/spsize/init.c
index 9a8c66d2df..cfe6057bc1 100644
--- a/testsuites/sptests/spsize/init.c
+++ b/testsuites/sptests/spsize/init.c
@@ -42,7 +42,7 @@ rtems_task Init(
puts( "\n*** RTEMS SIZE PROGRAM ***" );
size_rtems( 1 );
puts( "*** END OF RTEMS SIZE PROGRAM ***" );
- exit( 0 );
+ rtems_test_exit( 0 );
#if defined(HAVE_MENU)
do {
printf( "\n\nPlease select program mode:\n" );
@@ -55,7 +55,7 @@ rtems_task Init(
switch( choice ) {
case 1: size_rtems( 1 ); break;
case 2: size_rtems( 0 ); break;
- case 3: exit( 0 );
+ case 3: rtems_test_exit( 0 );
default: continue;
}
} while ( FOREVER );
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 2390cc6de8..5ffe538107 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -46,6 +46,8 @@
#include <rtems/score/wkspace.h>
#include <stdlib.h>
+#include <stdio.h>
+#include <tmacros.h>
/* These are always defined by the executive.
*
@@ -126,12 +128,6 @@
rtems_unsigned32 sys_req;
-/* to avoid warnings */
-int puts();
-int printf();
-int getint();
-#undef getchar
-int getchar();
void help_size();
void print_formula();