From 8c26e79867739e13a8699883ec1fa86127d94aaf Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 25 Mar 2014 16:45:08 +0100 Subject: tests: Produce proper begin/end messages --- testsuites/sptests/sperror02/init.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'testsuites/sptests/sperror02') 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 -- cgit v1.2.3