summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sperror02
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/sperror02
parenttmtests/tmcontext01: Use <rtems/test.h> (diff)
downloadrtems-8c26e79867739e13a8699883ec1fa86127d94aaf.tar.bz2
tests: Produce proper begin/end messages
Diffstat (limited to 'testsuites/sptests/sperror02')
-rw-r--r--testsuites/sptests/sperror02/init.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/testsuites/sptests/sperror02/init.c b/testsuites/sptests/sperror02/init.c
index d4f74f58d2..dca2219305 100644
--- a/testsuites/sptests/sperror02/init.c
+++ b/testsuites/sptests/sperror02/init.c
@@ -21,6 +21,21 @@ const char rtems_test_name[] = "SPERROR 2";
/* 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 == 1
+ ) {
+ rtems_test_endk();
+ }
+}
+
rtems_task Init(
rtems_task_argument argument
)
@@ -31,11 +46,9 @@ rtems_task Init(
rtems_error(
RTEMS_NO_MEMORY | RTEMS_ERROR_ABORT,
"Dummy: Resources unavailable\n"
- "*** END OF TEST Tests for error reporting routines - 02 ***\n"
);
-
- rtems_test_exit(0);
+ rtems_test_assert(0);
}
/* configuration information */
@@ -44,7 +57,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