summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sperror03
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-25 16:45:08 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-25 16:46:37 +0100
commit8c26e79867739e13a8699883ec1fa86127d94aaf (patch)
tree1d4bfc11903ea7e321d7badb5dd01472c47d6598 /testsuites/sptests/sperror03
parenttmtests/tmcontext01: Use <rtems/test.h> (diff)
downloadrtems-8c26e79867739e13a8699883ec1fa86127d94aaf.tar.bz2
tests: Produce proper begin/end messages
Diffstat (limited to 'testsuites/sptests/sperror03')
-rw-r--r--testsuites/sptests/sperror03/init.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/testsuites/sptests/sperror03/init.c b/testsuites/sptests/sperror03/init.c
index 61b405d123..818b90755c 100644
--- a/testsuites/sptests/sperror03/init.c
+++ b/testsuites/sptests/sperror03/init.c
@@ -19,6 +19,21 @@ const char rtems_test_name[] = "SPERROR 3";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
+static void fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
+{
+ if (
+ source == RTEMS_FATAL_SOURCE_EXIT
+ && !is_internal
+ && error == 0
+ ) {
+ rtems_test_endk();
+ }
+}
+
rtems_task Init(
rtems_task_argument argument
)
@@ -27,11 +42,9 @@ rtems_task Init(
rtems_panic(
"Dummy panic\n"
- "*** END OF TEST Tests for error reporting routines - 03 ***\n"
);
-
- rtems_test_exit(0);
+ rtems_test_assert(0);
}
/* configuration information */
@@ -40,7 +53,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .fatal = fatal_extension }, RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE