[rtems commit] tests/smptests: Use <rtems/test.h>

Sebastian Huber sebh at rtems.org
Mon Mar 17 08:10:34 UTC 2014


Module:    rtems
Branch:    master
Commit:    ad48ebbfc7e56cfdaf33e7a77a314171d6455511
Changeset: http://git.rtems.org/rtems/commit/?id=ad48ebbfc7e56cfdaf33e7a77a314171d6455511

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 17 08:10:19 2014 +0100

tests/smptests: Use <rtems/test.h>

---

 testsuites/smptests/smp01/init.c                |   10 ++++++----
 testsuites/smptests/smp01/system.h              |    2 ++
 testsuites/smptests/smp02/init.c                |    7 +++++--
 testsuites/smptests/smp02/system.h              |    2 ++
 testsuites/smptests/smp03/init.c                |    9 ++++++---
 testsuites/smptests/smp03/system.h              |    2 ++
 testsuites/smptests/smp05/init.c                |    9 +++++++--
 testsuites/smptests/smp07/init.c                |    9 +++++++--
 testsuites/smptests/smp08/init.c                |    5 ++++-
 testsuites/smptests/smp08/system.h              |    2 ++
 testsuites/smptests/smp08/tasks.c               |    2 +-
 testsuites/smptests/smp09/init.c                |    9 +++++++--
 testsuites/smptests/smpaffinity01/init.c        |   12 ++++++++----
 testsuites/smptests/smpatomic01/init.c          |    9 ++++++---
 testsuites/smptests/smpfatal01/init.c           |   18 +++++++++---------
 testsuites/smptests/smpfatal02/init.c           |   18 +++++++++---------
 testsuites/smptests/smpfatal03/init.c           |   18 +++++++++---------
 testsuites/smptests/smpload01/init.c            |    7 ++++---
 testsuites/smptests/smplock01/init.c            |    9 ++++++---
 testsuites/smptests/smpmigration01/init.c       |    9 ++++++---
 testsuites/smptests/smppsxaffinity01/init.c     |   12 ++++++++----
 testsuites/smptests/smppsxaffinity02/init.c     |   10 ++++++----
 testsuites/smptests/smppsxsignal01/init.c       |    9 ++++++---
 testsuites/smptests/smpschedule01/init.c        |    9 ++++++---
 testsuites/smptests/smpsignal01/init.c          |    9 ++++++---
 testsuites/smptests/smpswitchextension01/init.c |    9 ++++++---
 testsuites/smptests/smpunsupported01/init.c     |    9 ++++++---
 27 files changed, 152 insertions(+), 83 deletions(-)

diff --git a/testsuites/smptests/smp01/init.c b/testsuites/smptests/smp01/init.c
index 3e12726..7c412a0 100644
--- a/testsuites/smptests/smp01/init.c
+++ b/testsuites/smptests/smp01/init.c
@@ -16,6 +16,8 @@
 
 #include <inttypes.h>
 
