summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal10
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-28 19:19:35 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-28 19:19:35 +0000
commit5fdb1e7bc0319ce06b4e427f01e8d95beeab09ad (patch)
tree738799d79979c4b374a2ec5b44a43c39b4003a83 /testsuites/sptests/spfatal10
parent2008-01-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-5fdb1e7bc0319ce06b4e427f01e8d95beeab09ad.tar.bz2
2008-01-28 Jennifer Averett <jennifer.averett@OARcorp.com>
* Makefile.am, configure.ac: Added fatal error tests * spfatal01/Makefile.am, spfatal01/spfatal01.scn, spfatal01/testcase.h, spfatal02/Makefile.am, spfatal02/spfatal02.scn, spfatal02/testcase.h, spfatal03/Makefile.am, spfatal03/spfatal03.scn, spfatal03/testcase.h, spfatal04/Makefile.am, spfatal04/spfatal04.scn, spfatal04/testcase.h, spfatal05/Makefile.am, spfatal05/spfatal05.scn, spfatal05/testcase.h, spfatal06/Makefile.am, spfatal06/spfatal06.scn, spfatal06/testcase.h, spfatal07/Makefile.am, spfatal07/spfatal07.scn, spfatal07/testcase.h, spfatal08/Makefile.am, spfatal08/spfatal08.scn, spfatal08/testcase.h, spfatal09/Makefile.am, spfatal09/spfatal09.scn, spfatal09/testcase.h, spfatal10/Makefile.am, spfatal10/spfatal10.scn, spfatal10/testcase.h, spfatal_support/init.c, spfatal_support/system.h: New files.
Diffstat (limited to 'testsuites/sptests/spfatal10')
-rw-r--r--testsuites/sptests/spfatal10/Makefile.am27
-rw-r--r--testsuites/sptests/spfatal10/spfatal10.scn1
-rw-r--r--testsuites/sptests/spfatal10/testcase.h36
3 files changed, 64 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal10/Makefile.am b/testsuites/sptests/spfatal10/Makefile.am
new file mode 100644
index 0000000000..286fd3a9f2
--- /dev/null
+++ b/testsuites/sptests/spfatal10/Makefile.am
@@ -0,0 +1,27 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal10.exe
+spfatal10_exe_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal10.scn
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spfatal10_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spfatal10_exe_OBJECTS) $(spfatal10_exe_LDADD)
+LINK_LIBS = $(spfatal10_exe_LDLIBS)
+
+spfatal10.exe$(EXEEXT): $(spfatal10_exe_OBJECTS) $(spfatal10_exe_DEPENDENCIES)
+ @rm -f spfatal10.exe$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal10/spfatal10.scn b/testsuites/sptests/spfatal10/spfatal10.scn
new file mode 100644
index 0000000000..d3dcd3c360
--- /dev/null
+++ b/testsuites/sptests/spfatal10/spfatal10.scn
@@ -0,0 +1 @@
+Fatal error (Core NULL Configuration Table) hit
diff --git a/testsuites/sptests/spfatal10/testcase.h b/testsuites/sptests/spfatal10/testcase.h
new file mode 100644
index 0000000000..1d40f56dca
--- /dev/null
+++ b/testsuites/sptests/spfatal10/testcase.h
@@ -0,0 +1,36 @@
+/*
+ * Classic API Init task create failure
+ *
+ * $Id$
+ */
+
+/*
+ * Way too much stack space. Should generate a fatal error
+ * on the init task create.
+ */
+#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
+#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
+rtems_initialization_tasks_table Initialization_tasks[] = {
+ { rtems_build_name('I', 'N', 'I', ' '),
+ RTEMS_MINIMUM_STACK_SIZE,
+ 1,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ Init,
+ RTEMS_DEFAULT_MODES,
+ 0
+ }
+};
+#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
+#define CONFIGURE_INIT_TASK_TABLE_SIZE \
+ sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
+
+#define FATAL_ERROR_DESCRIPTION "Core NULL Configuration Table"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_NO_CONFIGURATION_TABLE
+
+void force_error()
+{
+ rtems_initialize_executive_early( NULL );
+ /* we will not run this far */
+}