diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-04 21:28:56 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-04 21:28:56 +0000 |
commit | d329acf46d3b1b24cb5f0d3e16ed4df9e0278b07 (patch) | |
tree | 59b6792d1919b72196c688cb9da6ccfe4392dafc /testsuites/sptests/spfatal10 | |
parent | 2009-09-04 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-d329acf46d3b1b24cb5f0d3e16ed4df9e0278b07.tar.bz2 |
2009-09-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* spfatal01/spfatal01.scn, spfatal01/testcase.h,
spfatal02/spfatal02.scn, spfatal02/testcase.h,
spfatal03/spfatal03.scn, spfatal03/testcase.h,
spfatal04/spfatal04.scn, spfatal04/testcase.h,
spfatal05/spfatal05.scn, spfatal05/testcase.h,
spfatal06/spfatal06.scn, spfatal06/testcase.h,
spfatal07/spfatal07.scn, spfatal07/testcase.h,
spfatal08/spfatal08.scn, spfatal08/testcase.h,
spfatal09/spfatal09.scn, spfatal09/testcase.h, spfatal10/Makefile.am,
spfatal10/spfatal10.scn, spfatal11/Makefile.am,
spfatal11/spfatal11.scn, spfatal12/Makefile.am,
spfatal12/spfatal12.scn, spfatal_support/init.c: Make all fatal error
tests use testcase.h and spfatal_support framework. Print test name
herald in all cases.
* spfatal10/testcase.h, spfatal11/testcase.h, spfatal12/testcase.h:
New files.
* spfatal10/init.c, spfatal11/init.c, spfatal12/init.c: Removed.
Diffstat (limited to 'testsuites/sptests/spfatal10')
-rw-r--r-- | testsuites/sptests/spfatal10/Makefile.am | 3 | ||||
-rw-r--r-- | testsuites/sptests/spfatal10/init.c | 39 | ||||
-rw-r--r-- | testsuites/sptests/spfatal10/spfatal10.scn | 6 | ||||
-rw-r--r-- | testsuites/sptests/spfatal10/testcase.h | 24 |
4 files changed, 28 insertions, 44 deletions
diff --git a/testsuites/sptests/spfatal10/Makefile.am b/testsuites/sptests/spfatal10/Makefile.am index 04cb312649..d93b6a6019 100644 --- a/testsuites/sptests/spfatal10/Makefile.am +++ b/testsuites/sptests/spfatal10/Makefile.am @@ -5,7 +5,8 @@ MANAGERS = all rtems_tests_PROGRAMS = spfatal10 -spfatal10_SOURCES = init.c +spfatal10_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h \ + testcase.h dist_rtems_tests_DATA = spfatal10.scn dist_rtems_tests_DATA += spfatal10.doc diff --git a/testsuites/sptests/spfatal10/init.c b/testsuites/sptests/spfatal10/init.c deleted file mode 100644 index a038468361..0000000000 --- a/testsuites/sptests/spfatal10/init.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Test __assert with function name - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <tmacros.h> -#undef NDEBUG -#include <assert.h> - -rtems_task Init( - rtems_task_argument ignored -) -{ - puts( "\n\n*** TEST FATAL 10 ***" ); - - puts( "asserting with non-NULL strings...\n" ); - __assert_func( __FILE__, __LINE__, "Init", "forced" ); - -} - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 1 -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT -#include <rtems/confdefs.h> - -/* global variables */ diff --git a/testsuites/sptests/spfatal10/spfatal10.scn b/testsuites/sptests/spfatal10/spfatal10.scn index 77113c76b5..b613722f3e 100644 --- a/testsuites/sptests/spfatal10/spfatal10.scn +++ b/testsuites/sptests/spfatal10/spfatal10.scn @@ -1,5 +1,3 @@ *** TEST FATAL 10 *** -asserting with non-NULL strings... - -assertion "force" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal10/init.c", line 24, function: Init -program stopped with signal 2. +assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal10/testcase.h", line 20, function: Init +Fatal error (asserting with non-NULL strings...) hit diff --git a/testsuites/sptests/spfatal10/testcase.h b/testsuites/sptests/spfatal10/testcase.h new file mode 100644 index 0000000000..7d80bc638e --- /dev/null +++ b/testsuites/sptests/spfatal10/testcase.h @@ -0,0 +1,24 @@ +/* Test __assert_func with NULL function name + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#define FATAL_ERROR_TEST_NAME "10" +#define FATAL_ERROR_DESCRIPTION "asserting with non-NULL strings..." +#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API +#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE +#define FATAL_ERROR_EXPECTED_ERROR 0 + +void force_error() +{ + __assert_func( __FILE__, __LINE__, "Init", "forced" ); + + /* we will not run this far */ +} |