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/spfatal11 | |
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/spfatal11')
-rw-r--r-- | testsuites/sptests/spfatal11/Makefile.am | 3 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/init.c | 38 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/spfatal11.scn | 4 | ||||
-rw-r--r-- | testsuites/sptests/spfatal11/testcase.h | 24 |
4 files changed, 28 insertions, 41 deletions
diff --git a/testsuites/sptests/spfatal11/Makefile.am b/testsuites/sptests/spfatal11/Makefile.am index 22e012f2bd..c9d3ad5a9d 100644 --- a/testsuites/sptests/spfatal11/Makefile.am +++ b/testsuites/sptests/spfatal11/Makefile.am @@ -5,7 +5,8 @@ MANAGERS = all rtems_tests_PROGRAMS = spfatal11 -spfatal11_SOURCES = init.c +spfatal11_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h \ + testcase.h dist_rtems_tests_DATA = spfatal11.scn dist_rtems_tests_DATA += spfatal11.doc diff --git a/testsuites/sptests/spfatal11/init.c b/testsuites/sptests/spfatal11/init.c deleted file mode 100644 index b7ba85b5f5..0000000000 --- a/testsuites/sptests/spfatal11/init.c +++ /dev/null @@ -1,38 +0,0 @@ -/* 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$ - */ - -#include <tmacros.h> -#undef NDEBUG -#include <assert.h> - -rtems_task Init( - rtems_task_argument ignored -) -{ - puts( "\n\n*** TEST FATAL 11 ***" ); - - puts( "asserting with non-NULL strings..." ); - __assert_func( __FILE__, __LINE__, NULL, "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/spfatal11/spfatal11.scn b/testsuites/sptests/spfatal11/spfatal11.scn index 4e8a76f809..ac067533cd 100644 --- a/testsuites/sptests/spfatal11/spfatal11.scn +++ b/testsuites/sptests/spfatal11/spfatal11.scn @@ -1,5 +1,5 @@ *** TEST FATAL 11 *** asserting with non-NULL strings... +assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal11/testcase.h", line 21 +Fatal error (asserting with non-NULL strings...) hit -assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal11/init.c", line 24 -program stopped with signal 2. diff --git a/testsuites/sptests/spfatal11/testcase.h b/testsuites/sptests/spfatal11/testcase.h new file mode 100644 index 0000000000..60ebe481a4 --- /dev/null +++ b/testsuites/sptests/spfatal11/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 "11" +#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__, NULL, "forced" ); + + /* we will not run this far */ +} |