summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal14
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/spfatal14
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/spfatal14')
-rw-r--r--testsuites/sptests/spfatal14/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal14/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal14/spfatal14.doc24
-rw-r--r--testsuites/sptests/spfatal14/spfatal14.scn1
-rw-r--r--testsuites/sptests/spfatal14/testcase.h26
5 files changed, 82 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal14/.cvsignore b/testsuites/sptests/spfatal14/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal14/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal14/Makefile.am b/testsuites/sptests/spfatal14/Makefile.am
new file mode 100644
index 0000000000..051b6afe8b
--- /dev/null
+++ b/testsuites/sptests/spfatal14/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal14
+spfatal14_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal14.scn
+dist_rtems_tests_DATA += spfatal14.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=6
+
+LINK_OBJS = $(spfatal14_OBJECTS) $(spfatal14_LDADD)
+LINK_LIBS = $(spfatal14_LDLIBS)
+
+spfatal14$(EXEEXT): $(spfatal14_OBJECTS) $(spfatal14_DEPENDENCIES)
+ @rm -f spfatal14$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal14/spfatal14.doc b/testsuites/sptests/spfatal14/spfatal14.doc
new file mode 100644
index 0000000000..c7810e47bc
--- /dev/null
+++ b/testsuites/sptests/spfatal14/spfatal14.doc
@@ -0,0 +1,24 @@
+#
+# $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: spfatal14
+
+directives:
+
+ + open("dev/console")
+
+concepts:
+
++ fail to open stderr in open_dev_console.c
+
+
diff --git a/testsuites/sptests/spfatal14/spfatal14.scn b/testsuites/sptests/spfatal14/spfatal14.scn
new file mode 100644
index 0000000000..1e107abf61
--- /dev/null
+++ b/testsuites/sptests/spfatal14/spfatal14.scn
@@ -0,0 +1 @@
+Fatal error (fail to open stderr) hit
diff --git a/testsuites/sptests/spfatal14/testcase.h b/testsuites/sptests/spfatal14/testcase.h
new file mode 100644
index 0000000000..e9e95b62e0
--- /dev/null
+++ b/testsuites/sptests/spfatal14/testcase.h
@@ -0,0 +1,26 @@
+/*
+ * 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 "14"
+#define FATAL_ERROR_DESCRIPTION "fail to open stdout"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR 0x55544431
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+ /* we will not run this far */
+}