* 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.
This commit is contained in:
Sebastian Huber
2010-07-07 09:03:34 +00:00
parent 447345b1f5
commit 6091bc3a0e
30 changed files with 59 additions and 121 deletions

View File

@@ -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%

View File

@@ -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 \

View File

@@ -111,7 +111,6 @@ spfatal05/Makefile
spfatal06/Makefile
spfatal07/Makefile
spfatal08/Makefile
spfatal09/Makefile
spfatal10/Makefile
spfatal11/Makefile
spfatal12/Makefile

View File

@@ -1,2 +1,2 @@
*** TEST FATAL 1 ***
Fatal error (Classic API Init task create failure) hit
*** END OF TEST ***

View File

@@ -1,2 +1,2 @@
*** TEST FATAL 2 ***
Fatal error (Classic API Init task start failure) hit
*** END OF TEST ***

View File

@@ -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 ***

View File

@@ -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 */
}

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 4 ***
Fatal error (Classic API call rtems_fatal_error_occurred) hit
*** END OF TEST ***

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 5 ***
Fatal error (Core fall out of a task) hit
*** END OF TEST ***

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 6 ***
Fatal error (Core initialize with invalid stack hook) hit
*** END OF TEST ***

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 7 ***
Fatal error (Core Configuration Invalid ISR stack size) hit
*** END OF TEST ***

View File

@@ -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

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 8 ***
Fatal error (Core workspace too small) hit
*** END OF TEST ***

View File

@@ -1,2 +0,0 @@
Makefile
Makefile.in

View File

@@ -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

View File

@@ -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.

View File

@@ -1,2 +0,0 @@
*** TEST FATAL 9 ***
Fatal error (Core invalid workspace address) hit

View File

@@ -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 */
}

View File

@@ -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 ***

View File

@@ -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 ***

View File

@@ -1,2 +1,3 @@
*** TEST FATAL 12 ***
Fatal error (_Heap_Initialize fails during RTEMS initialization) hit
*** END OF TEST ***

View File

@@ -1 +1,2 @@
Fatal error (Configuration of unlimited and maximum of 0) hit
*** END OF TEST ***

View File

@@ -1 +1,2 @@
Fatal error (fail to open stderr) hit
Fatal error (fail to open stdout) hit
*** END OF TEST ***

View File

@@ -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 ***

View File

@@ -1 +1,2 @@
Fatal error (termios sem create #1) hit
*** END OF TEST ***

View File

@@ -1 +1,2 @@
Fatal error (termios sem create #2) hit
*** END OF TEST ***

View File

@@ -1 +1,2 @@
Fatal error (termios sem create #3) hit
*** END OF TEST ***

View File

@@ -1 +1,2 @@
Fatal error (termios sem create #4) hit
*** END OF TEST ***

View File

@@ -1,2 +1,2 @@
Fatal error (rtems_termios_initialize cannot create semaphore) hit
*** END OF TEST ***

View File

@@ -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();
}