diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-25 16:45:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-25 16:46:37 +0100 |
commit | 8c26e79867739e13a8699883ec1fa86127d94aaf (patch) | |
tree | 1d4bfc11903ea7e321d7badb5dd01472c47d6598 /testsuites/sptests/sperror03/init.c | |
parent | tmtests/tmcontext01: Use <rtems/test.h> (diff) | |
download | rtems-8c26e79867739e13a8699883ec1fa86127d94aaf.tar.bz2 |
tests: Produce proper begin/end messages
Diffstat (limited to 'testsuites/sptests/sperror03/init.c')
-rw-r--r-- | testsuites/sptests/sperror03/init.c | 22 |
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 |