summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpfatal03
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-17 08:10:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-17 09:17:36 +0100
commitad48ebbfc7e56cfdaf33e7a77a314171d6455511 (patch)
treec150e12d845b5fab5cc689e150068b9b9d085b38 /testsuites/smptests/smpfatal03
parenttests/samples: Use <rtems/test.h> (diff)
downloadrtems-ad48ebbfc7e56cfdaf33e7a77a314171d6455511.tar.bz2
tests/smptests: Use <rtems/test.h>
Diffstat (limited to 'testsuites/smptests/smpfatal03')
-rw-r--r--testsuites/smptests/smpfatal03/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/testsuites/smptests/smpfatal03/init.c b/testsuites/smptests/smpfatal03/init.c
index 3e5ebe2e8f..ae6a8ea8fe 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