diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-08-10 22:58:00 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-08-10 22:58:00 +0000 |
commit | 30c9b6a2c69bf2793f26c14963158c2abead18f5 (patch) | |
tree | 3e0c36d6c1c3fe9b2b07547e1de36a75e18ca603 /testsuites/sptests/spfatal23 | |
parent | 2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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/spfatal23')
-rw-r--r-- | testsuites/sptests/spfatal23/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/spfatal23/Makefile.am | 25 | ||||
-rw-r--r-- | testsuites/sptests/spfatal23/spfatal23.doc | 24 | ||||
-rw-r--r-- | testsuites/sptests/spfatal23/spfatal23.scn | 3 | ||||
-rw-r--r-- | testsuites/sptests/spfatal23/testcase.h | 24 |
5 files changed, 78 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal23/.cvsignore b/testsuites/sptests/spfatal23/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/spfatal23/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in 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/spfatal23/spfatal23.doc b/testsuites/sptests/spfatal23/spfatal23.doc new file mode 100644 index 0000000000..ebe641d036 --- /dev/null +++ b/testsuites/sptests/spfatal23/spfatal23.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: spfatal23 + +directives: + + _System_state_Set + rtems_shutdown_executive + +concepts: + ++ Ensure that shutting RTEMS down when the system state indicates it is + 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 */ +} |