summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 02:15:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 02:15:46 +0000
commit420607fdbaef910f91d5ec5d464dc469b702c578 (patch)
tree9de1114448a6283ad1abf2302f95ff2f48ec93f8
parent2010-06-22 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-420607fdbaef910f91d5ec5d464dc469b702c578.tar.bz2
2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new tests to generate fatal errors in rtems_termios_open(). * spfatal16/.cvsignore, spfatal16/Makefile.am, spfatal16/spfatal16.doc, spfatal16/spfatal16.scn, spfatal16/testcase.h, spfatal17/.cvsignore, spfatal17/Makefile.am, spfatal17/spfatal17.doc, spfatal17/spfatal17.scn, spfatal17/testcase.h, spfatal18/.cvsignore, spfatal18/Makefile.am, spfatal18/spfatal18.doc, spfatal18/spfatal18.scn, spfatal18/testcase.h, spfatal19/.cvsignore, spfatal19/Makefile.am, spfatal19/spfatal19.doc, spfatal19/spfatal19.scn, spfatal19/testcase.h: New files.
-rw-r--r--testsuites/sptests/ChangeLog13
-rw-r--r--testsuites/sptests/Makefile.am2
-rw-r--r--testsuites/sptests/configure.ac5
-rw-r--r--testsuites/sptests/spfatal16/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal16/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal16/spfatal16.doc22
-rw-r--r--testsuites/sptests/spfatal16/spfatal16.scn1
-rw-r--r--testsuites/sptests/spfatal16/testcase.h28
-rw-r--r--testsuites/sptests/spfatal17/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal17/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal17/spfatal17.doc22
-rw-r--r--testsuites/sptests/spfatal17/spfatal17.scn1
-rw-r--r--testsuites/sptests/spfatal17/testcase.h28
-rw-r--r--testsuites/sptests/spfatal18/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal18/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal18/spfatal18.doc22
-rw-r--r--testsuites/sptests/spfatal18/spfatal18.scn1
-rw-r--r--testsuites/sptests/spfatal18/testcase.h28
-rw-r--r--testsuites/sptests/spfatal19/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal19/Makefile.am29
-rw-r--r--testsuites/sptests/spfatal19/spfatal19.doc22
-rw-r--r--testsuites/sptests/spfatal19/spfatal19.scn1
-rw-r--r--testsuites/sptests/spfatal19/testcase.h28
23 files changed, 347 insertions, 1 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index a0729efbab..cc63920201 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,5 +1,18 @@
2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * Makefile.am, configure.ac: Add new tests to generate fatal errors in
+ rtems_termios_open().
+ * spfatal16/.cvsignore, spfatal16/Makefile.am, spfatal16/spfatal16.doc,
+ spfatal16/spfatal16.scn, spfatal16/testcase.h, spfatal17/.cvsignore,
+ spfatal17/Makefile.am, spfatal17/spfatal17.doc,
+ spfatal17/spfatal17.scn, spfatal17/testcase.h, spfatal18/.cvsignore,
+ spfatal18/Makefile.am, spfatal18/spfatal18.doc,
+ spfatal18/spfatal18.scn, spfatal18/testcase.h, spfatal19/.cvsignore,
+ spfatal19/Makefile.am, spfatal19/spfatal19.doc,
+ spfatal19/spfatal19.scn, spfatal19/testcase.h: New files.
+
+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().
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 6be431e12c..4bca915851 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -19,7 +19,7 @@ SUBDIRS = \
spstkalloc spthreadq01 spwatchdog spwkspace \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
- spfatal15 \
+ spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
spfifo01 spfifo02 spfifo03 spfifo04 spfifo08 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index e0b1e1964b..114a8665b3 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -114,6 +114,11 @@ spfatal12/Makefile
spfatal13/Makefile
spfatal14/Makefile
spfatal15/Makefile
+spfatal16/Makefile
+spfatal17/Makefile
+spfatal18/Makefile
+spfatal19/Makefile
+spfatal20/Makefile
spfifo01/Makefile
spfifo02/Makefile
spfifo03/Makefile
diff --git a/testsuites/sptests/spfatal16/.cvsignore b/testsuites/sptests/spfatal16/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal16/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal16/Makefile.am b/testsuites/sptests/spfatal16/Makefile.am
new file mode 100644
index 0000000000..ee9176812d
--- /dev/null
+++ b/testsuites/sptests/spfatal16/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal16
+spfatal16_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal16.scn
+dist_rtems_tests_DATA += spfatal16.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=5
+
+LINK_OBJS = $(spfatal16_OBJECTS) $(spfatal16_LDADD)
+LINK_LIBS = $(spfatal16_LDLIBS)
+
+spfatal16$(EXEEXT): $(spfatal16_OBJECTS) $(spfatal16_DEPENDENCIES)
+ @rm -f spfatal16$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal16/spfatal16.doc b/testsuites/sptests/spfatal16/spfatal16.doc
new file mode 100644
index 0000000000..b8659ff403
--- /dev/null
+++ b/testsuites/sptests/spfatal16/spfatal16.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: spfatal16
+
+directives:
+
+ rtems_termios_open
+
+concepts:
+
++ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal16/spfatal16.scn b/testsuites/sptests/spfatal16/spfatal16.scn
new file mode 100644
index 0000000000..f2123a84f6
--- /dev/null
+++ b/testsuites/sptests/spfatal16/spfatal16.scn
@@ -0,0 +1 @@
+Fatal error (termios sem create #1) hit
diff --git a/testsuites/sptests/spfatal16/testcase.h b/testsuites/sptests/spfatal16/testcase.h
new file mode 100644
index 0000000000..6a228381a6
--- /dev/null
+++ b/testsuites/sptests/spfatal16/testcase.h
@@ -0,0 +1,28 @@
+/*
+ * 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 termios.c
+ * rtems_semaphore_create( rtems_build_name ('T', 'R', 'r', c),...);
+ */
+
+#define FATAL_ERROR_TEST_NAME "16"
+#define FATAL_ERROR_DESCRIPTION "termios sem create #1"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+ /* we will not run this far */
+}
diff --git a/testsuites/sptests/spfatal17/.cvsignore b/testsuites/sptests/spfatal17/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal17/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal17/Makefile.am b/testsuites/sptests/spfatal17/Makefile.am
new file mode 100644
index 0000000000..16d0d1f8e2
--- /dev/null
+++ b/testsuites/sptests/spfatal17/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal17
+spfatal17_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal17.scn
+dist_rtems_tests_DATA += spfatal17.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=4
+
+LINK_OBJS = $(spfatal17_OBJECTS) $(spfatal17_LDADD)
+LINK_LIBS = $(spfatal17_LDLIBS)
+
+spfatal17$(EXEEXT): $(spfatal17_OBJECTS) $(spfatal17_DEPENDENCIES)
+ @rm -f spfatal17$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal17/spfatal17.doc b/testsuites/sptests/spfatal17/spfatal17.doc
new file mode 100644
index 0000000000..c5751327cf
--- /dev/null
+++ b/testsuites/sptests/spfatal17/spfatal17.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: spfatal17
+
+directives:
+
+ rtems_termios_open
+
+concepts:
+
++ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal17/spfatal17.scn b/testsuites/sptests/spfatal17/spfatal17.scn
new file mode 100644
index 0000000000..5ab85cfdf5
--- /dev/null
+++ b/testsuites/sptests/spfatal17/spfatal17.scn
@@ -0,0 +1 @@
+Fatal error (termios sem create #2) hit
diff --git a/testsuites/sptests/spfatal17/testcase.h b/testsuites/sptests/spfatal17/testcase.h
new file mode 100644
index 0000000000..d890f51a1e
--- /dev/null
+++ b/testsuites/sptests/spfatal17/testcase.h
@@ -0,0 +1,28 @@
+/*
+ * 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 termios.c
+ * rtems_semaphore_create( rtems_build_name ('T', 'R', 'x', c),...);
+ */
+
+#define FATAL_ERROR_TEST_NAME "17"
+#define FATAL_ERROR_DESCRIPTION "termios sem create #2"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+ /* we will not run this far */
+}
diff --git a/testsuites/sptests/spfatal18/.cvsignore b/testsuites/sptests/spfatal18/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal18/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal18/Makefile.am b/testsuites/sptests/spfatal18/Makefile.am
new file mode 100644
index 0000000000..53fad6432b
--- /dev/null
+++ b/testsuites/sptests/spfatal18/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal18
+spfatal18_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal18.scn
+dist_rtems_tests_DATA += spfatal18.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=3
+
+LINK_OBJS = $(spfatal18_OBJECTS) $(spfatal18_LDADD)
+LINK_LIBS = $(spfatal18_LDLIBS)
+
+spfatal18$(EXEEXT): $(spfatal18_OBJECTS) $(spfatal18_DEPENDENCIES)
+ @rm -f spfatal18$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal18/spfatal18.doc b/testsuites/sptests/spfatal18/spfatal18.doc
new file mode 100644
index 0000000000..a0ba715616
--- /dev/null
+++ b/testsuites/sptests/spfatal18/spfatal18.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: spfatal18
+
+directives:
+
+ rtems_termios_open
+
+concepts:
+
++ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal18/spfatal18.scn b/testsuites/sptests/spfatal18/spfatal18.scn
new file mode 100644
index 0000000000..61363b6cc2
--- /dev/null
+++ b/testsuites/sptests/spfatal18/spfatal18.scn
@@ -0,0 +1 @@
+Fatal error (termios sem create #3) hit
diff --git a/testsuites/sptests/spfatal18/testcase.h b/testsuites/sptests/spfatal18/testcase.h
new file mode 100644
index 0000000000..9e48b874f6
--- /dev/null
+++ b/testsuites/sptests/spfatal18/testcase.h
@@ -0,0 +1,28 @@
+/*
+ * 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 termios.c
+ * rtems_semaphore_create( rtems_build_name ('T', 'R', 'o', c),...);
+ */
+
+#define FATAL_ERROR_TEST_NAME "18"
+#define FATAL_ERROR_DESCRIPTION "termios sem create #3"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+ /* we will not run this far */
+}
diff --git a/testsuites/sptests/spfatal19/.cvsignore b/testsuites/sptests/spfatal19/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spfatal19/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spfatal19/Makefile.am b/testsuites/sptests/spfatal19/Makefile.am
new file mode 100644
index 0000000000..987dd2b196
--- /dev/null
+++ b/testsuites/sptests/spfatal19/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal19
+spfatal19_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/consume_sems.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal19.scn
+dist_rtems_tests_DATA += spfatal19.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=2
+
+LINK_OBJS = $(spfatal19_OBJECTS) $(spfatal19_LDADD)
+LINK_LIBS = $(spfatal19_LDLIBS)
+
+spfatal19$(EXEEXT): $(spfatal19_OBJECTS) $(spfatal19_DEPENDENCIES)
+ @rm -f spfatal19$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal19/spfatal19.doc b/testsuites/sptests/spfatal19/spfatal19.doc
new file mode 100644
index 0000000000..c539a171c8
--- /dev/null
+++ b/testsuites/sptests/spfatal19/spfatal19.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: spfatal19
+
+directives:
+
+ rtems_termios_open
+
+concepts:
+
++ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal19/spfatal19.scn b/testsuites/sptests/spfatal19/spfatal19.scn
new file mode 100644
index 0000000000..7a9a2f5f08
--- /dev/null
+++ b/testsuites/sptests/spfatal19/spfatal19.scn
@@ -0,0 +1 @@
+Fatal error (termios sem create #4) hit
diff --git a/testsuites/sptests/spfatal19/testcase.h b/testsuites/sptests/spfatal19/testcase.h
new file mode 100644
index 0000000000..1157a92c18
--- /dev/null
+++ b/testsuites/sptests/spfatal19/testcase.h
@@ -0,0 +1,28 @@
+/*
+ * 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 termios.c
+ * rtems_semaphore_create( rtems_build_name ('T', 'R', 'i', c),...);
+ */
+
+#define FATAL_ERROR_TEST_NAME "19"
+#define FATAL_ERROR_DESCRIPTION "termios sem create #4"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+ CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+ /* we will not run this far */
+}