+const char rtems_test_name[] = "SMP 1";
+
 void Loop() {
   volatile int i;
 
@@ -40,10 +42,10 @@ rtems_task Init(
    * debug messages go away.
    */ 
   Loop();
-  locked_print_initialize();
 
-  /* Put start of test message */
-  locked_printf( "\n\n***  SMP01 TEST ***\n" );
+  TEST_BEGIN();
+
+  locked_print_initialize();
 
   /* Initialize the TaskRan array */
   for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
@@ -81,7 +83,7 @@ rtems_task Init(
         allDone = false;
     }
     if (allDone) {
-      locked_printf( "*** END OF TEST SMP01 ***\n" );
+      TEST_END();
       rtems_test_exit( 0 );
     }
   }
diff --git a/testsuites/smptests/smp01/system.h b/testsuites/smptests/smp01/system.h
index e360e37..1b675f9 100644
--- a/testsuites/smptests/smp01/system.h
+++ b/testsuites/smptests/smp01/system.h
@@ -32,6 +32,8 @@ rtems_task Test_task(
     (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
 #define CONFIGURE_MAXIMUM_SEMAPHORES 1
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #include <rtems/confdefs.h>
diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c
index 509fed0..3af33a3 100644
--- a/testsuites/smptests/smp02/init.c
+++ b/testsuites/smptests/smp02/init.c
@@ -17,9 +17,11 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+const char rtems_test_name[] = "SMP 2";
+
 static void success(void)
 {
-  locked_printf( "*** END OF TEST SMP02 ***\n" );
+  TEST_END();
   rtems_test_exit( 0 );
 }
 
@@ -34,8 +36,9 @@ rtems_task Init(
   rtems_status_code status;
   char              str[80];
 
+  TEST_BEGIN();
+
   locked_print_initialize();
-  locked_printf( "\n\n***  SMP02 TEST ***\n" );
 
   if ( rtems_smp_get_processor_count() == 1 ) {
     success();
diff --git a/testsuites/smptests/smp02/system.h b/testsuites/smptests/smp02/system.h
index ebe243f..81c2912 100644
--- a/testsuites/smptests/smp02/system.h
+++ b/testsuites/smptests/smp02/system.h
@@ -31,6 +31,8 @@ rtems_task Test_task(
 #define CONFIGURE_MAXIMUM_TASKS            \
     (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 #define CONFIGURE_INIT_TASK_STACK_SIZE \
     (3 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
diff --git a/testsuites/smptests/smp03/init.c b/testsuites/smptests/smp03/init.c
index fd6f6d9..53d2341 100644
--- a/testsuites/smptests/smp03/init.c
+++ b/testsuites/smptests/smp03/init.c
@@ -17,9 +17,11 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+const char rtems_test_name[] = "SMP 3";
+
 static void success(void)
 {
-  locked_printf( "*** END OF TEST SMP03 ***\n" );
+  TEST_END();
   rtems_test_exit( 0 );
 }
 
@@ -50,9 +52,10 @@ rtems_task Init(
   rtems_status_code status;
 
   Loop();
-  locked_print_initialize();
 
-  locked_printf( "\n\n***  SMP03 TEST ***\n" );
+  TEST_BEGIN();
+
+  locked_print_initialize();
 
   if ( rtems_smp_get_processor_count() == 1 ) {
     success();
diff --git a/testsuites/smptests/smp03/system.h b/testsuites/smptests/smp03/system.h
index e8138af..24bbb70 100644
--- a/testsuites/smptests/smp03/system.h
+++ b/testsuites/smptests/smp03/system.h
@@ -33,6 +33,8 @@ rtems_task Test_task(
 
 #define CONFIGURE_MAXIMUM_SEMAPHORES 1
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 #define CONFIGURE_INIT_TASK_STACK_SIZE \
     (3 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
diff --git a/testsuites/smptests/smp05/init.c b/testsuites/smptests/smp05/init.c
index c666c27..a74d220 100644
--- a/testsuites/smptests/smp05/init.c
+++ b/testsuites/smptests/smp05/init.c
@@ -14,9 +14,11 @@
 #include <tmacros.h>
 #include "test_support.h"
 
+const char rtems_test_name[] = "SMP 6";
+
 static void success(void)
 {
-  locked_printf( "*** END OF TEST SMP05 ***\n" );
+  TEST_END();
   rtems_test_exit( 0 );
 }
 
@@ -38,8 +40,9 @@ rtems_task Init(
   rtems_id           id;
   rtems_status_code  status;
 
+  TEST_BEGIN();
+
   locked_print_initialize();
-  locked_printf( "\n\n*** TEST SMP05 ***\n" );
 
   if ( rtems_smp_get_processor_count() == 1 ) {
     success();
@@ -79,6 +82,8 @@ rtems_task Init(
 
 #define CONFIGURE_MAXIMUM_TASKS            \
     (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_MAXIMUM_SEMAPHORES 1
diff --git a/testsuites/smptests/smp07/init.c b/testsuites/smptests/smp07/init.c
index 2580f05..c149023 100644
--- a/testsuites/smptests/smp07/init.c
+++ b/testsuites/smptests/smp07/init.c
@@ -14,13 +14,15 @@
 #include <tmacros.h>
 #include "test_support.h"
 
+const char rtems_test_name[] = "SMP 7";
+
 volatile bool TaskRan = false;
 volatile bool TSRFired = false;
 rtems_id      Semaphore; 
 
 static void success(void)
 {
-  locked_printf( "*** END OF TEST SMP07 ***\n" );
+  TEST_END();
   rtems_test_exit( 0 );
 }
 
@@ -87,8 +89,9 @@ rtems_task Init(
   rtems_interval     then;
   rtems_id           Timer;
 
+  TEST_BEGIN();
+
   locked_print_initialize();
-  locked_printf( "\n\n*** TEST SMP07 ***\n" );
 
   if ( rtems_smp_get_processor_count() == 1 ) {
     success();
@@ -171,6 +174,8 @@ rtems_task Init(
 #define CONFIGURE_MAXIMUM_TIMERS           1
 
 #define CONFIGURE_MAXIMUM_TASKS            2
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 #define CONFIGURE_MAXIMUM_SEMAPHORES       2
 
diff --git a/testsuites/smptests/smp08/init.c b/testsuites/smptests/smp08/init.c
index 9da1b42..2d441d2 100644
--- a/testsuites/smptests/smp08/init.c
+++ b/testsuites/smptests/smp08/init.c
@@ -14,6 +14,8 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
+const char rtems_test_name[] = "SMP 8";
+
 void PrintTaskInfo(
   const char         *task_name,
   rtems_time_of_day  *_tb 
@@ -44,9 +46,10 @@ rtems_task Init(
   int               i;
   char              ch[4];
   rtems_id          id;
+
+  TEST_BEGIN();
  
   locked_print_initialize();
-  locked_printf( "\n\n*** SMP08 TEST ***\n" );
 
   time.year   = 1988;
   time.month  = 12;
diff --git a/testsuites/smptests/smp08/system.h b/testsuites/smptests/smp08/system.h
index aec0c0b..d70488c 100644
--- a/testsuites/smptests/smp08/system.h
+++ b/testsuites/smptests/smp08/system.h
@@ -33,6 +33,8 @@ rtems_task Test_task(
 #define CONFIGURE_MAXIMUM_TASKS            \
     (1 + (CONFIGURE_SMP_MAXIMUM_PROCESSORS*3) )
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
 #define CONFIGURE_MAXIMUM_SEMAPHORES          2
diff --git a/testsuites/smptests/smp08/tasks.c b/testsuites/smptests/smp08/tasks.c
index 17b05e7..7185599 100644
--- a/testsuites/smptests/smp08/tasks.c
+++ b/testsuites/smptests/smp08/tasks.c
@@ -38,7 +38,7 @@ rtems_task Test_task(
 
     status = rtems_clock_get_tod( &time );
     if ( time.second >= 35 ) {
-      locked_printf( "*** END OF SMP08 TEST ***\n" );
+      TEST_END();
       rtems_test_exit( 0 );
     }
 
diff --git a/testsuites/smptests/smp09/init.c b/testsuites/smptests/smp09/init.c
index e21ef68..40234a9 100644
--- a/testsuites/smptests/smp09/init.c
+++ b/testsuites/smptests/smp09/init.c
@@ -15,6 +15,8 @@
 #include "test_support.h"
 #include <rtems/cpuuse.h>
 
+const char rtems_test_name[] = "SMP 9";
+
 volatile int killtime;
 
 rtems_task Test_task(
@@ -36,8 +38,9 @@ rtems_task Init(
   rtems_id           id;
   rtems_status_code  status;
 
+  TEST_BEGIN();
+
   locked_print_initialize();
-  locked_printf( "\n\n*** TEST SMP09 ***\n" );
 
   for ( killtime=0; killtime<1000000; killtime++ )
     ;
@@ -68,7 +71,7 @@ rtems_task Init(
 
   rtems_cpu_usage_report();
 
-  locked_printf( "*** END OF TEST SMP09 ***\n" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -82,6 +85,8 @@ rtems_task Init(
 
 #define CONFIGURE_MAXIMUM_TASKS            \
     (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_MAXIMUM_SEMAPHORES 1
diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c
index e4665ca..6e376f9 100644
--- a/testsuites/smptests/smpaffinity01/init.c
+++ b/testsuites/smptests/smpaffinity01/init.c
@@ -15,6 +15,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPAFFINITY 1";
+
 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
 
 rtems_id           Init_id;
@@ -209,7 +211,7 @@ static void Init(rtems_task_argument arg)
 {
   int                  sc;
 
-  puts( "\n\n*** SMP AFFINITY 1 ***" );
+  TEST_BEGIN();
 
   /* Initialize thread id */
   sc = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &Init_id );
@@ -219,16 +221,16 @@ static void Init(rtems_task_argument arg)
   Validate_getaffinity_errors();
   Validate_affinity();
 
-  puts( "*** END OF SMP AFFINITY TEST 1 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
 #else
 static void Init(rtems_task_argument arg)
 {
-  puts( "\n\n*** SMP AFFINITY TEST 1 ***" );
+  TEST_BEGIN();
   puts( " Affinity NOT Supported");
-  puts( "*** END OF SMP AFFINITY TEST 1 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -242,6 +244,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_MAXIMUM_TASKS         (NUM_CPUS*2)
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smpatomic01/init.c b/testsuites/smptests/smpatomic01/init.c
index 8e05307..f8ef0e6 100644
--- a/testsuites/smptests/smpatomic01/init.c
+++ b/testsuites/smptests/smpatomic01/init.c
@@ -26,6 +26,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPATOMIC 1";
+
 #define MASTER_PRIORITY 1
 
 #define WORKER_PRIORITY 2
@@ -621,14 +623,13 @@ static void simple_tests(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPATOMIC 1 ***");
+  TEST_BEGIN();
 
   simple_tests();
 
   test();
 
-  puts("*** END OF TEST SMPATOMIC 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -647,6 +648,8 @@ static void Init(rtems_task_argument arg)
 #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smpfatal01/init.c b/testsuites/smptests/smpfatal01/init.c
index c78b29f..b568710 100644
--- a/testsuites/smptests/smpfatal01/init.c
+++ b/testsuites/smptests/smpfatal01/init.c
@@ -17,12 +17,15 @@
 #endif
 
 #include <rtems.h>
+#include <rtems/test.h>
 #include <rtems/score/percpu.h>
 #include <rtems/score/smpimpl.h>
 
 #include <assert.h>
 #include <stdlib.h>
 
+const char rtems_test_name[] = "SMPFATAL 1";
+
 #define MAX_CPUS 32
 
 static uint32_t main_cpu;
@@ -32,11 +35,6 @@ static void Init(rtems_task_argument arg)
   assert(0);
 }
 
-static void end_of_test(void)
-{
-  printk( "*** END OF TEST SMPFATAL 1 ***\n" );
-}
-
 static void fatal_extension(
   rtems_fatal_source source,
   bool is_internal,
@@ -59,7 +57,7 @@ static void fatal_extension(
         assert(state == PER_CPU_STATE_SHUTDOWN);
       }
 
-      end_of_test();
+      rtems_test_endk();
     }
   }
 }
@@ -74,7 +72,7 @@ static rtems_status_code test_driver_init(
   uint32_t cpu_count = rtems_smp_get_processor_count();
   uint32_t cpu;
 
-  printk("\n\n*** TEST SMPFATAL 1 ***\n");
+  rtems_test_begink();
 
   assert(rtems_configuration_get_maximum_processors() == MAX_CPUS);
 
@@ -102,7 +100,7 @@ static rtems_status_code test_driver_init(
 
     per_cpu->state = PER_CPU_STATE_SHUTDOWN;
   } else {
-    end_of_test();
+    rtems_test_endk();
     exit(0);
   }
 
@@ -115,7 +113,9 @@ static rtems_status_code test_driver_init(
 #define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
   { .initialization_entry = test_driver_init }
 
-#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
+#define CONFIGURE_INITIAL_EXTENSIONS \
+  { .fatal = fatal_extension }, \
+  RTEMS_TEST_INITIAL_EXTENSION
 
 #define CONFIGURE_SMP_APPLICATION
 
diff --git a/testsuites/smptests/smpfatal02/init.c b/testsuites/smptests/smpfatal02/init.c
index 1e8da26..d84e1fc 100644
--- a/testsuites/smptests/smpfatal02/init.c
+++ b/testsuites/smptests/smpfatal02/init.c
@@ -17,12 +17,15 @@
 #endif
 
 #include <rtems.h>
+#include <rtems/test.h>
 #include <rtems/score/percpu.h>
 #include <rtems/score/smpimpl.h>
 
 #include <assert.h>
 #include <stdlib.h>
 
+const char rtems_test_name[] = "SMPFATAL 2";
+
 #define MAX_CPUS 32
 
 static uint32_t main_cpu;
@@ -32,11 +35,6 @@ static void Init(rtems_task_argument arg)
   assert(0);
 }
 
-static void end_of_test(void)
-{
-  printk( "*** END OF TEST SMPFATAL 2 ***\n" );
-}
-
 static void fatal_extension(
   rtems_fatal_source source,
   bool is_internal,
@@ -64,7 +62,7 @@ static void fatal_extension(
         assert(state == PER_CPU_STATE_SHUTDOWN);
       }
 
-      end_of_test();
+      rtems_test_endk();
     } else {
       assert(source == RTEMS_FATAL_SOURCE_SMP);
       assert(code == SMP_FATAL_SHUTDOWN);
@@ -82,7 +80,7 @@ static rtems_status_code test_driver_init(
   uint32_t cpu_count = rtems_smp_get_processor_count();
   uint32_t cpu;
 
-  printk("\n\n*** TEST SMPFATAL 2 ***\n");
+  rtems_test_begink();
 
   assert(rtems_configuration_get_maximum_processors() == MAX_CPUS);
 
@@ -107,7 +105,7 @@ static rtems_status_code test_driver_init(
   if (cpu_count > 1) {
     rtems_fatal(RTEMS_FATAL_SOURCE_APPLICATION, 0xdeadbeef);
   } else {
-    end_of_test();
+    rtems_test_endk();
     exit(0);
   }
 
@@ -120,7 +118,9 @@ static rtems_status_code test_driver_init(
 #define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
   { .initialization_entry = test_driver_init }
 
-#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
+#define CONFIGURE_INITIAL_EXTENSIONS \
+  { .fatal = fatal_extension }, \
+  RTEMS_TEST_INITIAL_EXTENSION
 
 #define CONFIGURE_SMP_APPLICATION
 
diff --git a/testsuites/smptests/smpfatal03/init.c b/testsuites/smptests/smpfatal03/init.c
index 3e5ebe2..ae6a8ea 100644
--- a/testsuites/smptests/smpfatal03/init.c
+++ b/testsuites/smptests/smpfatal03/init.c
@@ -18,6 +18,7 @@
 
 #include <rtems.h>
 #include <rtems/counter.h>
+#include <rtems/test.h>
 #include <rtems/score/smpbarrier.h>
 #include <rtems/score/smpimpl.h>
 #include <rtems/score/threaddispatch.h>
@@ -25,17 +26,14 @@
 #include <assert.h>
 #include <stdlib.h>
 
+const char rtems_test_name[] = "SMPFATAL 3";
+
 #define CPU_COUNT 2
 
 static uint32_t main_cpu;
 
 static SMP_barrier_Control barrier = SMP_BARRIER_CONTROL_INITIALIZER;
 
-static void end_of_test(void)
-{
-  printk( "*** END OF TEST SMPFATAL 3 ***\n" );
-}
-
 static void acquire_giant_and_fatal_task(rtems_task_argument arg)
 {
   SMP_barrier_State state = SMP_BARRIER_STATE_INITIALIZER;
@@ -70,7 +68,7 @@ static void Init(rtems_task_argument arg)
   uint32_t self = rtems_smp_get_current_processor();
   uint32_t cpu_count = rtems_smp_get_processor_count();
 
-  printk("\n\n*** TEST SMPFATAL 3 ***\n");
+  rtems_test_begink();
 
   main_cpu = self;
 
@@ -93,7 +91,7 @@ static void Init(rtems_task_argument arg)
 
     wait_for_giant();
   } else {
-    end_of_test();
+    rtems_test_endk();
     exit(0);
   }
 }
@@ -116,7 +114,7 @@ static void fatal_extension(
       assert(source == RTEMS_FATAL_SOURCE_SMP);
       assert(code == SMP_FATAL_SHUTDOWN);
 
-      end_of_test();
+      rtems_test_endk();
     } else {
       assert(source == RTEMS_FATAL_SOURCE_APPLICATION);
       assert(code == 0xdeadbeef);
@@ -127,7 +125,9 @@ static void fatal_extension(
 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
 
-#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
+#define CONFIGURE_INITIAL_EXTENSIONS \
+  { .fatal = fatal_extension }, \
+  RTEMS_TEST_INITIAL_EXTENSION
 
 #define CONFIGURE_SMP_APPLICATION
 
diff --git a/testsuites/smptests/smpload01/init.c b/testsuites/smptests/smpload01/init.c
index c7bfb37..63c1a90 100644
--- a/testsuites/smptests/smpload01/init.c
+++ b/testsuites/smptests/smpload01/init.c
@@ -21,6 +21,8 @@
 #include <rtems.h>
 #include <rtems/profiling.h>
 
+const char rtems_test_name[] = "SMPLOAD 1";
+
 #define CPU_COUNT 32
 
 #define WORKER_COUNT (3 * CPU_COUNT)
@@ -112,12 +114,11 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPLOAD 1 ***");
+  TEST_BEGIN();
 
   test();
 
-  puts("*** END OF TEST SMPLOAD 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
diff --git a/testsuites/smptests/smplock01/init.c b/testsuites/smptests/smplock01/init.c
index a445c84..d6f973f 100644
--- a/testsuites/smptests/smplock01/init.c
+++ b/testsuites/smptests/smplock01/init.c
@@ -23,6 +23,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPLOCK 1";
+
 #define TASK_PRIORITY 1
 
 #define CPU_COUNT 32
@@ -331,12 +333,11 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPLOCK 1 ***");
+  TEST_BEGIN();
 
   test();
 
-  puts("*** END OF TEST SMPLOCK 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -357,6 +358,8 @@ static void Init(rtems_task_argument arg)
 #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smpmigration01/init.c b/testsuites/smptests/smpmigration01/init.c
index 2422466..6fb4144 100644
--- a/testsuites/smptests/smpmigration01/init.c
+++ b/testsuites/smptests/smpmigration01/init.c
@@ -23,6 +23,8 @@
 #include <math.h>
 #include <inttypes.h>
 
+const char rtems_test_name[] = "SMPMIGRATION 1";
+
 #define CPU_COUNT 2
 
 #define RUNNER_COUNT (CPU_COUNT + 1)
@@ -220,14 +222,13 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPMIGRATION 1 ***");
+  TEST_BEGIN();
 
   if (rtems_smp_get_processor_count() >= 2) {
     test();
   }
 
-  puts("*** END OF TEST SMPMIGRATION 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -242,6 +243,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smppsxaffinity01/init.c b/testsuites/smptests/smppsxaffinity01/init.c
index 51ce9a2..154da74 100644
--- a/testsuites/smptests/smppsxaffinity01/init.c
+++ b/testsuites/smptests/smppsxaffinity01/init.c
@@ -18,6 +18,8 @@
 #include <pthread.h>
 #include <sched.h>
 
+const char rtems_test_name[] = "SMPPSXAFFINITY 1";
+
 #if HAVE_DECL_PTHREAD_GETAFFINITY_NP
 
 #define CPU_COUNT 4
@@ -129,7 +131,7 @@ void *POSIX_Init(
   void *ignored
 )
 {
-  puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
+  TEST_BEGIN();
 
   /* Initialize thread id */
   Init_id = pthread_self();
@@ -138,7 +140,7 @@ void *POSIX_Init(
   Validate_attrgetaffinity_errors();
   Validate_attr();
 
-  puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -147,9 +149,9 @@ void *POSIX_Init(
   void *ignored
 )
 {
-  puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
+  TEST_BEGIN();
   puts( " POSIX Affinity Methods NOT Supported");
-  puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -166,6 +168,8 @@ void *POSIX_Init(
 
 #define CONFIGURE_MAXIMUM_POSIX_THREADS  1
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c
index 487b043..e512f4b 100644
--- a/testsuites/smptests/smppsxaffinity02/init.c
+++ b/testsuites/smptests/smppsxaffinity02/init.c
@@ -20,6 +20,8 @@
 #include <pthread.h>
 #include <sched.h>
 
+const char rtems_test_name[] = "SMPPSXAFFINITY 2";
+
 #if HAVE_DECL_PTHREAD_GETAFFINITY_NP
 
 pthread_t           Init_id;
@@ -196,7 +198,7 @@ void *POSIX_Init(
   void *ignored
 )
 {
-  puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
+  TEST_BEGIN();
 
   /* Initialize thread id */
   Init_id = pthread_self();
@@ -205,7 +207,7 @@ void *POSIX_Init(
   Validate_getaffinity_errors();
   Validate_affinity();
 
-  puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -214,9 +216,9 @@ void *POSIX_Init(
   void *ignored
 )
 {
-  puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
+  TEST_BEGIN();
   puts( " Affinity NOT Supported");
-  puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
+  TEST_END();
   rtems_test_exit(0);
 }
 
diff --git a/testsuites/smptests/smppsxsignal01/init.c b/testsuites/smptests/smppsxsignal01/init.c
index 3b2718d..8105d0d 100644
--- a/testsuites/smptests/smppsxsignal01/init.c
+++ b/testsuites/smptests/smppsxsignal01/init.c
@@ -21,6 +21,8 @@
 #include <pthread.h>
 #include <signal.h>
 
+const char rtems_test_name[] = "SMPPSXSIGNAL 1";
+
 #define TEST_SIGNAL SIGUSR1
 
 typedef enum {
@@ -161,14 +163,13 @@ static void test(void)
 
 static void *POSIX_Init(void *arg)
 {
-  puts("\n\n*** TEST SMPPSXSIGNAL 1 ***");
+  TEST_BEGIN();
 
   if (rtems_smp_get_processor_count() >= 2) {
     test();
   }
 
-  puts("*** END OF TEST SMPPSXSIGNAL 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -179,6 +180,8 @@ static void *POSIX_Init(void *arg)
 
 #define CONFIGURE_SMP_MAXIMUM_PROCESSORS 2
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_MAXIMUM_POSIX_THREADS 2
 
 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/smptests/smpschedule01/init.c b/testsuites/smptests/smpschedule01/init.c
index d1c171b..20794cd 100644
--- a/testsuites/smptests/smpschedule01/init.c
+++ b/testsuites/smptests/smpschedule01/init.c
@@ -20,6 +20,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPSCHEDULE 1";
+
 #define CPU_COUNT 2
 
 #define TASK_COUNT 4
@@ -180,12 +182,11 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPSCHEDULE 1 ***");
+  TEST_BEGIN();
 
   test();
 
-  puts("*** END OF TEST SMPSCHEDULE 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -202,6 +203,8 @@ static void Init(rtems_task_argument arg)
 #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smpsignal01/init.c b/testsuites/smptests/smpsignal01/init.c
index af2f414..cb99672 100644
--- a/testsuites/smptests/smpsignal01/init.c
+++ b/testsuites/smptests/smpsignal01/init.c
@@ -18,6 +18,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPSIGNAL 1";
+
 #define TEST_SIGNAL RTEMS_SIGNAL_0
 
 typedef enum {
@@ -162,14 +164,13 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPSIGNAL 1 ***");
+  TEST_BEGIN();
 
   if (rtems_smp_get_processor_count() >= 2) {
     test();
   }
 
-  puts("*** END OF TEST SMPSIGNAL 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -182,6 +183,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_MAXIMUM_TASKS 2
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_ASR
diff --git a/testsuites/smptests/smpswitchextension01/init.c b/testsuites/smptests/smpswitchextension01/init.c
index 30d3caa..88e1944 100644
--- a/testsuites/smptests/smpswitchextension01/init.c
+++ b/testsuites/smptests/smpswitchextension01/init.c
@@ -21,6 +21,8 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+const char rtems_test_name[] = "SMPSWITCHEXTENSION 1";
+
 #define CPU_COUNT 2
 
 #define TOGGLER_COUNT 2
@@ -221,14 +223,13 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPSWITCHEXTENSION 1 ***");
+  TEST_BEGIN();
 
   if (rtems_smp_get_processor_count() >= 2) {
     test();
   }
 
-  puts("*** END OF TEST SMPSWITCHEXTENSION 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -243,6 +244,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_MAXIMUM_USER_EXTENSIONS EXTENSION_COUNT
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/smptests/smpunsupported01/init.c b/testsuites/smptests/smpunsupported01/init.c
index bf7272b..1a793ab 100644
--- a/testsuites/smptests/smpunsupported01/init.c
+++ b/testsuites/smptests/smpunsupported01/init.c
@@ -18,6 +18,8 @@
 
 #include "tmacros.h"
 
+const char rtems_test_name[] = "SMPUNSUPPORTED 1";
+
 static void some_task(rtems_task_argument arg)
 {
   (void) arg;
@@ -77,12 +79,11 @@ static void test(void)
 
 static void Init(rtems_task_argument arg)
 {
-  puts("\n\n*** TEST SMPUNSUPPORTED 1 ***");
+  TEST_BEGIN();
 
   test();
 
-  puts("*** END OF TEST SMPUNSUPPORTED 1 ***");
-
+  TEST_END();
   rtems_test_exit(0);
 }
 
@@ -95,6 +96,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_MAXIMUM_TASKS 2
 
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT




More information about the vc mailing list