summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-10 22:58:00 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-10 22:58:00 +0000
commit30c9b6a2c69bf2793f26c14963158c2abead18f5 (patch)
tree3e0c36d6c1c3fe9b2b07547e1de36a75e18ca603 /testsuites/sptests
parent2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-30c9b6a2c69bf2793f26c14963158c2abead18f5.tar.bz2
2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1658/cpukit * Makefile.am, configure.ac: If the system is not up, consider it a fatal error. This eliminated sp61 and added spfatal23. * spfatal23/.cvsignore, spfatal23/Makefile.am, spfatal23/spfatal23.doc, spfatal23/spfatal23.scn, spfatal23/testcase.h: New files. * sp61/.cvsignore, sp61/Makefile.am, sp61/init.c, sp61/sp61.doc, sp61/sp61.scn: Removed.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/ChangeLog10
-rw-r--r--testsuites/sptests/Makefile.am4
-rw-r--r--testsuites/sptests/configure.ac2
-rw-r--r--testsuites/sptests/sp61/Makefile.am28
-rw-r--r--testsuites/sptests/sp61/init.c46
-rw-r--r--testsuites/sptests/sp61/sp61.scn5
-rw-r--r--testsuites/sptests/spfatal23/.cvsignore (renamed from testsuites/sptests/sp61/.cvsignore)0
-rw-r--r--testsuites/sptests/spfatal23/Makefile.am25
-rw-r--r--testsuites/sptests/spfatal23/spfatal23.doc (renamed from testsuites/sptests/sp61/sp61.doc)6
-rw-r--r--testsuites/sptests/spfatal23/spfatal23.scn3
-rw-r--r--testsuites/sptests/spfatal23/testcase.h24
11 files changed, 68 insertions, 85 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index 8c26ec3d79..70f89dc607 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ PR 1658/cpukit
+ * Makefile.am, configure.ac: If the system is not up, consider it a
+ fatal error. This eliminated sp61 and added spfatal23.
+ * spfatal23/.cvsignore, spfatal23/Makefile.am, spfatal23/spfatal23.doc,
+ spfatal23/spfatal23.scn, spfatal23/testcase.h: New files.
+ * sp61/.cvsignore, sp61/Makefile.am, sp61/init.c, sp61/sp61.doc,
+ sp61/sp61.scn: Removed.
+
2010-08-10 Bharath Suri <bharath.s.jois@gmail.com>
PR 1663/testing
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 655ac4b84c..0f8c6f71b3 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -13,7 +13,7 @@ SUBDIRS = \
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 \
sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \
sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
- sp60 sp61 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
+ sp60 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
sp70 sp71 sp72 \
spassoc01 spchain spclockget spcoverage spobjgetnext \
spnotepad01 spprintk spprivenv01 spsize spstkalloc spthreadq01 \
@@ -22,7 +22,7 @@ SUBDIRS = \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 spfatal21 \
- spfatal22 \
+ spfatal22 spfatal23 \
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index f5c5c0756f..0de5cc5ec2 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -86,7 +86,6 @@ sp57/Makefile
sp58/Makefile
sp59/Makefile
sp60/Makefile
-sp61/Makefile
sp62/Makefile
sp63/Makefile
sp64/Makefile
@@ -127,6 +126,7 @@ spfatal19/Makefile
spfatal20/Makefile
spfatal21/Makefile
spfatal22/Makefile
+spfatal23/Makefile
spfifo01/Makefile
spfifo02/Makefile
spfifo03/Makefile
diff --git a/testsuites/sptests/sp61/Makefile.am b/testsuites/sptests/sp61/Makefile.am
deleted file mode 100644
index d1b979ec95..0000000000
--- a/testsuites/sptests/sp61/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-##
-## $Id$
-##
-
-MANAGERS = all
-
-rtems_tests_PROGRAMS = sp61
-sp61_SOURCES = init.c
-
-dist_rtems_tests_DATA = sp61.scn
-dist_rtems_tests_DATA += sp61.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-sp61_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
-
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(sp61_OBJECTS) $(sp61_LDADD)
-LINK_LIBS = $(sp61_LDLIBS)
-
-sp61$(EXEEXT): $(sp61_OBJECTS) $(sp61_DEPENDENCIES)
- @rm -f sp61$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/sp61/init.c b/testsuites/sptests/sp61/init.c
deleted file mode 100644
index d95d1267b2..0000000000
--- a/testsuites/sptests/sp61/init.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <tmacros.h>
-
-
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- puts( "\n\n*** TEST 61 ***" );
-
- puts( "Init - Set current System State to Shutdown" );
- _System_state_Set( SYSTEM_STATE_SHUTDOWN );
-
- puts( "Init - rtems_shutdown_executive when already shutdown" );
- rtems_shutdown_executive( 0 );
-
- puts( "Init - restore System State and shutdown for real" );
- _System_state_Set( SYSTEM_STATE_UP );
-
- puts( "*** END OF TEST 61 ***" );
- rtems_test_exit(0);
-}
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 2
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
-/* global variables */
diff --git a/testsuites/sptests/sp61/sp61.scn b/testsuites/sptests/sp61/sp61.scn
deleted file mode 100644
index b064f5816a..0000000000
--- a/testsuites/sptests/sp61/sp61.scn
+++ /dev/null
@@ -1,5 +0,0 @@
-*** TEST 61 ***
-Init - Set current System State to Shutdown
-Init - rtems_shutdown_executive when already shutdown
-Init - restore System State and shutdown for real
-*** END OF TEST 61 ***
diff --git a/testsuites/sptests/sp61/.cvsignore b/testsuites/sptests/spfatal23/.cvsignore
index 282522db03..282522db03 100644
--- a/testsuites/sptests/sp61/.cvsignore
+++ b/testsuites/sptests/spfatal23/.cvsignore
diff --git a/testsuites/sptests/spfatal23/Makefile.am b/testsuites/sptests/spfatal23/Makefile.am
new file mode 100644
index 0000000000..5a5fe4a48d
--- /dev/null
+++ b/testsuites/sptests/spfatal23/Makefile.am
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+rtems_tests_PROGRAMS = spfatal23
+spfatal23_SOURCES = ../spfatal_support/init.c \
+ ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal23.scn
+dist_rtems_tests_DATA += spfatal23.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
+
+LINK_OBJS = $(spfatal23_OBJECTS) $(spfatal23_LDADD)
+LINK_LIBS = $(spfatal23_LDLIBS)
+
+spfatal23$(EXEEXT): $(spfatal23_OBJECTS) $(spfatal23_DEPENDENCIES)
+ @rm -f spfatal23$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/sp61/sp61.doc b/testsuites/sptests/spfatal23/spfatal23.doc
index 163fed4238..ebe641d036 100644
--- a/testsuites/sptests/sp61/sp61.doc
+++ b/testsuites/sptests/spfatal23/spfatal23.doc
@@ -1,7 +1,7 @@
#
# $Id$
#
-# COPYRIGHT (c) 1989-2009.
+# COPYRIGHT (c) 1989-2010.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
@@ -11,7 +11,7 @@
This file describes the directives and concepts tested by this test set.
-test set name: sp61
+test set name: spfatal23
directives:
@@ -21,4 +21,4 @@ directives:
concepts:
+ Ensure that shutting RTEMS down when the system state indicates it is
- already shutdown does not do anything.
+ already shutdown is a fatal error.
diff --git a/testsuites/sptests/spfatal23/spfatal23.scn b/testsuites/sptests/spfatal23/spfatal23.scn
new file mode 100644
index 0000000000..ed080e2c0d
--- /dev/null
+++ b/testsuites/sptests/spfatal23/spfatal23.scn
@@ -0,0 +1,3 @@
+*** TEST FATAL SHUTDOWN WHEN NOT UP ***
+Fatal error (SHUTDOWN WHEN NOT UP) hit
+*** END OF TEST ***
diff --git a/testsuites/sptests/spfatal23/testcase.h b/testsuites/sptests/spfatal23/testcase.h
new file mode 100644
index 0000000000..e6da0b350f
--- /dev/null
+++ b/testsuites/sptests/spfatal23/testcase.h
@@ -0,0 +1,24 @@
+/*
+ * 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$
+ */
+
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#define FATAL_ERROR_TEST_NAME "SHUTDOWN WHEN NOT UP"
+#define FATAL_ERROR_DESCRIPTION "SHUTDOWN WHEN NOT UP"
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
+
+void force_error()
+{
+ _System_state_Set( SYSTEM_STATE_SHUTDOWN );
+ rtems_shutdown_executive( 0 );
+ /* we will not run this far */
+}