diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-07 09:03:34 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-07 09:03:34 +0000 |
commit | 6091bc3a0edde9bf45928d19c8d00cd3e1b1b62a (patch) | |
tree | 0426f935e0794ef6f392d6c9e677c5899e72646c | |
parent | 2010-07-06 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-6091bc3a0edde9bf45928d19c8d00cd3e1b1b62a.tar.bz2 |
2010-07-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
* spfatal09/.cvsignore, spfatal09/Makefile.am,
spfatal09/spfatal09.doc, spfatal09/spfatal09.scn,
spfatal09/testcase.h: Removed files.
* Makefile.am, configure.ac: Reflect changes above.
* spfatal_support/init.c: Print end of test message in case of
success. Stop multitasking in the fatal error extension.
* spfatal03/testcase.h, spfatal07/testcase.h: Use printk() instead of
puts().
* spfatal01/spfatal01.scn, spfatal02/spfatal02.scn,
spfatal03/spfatal03.scn, spfatal04/spfatal04.scn,
spfatal05/spfatal05.scn, spfatal06/spfatal06.scn,
spfatal07/spfatal07.scn, spfatal08/spfatal08.scn,
spfatal10/spfatal10.scn, spfatal11/spfatal11.scn,
spfatal12/spfatal12.scn, spfatal13/spfatal13.scn,
spfatal14/spfatal14.scn, spfatal15/spfatal15.scn,
spfatal16/spfatal16.scn, spfatal17/spfatal17.scn,
spfatal18/spfatal18.scn, spfatal19/spfatal19.scn,
spfatal20/spfatal20.scn: Update.
30 files changed, 59 insertions, 121 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index b157e8c291..6439eeb003 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,24 @@ +2010-07-08 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * spfatal09/.cvsignore, spfatal09/Makefile.am, + spfatal09/spfatal09.doc, spfatal09/spfatal09.scn, + spfatal09/testcase.h: Removed files. + * Makefile.am, configure.ac: Reflect changes above. + * spfatal_support/init.c: Print end of test message in case of + success. Stop multitasking in the fatal error extension. + * spfatal03/testcase.h, spfatal07/testcase.h: Use printk() instead of + puts(). + * spfatal01/spfatal01.scn, spfatal02/spfatal02.scn, + spfatal03/spfatal03.scn, spfatal04/spfatal04.scn, + spfatal05/spfatal05.scn, spfatal06/spfatal06.scn, + spfatal07/spfatal07.scn, spfatal08/spfatal08.scn, + spfatal10/spfatal10.scn, spfatal11/spfatal11.scn, + spfatal12/spfatal12.scn, spfatal13/spfatal13.scn, + spfatal14/spfatal14.scn, spfatal15/spfatal15.scn, + spfatal16/spfatal16.scn, spfatal17/spfatal17.scn, + spfatal18/spfatal18.scn, spfatal19/spfatal19.scn, + spfatal20/spfatal20.scn: Update. + 2010-07-06 Joel Sherrill <joel.sherrilL@OARcorp.com> * sp21/init.c, sp21/sp21.scn: Tidy up with one last case to get 100% diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 24894b1d28..bfcacda06a 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -19,7 +19,7 @@ SUBDIRS = \ spstkalloc spthreadq01 spwatchdog spwkspace \ sperror01 sperror02 sperror03 \ spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \ - spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \ + spfatal08 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \ spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \ spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \ spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \ diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index aef90cdb00..a69309dd24 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -111,7 +111,6 @@ spfatal05/Makefile spfatal06/Makefile spfatal07/Makefile spfatal08/Makefile -spfatal09/Makefile spfatal10/Makefile spfatal11/Makefile spfatal12/Makefile diff --git a/testsuites/sptests/spfatal01/spfatal01.scn b/testsuites/sptests/spfatal01/spfatal01.scn index 33ad878e93..d3f2c1efc9 100644 --- a/testsuites/sptests/spfatal01/spfatal01.scn +++ b/testsuites/sptests/spfatal01/spfatal01.scn @@ -1,2 +1,2 @@ -*** TEST FATAL 1 *** Fatal error (Classic API Init task create failure) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal02/spfatal02.scn b/testsuites/sptests/spfatal02/spfatal02.scn index 3700f68968..c4ad326e72 100644 --- a/testsuites/sptests/spfatal02/spfatal02.scn +++ b/testsuites/sptests/spfatal02/spfatal02.scn @@ -1,2 +1,2 @@ -*** TEST FATAL 2 *** Fatal error (Classic API Init task start failure) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal03/spfatal03.scn b/testsuites/sptests/spfatal03/spfatal03.scn index d00d5d8d32..10ca3c07a0 100644 --- a/testsuites/sptests/spfatal03/spfatal03.scn +++ b/testsuites/sptests/spfatal03/spfatal03.scn @@ -1,3 +1,5 @@ *** TEST FATAL 3 *** Create semaphore S0 Obtain semaphore in dispatching critical section +Fatal error (Core Mutex obtain in critical section) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal03/testcase.h b/testsuites/sptests/spfatal03/testcase.h index ddb3577b85..58e3f51b09 100644 --- a/testsuites/sptests/spfatal03/testcase.h +++ b/testsuites/sptests/spfatal03/testcase.h @@ -36,15 +36,15 @@ void force_error(void) &mutex ); directive_failed( status, "rtems_semaphore_create of S0"); - puts("Create semaphore S0"); + printk("Create semaphore S0\n"); - puts("Obtain semaphore in dispatching critical section"); + printk("Obtain semaphore in dispatching critical section\n"); _Thread_Disable_dispatch(); status = rtems_semaphore_obtain( mutex, RTEMS_DEFAULT_OPTIONS, 0 ); /* !!! SHOULD NOT RETURN FROM THE ABOVE CALL */ _Thread_Enable_dispatch(); - puts("ERROR -- Obtain semaphore should not have returned"); + printk("ERROR -- Obtain semaphore should not have returned\n"); /* we will not run this far */ } diff --git a/testsuites/sptests/spfatal04/spfatal04.scn b/testsuites/sptests/spfatal04/spfatal04.scn index 5f7daa2fe4..1146aaece6 100644 --- a/testsuites/sptests/spfatal04/spfatal04.scn +++ b/testsuites/sptests/spfatal04/spfatal04.scn @@ -1,2 +1,3 @@ *** TEST FATAL 4 *** Fatal error (Classic API call rtems_fatal_error_occurred) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal05/spfatal05.scn b/testsuites/sptests/spfatal05/spfatal05.scn index bc0bbc88aa..da6d123fc0 100644 --- a/testsuites/sptests/spfatal05/spfatal05.scn +++ b/testsuites/sptests/spfatal05/spfatal05.scn @@ -1,2 +1,3 @@ *** TEST FATAL 5 *** Fatal error (Core fall out of a task) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal06/spfatal06.scn b/testsuites/sptests/spfatal06/spfatal06.scn index 56fbbb2125..c1cd75ee65 100644 --- a/testsuites/sptests/spfatal06/spfatal06.scn +++ b/testsuites/sptests/spfatal06/spfatal06.scn @@ -1,2 +1,3 @@ *** TEST FATAL 6 *** Fatal error (Core initialize with invalid stack hook) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal07/spfatal07.scn b/testsuites/sptests/spfatal07/spfatal07.scn index 8c21d25d12..5cabb76587 100644 --- a/testsuites/sptests/spfatal07/spfatal07.scn +++ b/testsuites/sptests/spfatal07/spfatal07.scn @@ -1,2 +1,3 @@ *** TEST FATAL 7 *** Fatal error (Core Configuration Invalid ISR stack size) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal07/testcase.h b/testsuites/sptests/spfatal07/testcase.h index 8ac826c799..77ffab9a06 100644 --- a/testsuites/sptests/spfatal07/testcase.h +++ b/testsuites/sptests/spfatal07/testcase.h @@ -44,9 +44,9 @@ void force_error() Configuration.interrupt_stack_size = (STACK_MINIMUM_SIZE-1); rtems_initialize_data_structures(); #else - puts( + printk( "WARNING - Test not applicable on this target architecture.\n" - "WARNING - Only applicable when CPU_ALLOCATE_INTERRUPT_STACK == TRUE." + "WARNING - Only applicable when CPU_ALLOCATE_INTERRUPT_STACK == TRUE.\n" ); rtems_test_exit(0); #endif diff --git a/testsuites/sptests/spfatal08/spfatal08.scn b/testsuites/sptests/spfatal08/spfatal08.scn index d687fabda0..a584984b49 100644 --- a/testsuites/sptests/spfatal08/spfatal08.scn +++ b/testsuites/sptests/spfatal08/spfatal08.scn @@ -1,2 +1,3 @@ *** TEST FATAL 8 *** Fatal error (Core workspace too small) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal09/.cvsignore b/testsuites/sptests/spfatal09/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/testsuites/sptests/spfatal09/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/testsuites/sptests/spfatal09/Makefile.am b/testsuites/sptests/spfatal09/Makefile.am deleted file mode 100644 index f42a5783f7..0000000000 --- a/testsuites/sptests/spfatal09/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## -## $Id$ -## - -MANAGERS = all - -rtems_tests_PROGRAMS = spfatal09 -spfatal09_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h testcase.h - -dist_rtems_tests_DATA = spfatal09.scn -dist_rtems_tests_DATA += spfatal09.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -spfatal09_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(spfatal09_OBJECTS) $(spfatal09_LDADD) -LINK_LIBS = $(spfatal09_LDLIBS) - -spfatal09$(EXEEXT): $(spfatal09_OBJECTS) $(spfatal09_DEPENDENCIES) - @rm -f spfatal09$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spfatal09/spfatal09.doc b/testsuites/sptests/spfatal09/spfatal09.doc deleted file mode 100644 index 9f7be40af0..0000000000 --- a/testsuites/sptests/spfatal09/spfatal09.doc +++ /dev/null @@ -1,23 +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: spfatal09 - -directives: - - None specifically. - -concepts: - -+ Ensure that configuring with an invalid workspace base address is - properly handled as a fatal error. diff --git a/testsuites/sptests/spfatal09/spfatal09.scn b/testsuites/sptests/spfatal09/spfatal09.scn deleted file mode 100644 index 06974a108d..0000000000 --- a/testsuites/sptests/spfatal09/spfatal09.scn +++ /dev/null @@ -1,2 +0,0 @@ -*** TEST FATAL 9 *** -Fatal error (Core invalid workspace address) hit diff --git a/testsuites/sptests/spfatal09/testcase.h b/testsuites/sptests/spfatal09/testcase.h deleted file mode 100644 index 7560f3fe12..0000000000 --- a/testsuites/sptests/spfatal09/testcase.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Classic API Init task create failure - * - * COPYRIGHT (c) 1989-2008. - * 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$ - */ - -/* - * Way too much stack space. Should generate a fatal error - * on the init task create. - */ -#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE -#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE -rtems_initialization_tasks_table Initialization_tasks[] = { - { rtems_build_name('I', 'N', 'I', ' '), - RTEMS_MINIMUM_STACK_SIZE, - 1, - RTEMS_DEFAULT_ATTRIBUTES, - Init, - RTEMS_DEFAULT_MODES, - 0 - } -}; -#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks -#define CONFIGURE_INIT_TASK_TABLE_SIZE \ - sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) - -#define FATAL_ERROR_TEST_NAME "9" -#define FATAL_ERROR_DESCRIPTION "Core invalid workspace address" -#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE -#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE -#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS - -void force_error() -{ - Configuration.work_space_start = NULL; - - rtems_initialize_data_structures(); - /* we will not run this far */ -} diff --git a/testsuites/sptests/spfatal10/spfatal10.scn b/testsuites/sptests/spfatal10/spfatal10.scn index b613722f3e..9c63bd70ae 100644 --- a/testsuites/sptests/spfatal10/spfatal10.scn +++ b/testsuites/sptests/spfatal10/spfatal10.scn @@ -1,3 +1,4 @@ *** TEST FATAL 10 *** -assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal10/testcase.h", line 20, function: Init +assertion "forced" failed: file "testsuites/sptests/spfatal10/testcase.h", line 23, function: Init Fatal error (asserting with non-NULL strings...) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal11/spfatal11.scn b/testsuites/sptests/spfatal11/spfatal11.scn index ac067533cd..90f399cdab 100644 --- a/testsuites/sptests/spfatal11/spfatal11.scn +++ b/testsuites/sptests/spfatal11/spfatal11.scn @@ -1,5 +1,4 @@ *** TEST FATAL 11 *** -asserting with non-NULL strings... -assertion "forced" failed: file "../../../../../../../rtems/c/src/../../testsuites/sptests/spfatal11/testcase.h", line 21 +assertion "forced" failed: file "testsuites/sptests/spfatal11/testcase.h", line 23 Fatal error (asserting with non-NULL strings...) hit - +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal12/spfatal12.scn b/testsuites/sptests/spfatal12/spfatal12.scn index f96b503104..a5cfe0cada 100644 --- a/testsuites/sptests/spfatal12/spfatal12.scn +++ b/testsuites/sptests/spfatal12/spfatal12.scn @@ -1,2 +1,3 @@ *** TEST FATAL 12 *** Fatal error (_Heap_Initialize fails during RTEMS initialization) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal13/spfatal13.scn b/testsuites/sptests/spfatal13/spfatal13.scn index 9d0f1dcc92..80dc0d3c2e 100644 --- a/testsuites/sptests/spfatal13/spfatal13.scn +++ b/testsuites/sptests/spfatal13/spfatal13.scn @@ -1 +1,2 @@ Fatal error (Configuration of unlimited and maximum of 0) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal14/spfatal14.scn b/testsuites/sptests/spfatal14/spfatal14.scn index 1e107abf61..f1704fac0b 100644 --- a/testsuites/sptests/spfatal14/spfatal14.scn +++ b/testsuites/sptests/spfatal14/spfatal14.scn @@ -1 +1,2 @@ -Fatal error (fail to open stderr) hit +Fatal error (fail to open stdout) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal15/spfatal15.scn b/testsuites/sptests/spfatal15/spfatal15.scn index 3515e70214..7a016a35f0 100644 --- a/testsuites/sptests/spfatal15/spfatal15.scn +++ b/testsuites/sptests/spfatal15/spfatal15.scn @@ -1,5 +1,2 @@ -*** TEST FATAL 15 *** -Fatal error (fail to open stderr) NOT hit -[joel@localhost spfatal15]$ make clean all >/dev/null && sis -i *.exe -sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run Fatal error (fail to open stderr) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal16/spfatal16.scn b/testsuites/sptests/spfatal16/spfatal16.scn index f2123a84f6..ccf6ef8b1c 100644 --- a/testsuites/sptests/spfatal16/spfatal16.scn +++ b/testsuites/sptests/spfatal16/spfatal16.scn @@ -1 +1,2 @@ Fatal error (termios sem create #1) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal17/spfatal17.scn b/testsuites/sptests/spfatal17/spfatal17.scn index 5ab85cfdf5..fa83ca3500 100644 --- a/testsuites/sptests/spfatal17/spfatal17.scn +++ b/testsuites/sptests/spfatal17/spfatal17.scn @@ -1 +1,2 @@ Fatal error (termios sem create #2) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal18/spfatal18.scn b/testsuites/sptests/spfatal18/spfatal18.scn index 61363b6cc2..752017e565 100644 --- a/testsuites/sptests/spfatal18/spfatal18.scn +++ b/testsuites/sptests/spfatal18/spfatal18.scn @@ -1 +1,2 @@ Fatal error (termios sem create #3) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal19/spfatal19.scn b/testsuites/sptests/spfatal19/spfatal19.scn index 7a9a2f5f08..85a72ac530 100644 --- a/testsuites/sptests/spfatal19/spfatal19.scn +++ b/testsuites/sptests/spfatal19/spfatal19.scn @@ -1 +1,2 @@ Fatal error (termios sem create #4) hit +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal20/spfatal20.scn b/testsuites/sptests/spfatal20/spfatal20.scn index ae8d11f127..1c3c529bc6 100644 --- a/testsuites/sptests/spfatal20/spfatal20.scn +++ b/testsuites/sptests/spfatal20/spfatal20.scn @@ -1,2 +1,2 @@ Fatal error (rtems_termios_initialize cannot create semaphore) hit - +*** END OF TEST *** diff --git a/testsuites/sptests/spfatal_support/init.c b/testsuites/sptests/spfatal_support/init.c index 5e2fce1baf..376e21b839 100644 --- a/testsuites/sptests/spfatal_support/init.c +++ b/testsuites/sptests/spfatal_support/init.c @@ -149,6 +149,14 @@ void Fatal_extension( printk( ")\n" ); } - /* return and let the CPU halt */ + if ( + source == FATAL_ERROR_EXPECTED_SOURCE + && is_internal == FATAL_ERROR_EXPECTED_IS_INTERNAL + && error == FATAL_ERROR_EXPECTED_ERROR + ) { + printk( "*** END OF TEST ***\n" ); + } + + _Thread_Stop_multitasking(); } |