summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpfatal02
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/smpfatal02
parenttests/samples: Use <rtems/test.h> (diff)
downloadrtems-ad48ebbfc7e56cfdaf33e7a77a314171d6455511.tar.bz2
tests/smptests: Use <rtems/test.h>
Diffstat (limited to 'testsuites/smptests/smpfatal02')
-rw-r--r--testsuites/smptests/smpfatal02/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/testsuites/smptests/smpfatal02/init.c b/testsuites/smptests/smpfatal02/init.c
index 1e8da268a9..d84e1fcc0d 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