summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal12
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-04 21:28:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-04 21:28:56 +0000
commitd329acf46d3b1b24cb5f0d3e16ed4df9e0278b07 (patch)
tree59b6792d1919b72196c688cb9da6ccfe4392dafc /testsuites/sptests/spfatal12
parent2009-09-04 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-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/spfatal12')
-rw-r--r--testsuites/sptests/spfatal12/Makefile.am3
-rw-r--r--testsuites/sptests/spfatal12/init.c37
-rw-r--r--testsuites/sptests/spfatal12/spfatal12.scn2
-rw-r--r--testsuites/sptests/spfatal12/testcase.h26
4 files changed, 29 insertions, 39 deletions
diff --git a/testsuites/sptests/spfatal12/Makefile.am b/testsuites/sptests/spfatal12/Makefile.am
index 7742b0e17d..2301e1cc78 100644
--- a/testsuites/sptests/spfatal12/Makefile.am
+++ b/testsuites/sptests/spfatal12/Makefile.am
@@ -5,7 +5,8 @@
MANAGERS = all
rtems_tests_PROGRAMS = spfatal12
-spfatal12_SOURCES = init.c
+spfatal12_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h \
+ testcase.h
dist_rtems_tests_DATA = spfatal12.scn
dist_rtems_tests_DATA += spfatal12.doc
diff --git a/testsuites/sptests/spfatal12/init.c b/testsuites/sptests/spfatal12/init.c
deleted file mode 100644
index b093b540cb..0000000000
--- a/testsuites/sptests/spfatal12/init.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Test fatal error when _Heap_Initialize fails during initialization
- *
- * 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>
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- puts( "\n\n*** TEST FATAL 12 ***" );
-
- puts( "_Heap_Initialize fails during RTEMS initialization" );
- Configuration.work_space_size = sizeof(void *);
- rtems_initialize_data_structures();
-}
-
-/* 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/spfatal12/spfatal12.scn b/testsuites/sptests/spfatal12/spfatal12.scn
index 2bb7d06c31..f96b503104 100644
--- a/testsuites/sptests/spfatal12/spfatal12.scn
+++ b/testsuites/sptests/spfatal12/spfatal12.scn
@@ -1,2 +1,2 @@
*** TEST FATAL 12 ***
-_Heap_Initialize fails during RTEMS initialization
+Fatal error (_Heap_Initialize fails during RTEMS initialization) hit
diff --git a/testsuites/sptests/spfatal12/testcase.h b/testsuites/sptests/spfatal12/testcase.h
new file mode 100644
index 0000000000..4af72e3bcf
--- /dev/null
+++ b/testsuites/sptests/spfatal12/testcase.h
@@ -0,0 +1,26 @@
+/* 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 "12"
+#define FATAL_ERROR_DESCRIPTION \
+ "_Heap_Initialize fails during RTEMS initialization"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
+
+void force_error()
+{
+ Configuration.work_space_size = sizeof(void *);
+ rtems_initialize_data_structures();
+
+ /* we will not run this far */
+}