From 30c9b6a2c69bf2793f26c14963158c2abead18f5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Aug 2010 22:58:00 +0000 Subject: 2010-08-10 Joel Sherrill 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. --- testsuites/sptests/ChangeLog | 10 +++++++ testsuites/sptests/Makefile.am | 4 +-- testsuites/sptests/configure.ac | 2 +- testsuites/sptests/sp61/.cvsignore | 2 -- testsuites/sptests/sp61/Makefile.am | 28 ------------------ testsuites/sptests/sp61/init.c | 46 ------------------------------ testsuites/sptests/sp61/sp61.doc | 24 ---------------- testsuites/sptests/sp61/sp61.scn | 5 ---- testsuites/sptests/spfatal23/.cvsignore | 2 ++ testsuites/sptests/spfatal23/Makefile.am | 25 ++++++++++++++++ testsuites/sptests/spfatal23/spfatal23.doc | 24 ++++++++++++++++ testsuites/sptests/spfatal23/spfatal23.scn | 3 ++ testsuites/sptests/spfatal23/testcase.h | 24 ++++++++++++++++ 13 files changed, 91 insertions(+), 108 deletions(-) delete mode 100644 testsuites/sptests/sp61/.cvsignore delete mode 100644 testsuites/sptests/sp61/Makefile.am delete mode 100644 testsuites/sptests/sp61/init.c delete mode 100644 testsuites/sptests/sp61/sp61.doc delete mode 100644 testsuites/sptests/sp61/sp61.scn create mode 100644 testsuites/sptests/spfatal23/.cvsignore create mode 100644 testsuites/sptests/spfatal23/Makefile.am create mode 100644 testsuites/sptests/spfatal23/spfatal23.doc create mode 100644 testsuites/sptests/spfatal23/spfatal23.scn create mode 100644 testsuites/sptests/spfatal23/testcase.h (limited to 'testsuites/sptests') 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 + + 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 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/.cvsignore b/testsuites/sptests/sp61/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/testsuites/sptests/sp61/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in 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 - - -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 - -/* global variables */ diff --git a/testsuites/sptests/sp61/sp61.doc b/testsuites/sptests/sp61/sp61.doc deleted file mode 100644 index 163fed4238..0000000000 --- a/testsuites/sptests/sp61/sp61.doc +++ /dev/null @@ -1,24 +0,0 @@ -# -# $Id$ -# -# 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. -# - -This file describes the directives and concepts tested by this test set. - -test set name: sp61 - -directives: - - _System_state_Set - rtems_shutdown_executive - -concepts: - -+ Ensure that shutting RTEMS down when the system state indicates it is - already shutdown does not do anything. 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/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 */ +} -- cgit v1.2.3