summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal15
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 01:28:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 01:28:13 +0000
commit5d8a0bab42122a0d1d60334d7262546dcbbc116c (patch)
treea4e06d3f9b2f8632be492b3f650baf524b3dfa03 /testsuites/sptests/spfatal15
parent2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-5d8a0bab42122a0d1d60334d7262546dcbbc116c.tar.bz2
2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, spfatal_support/init.c, spfatal_support/system.h: Add new tests to generate fatal errors in open_dev_console(). * spfatal14/.cvsignore, spfatal14/Makefile.am, spfatal14/spfatal14.doc, spfatal14/spfatal14.scn, spfatal14/testcase.h, spfatal15/.cvsignore, spfatal15/Makefile.am, spfatal15/spfatal15.doc, spfatal15/spfatal15.scn, spfatal15/testcase.h, spfatal_support/consume_sems.c: New files.
Diffstat (limited to 'testsuites/sptests/spfatal15')
-rw-r--r--testsuites/sptests/spfatal15/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal15/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal15/spfatal15.doc22
-rw-r--r--testsuites/sptests/spfatal15/spfatal15.scn5
-rw-r--r--testsuites/sptests/spfatal15/testcase.h25
5 files changed, 83 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal15/.cvsignore b/testsuites/sptests/spfatal15/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal15/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal15/Makefile.am b/testsuites/sptests/spfatal15/Makefile.am
new file mode 100644
index 0000000000..47d2848099
--- /dev/null
+++ b/testsuites/sptests/spfatal15/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal15
+spfatal15_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal15.scn
+dist_rtems_tests_DATA += spfatal15.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -DSEMAPHORES_REMAINING=7
+
+LINK_OBJS = $(spfatal15_OBJECTS) $(spfatal15_LDADD)
+LINK_LIBS = $(spfatal15_LDLIBS)
+
+spfatal15$(EXEEXT): $(spfatal15_OBJECTS) $(spfatal15_DEPENDENCIES)
+ @rm -f spfatal15$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal15/spfatal15.doc b/testsuites/sptests/spfatal15/spfatal15.doc
new file mode 100644
index 0000000000..12b5763ac6
--- /dev/null
+++ b/testsuites/sptests/spfatal15/spfatal15.doc
@@ -0,0 +1,22 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2010.
+# 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spfatal15
+
+directives:
+
+ + open("dev/console")
+
+concepts:
+
++ fail to open stderr in open_dev_console.c
diff --git a/testsuites/sptests/spfatal15/spfatal15.scn b/testsuites/sptests/spfatal15/spfatal15.scn
new file mode 100644
index 0000000000..3515e70214
--- /dev/null
+++ b/testsuites/sptests/spfatal15/spfatal15.scn
@@ -0,0 +1,5 @@
+*** TEST FATAL 15 ***
+Fatal error (fail to open stderr) NOT hit
+[joel@localhost spfatal15]$ make clean all >/dev/null && sis -i *.exe
+sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run
+Fatal error (fail to open stderr) hit
diff --git a/testsuites/sptests/spfatal15/testcase.h b/testsuites/sptests/spfatal15/testcase.h
new file mode 100644
index 0000000000..66ca243917
--- /dev/null
+++ b/testsuites/sptests/spfatal15/testcase.h
@@ -0,0 +1,25 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * 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$
+ */
+
+/* generate fatal errors in open_dev_console.c */
+#define FATAL_ERROR_TEST_NAME "15"
+#define FATAL_ERROR_DESCRIPTION "fail to open stderr"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR 0x55544432
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ { consume_semaphores_initialize, NULL, NULL, NULL, NULL, NULL }
+
+void force_error()
+{
+ /* we will not run this far */
+}