summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 13:44:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-06 13:44:22 +0000
commit70a4809f8413204e8a93d4384b239f3c73278eb2 (patch)
tree401595a356a41a646143d9729287eb1fabac5218 /testsuites/sptests/spfatal
parent2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-70a4809f8413204e8a93d4384b239f3c73278eb2.tar.bz2
2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Remove obsolete test now that the numbered spfatal tests appear to cover all fatal error cases. * spfatal/.cvsignore, spfatal/Makefile.am, spfatal/README, spfatal/fatal.c, spfatal/init.c, spfatal/puterr.c, spfatal/spfatal.doc, spfatal/spfatal.scn, spfatal/system.h, spfatal/task1.c: Removed.
Diffstat (limited to 'testsuites/sptests/spfatal')
-rw-r--r--testsuites/sptests/spfatal/.cvsignore2
-rw-r--r--testsuites/sptests/spfatal/Makefile.am28
-rw-r--r--testsuites/sptests/spfatal/README8
-rw-r--r--testsuites/sptests/spfatal/fatal.c134
-rw-r--r--testsuites/sptests/spfatal/init.c50
-rw-r--r--testsuites/sptests/spfatal/puterr.c67
-rw-r--r--testsuites/sptests/spfatal/spfatal.doc27
-rw-r--r--testsuites/sptests/spfatal/spfatal.scn8
-rw-r--r--testsuites/sptests/spfatal/system.h74
-rw-r--r--testsuites/sptests/spfatal/task1.c28
10 files changed, 0 insertions, 426 deletions
diff --git a/testsuites/sptests/spfatal/.cvsignore b/testsuites/sptests/spfatal/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/testsuites/sptests/spfatal/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/testsuites/sptests/spfatal/Makefile.am b/testsuites/sptests/spfatal/Makefile.am
deleted file mode 100644
index 111323c88d..0000000000
--- a/testsuites/sptests/spfatal/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-##
-## $Id$
-##
-
-MANAGERS = all
-
-rtems_tests_PROGRAMS = spfatal
-spfatal_SOURCES = init.c puterr.c fatal.c task1.c system.h
-
-dist_rtems_tests_DATA = spfatal.scn
-dist_rtems_tests_DATA += spfatal.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-spfatal_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
-
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spfatal_OBJECTS) $(spfatal_LDADD)
-LINK_LIBS = $(spfatal_LDLIBS)
-
-spfatal$(EXEEXT): $(spfatal_OBJECTS) $(spfatal_DEPENDENCIES)
- @rm -f spfatal$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal/README b/testsuites/sptests/spfatal/README
deleted file mode 100644
index ad56f040b7..0000000000
--- a/testsuites/sptests/spfatal/README
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# $Id$
-#
-
-This test depends on tricks to test the fatal error paths in the
-RTEMS executive initialization path. These tricks have gotten
-out of sync with the implementation. So this test is no longer
-included in the build set.
diff --git a/testsuites/sptests/spfatal/fatal.c b/testsuites/sptests/spfatal/fatal.c
deleted file mode 100644
index a87e7797d6..0000000000
--- a/testsuites/sptests/spfatal/fatal.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Fatal Error Test
- *
- * NOTE:
- *
- * This test actually modifies the Configuration table and restarts
- * the executive. It is very carefully constructed to do this and
- * uses the Configuration very carefully.
- *
- * 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$
- */
-
-#include "system.h"
-
-#include <setjmp.h>
-
-char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT;
-
-typedef enum {
- FATAL_WORKSPACE_OF_ZERO,
- FATAL_NULL_WORKSPACE,
- FATAL_WORKSPACE_TOO_SMALL,
- FATAL_TASK_CREATE,
- FATAL_TASK_START
-} Fatal_errors_t;
-
-#define FATAL_LAST FATAL_TASK_START
-
-volatile Fatal_errors_t Case_in_switch;
-
-rtems_status_code Expected_Errors[] = {
- RTEMS_UNSATISFIED,
- RTEMS_INVALID_ADDRESS,
- RTEMS_UNSATISFIED,
- RTEMS_INVALID_PRIORITY,
- RTEMS_TASK_EXITTED
-};
-
-rtems_status_code Error_Happened[ FATAL_LAST + 1];
-
-jmp_buf Restart_Context;
-
-/*
- * We depend on this being zeroed during initialization. This
- * occurs automatically because this is part of the BSS.
- */
-
-uint32_t First_Time_Through;
-
-void Process_case();
-
-rtems_extension Fatal_extension(
- uint32_t source,
- bool is_internal,
- uint32_t error
-)
-{
- int index;
-
- Error_Happened[ Case_in_switch ] = error;
-
- if ( First_Time_Through == 0 ) {
- Case_in_switch = FATAL_WORKSPACE_OF_ZERO;
- First_Time_Through = 1;
- setjmp( Restart_Context );
- } else if ( Case_in_switch == FATAL_LAST ) {
-
- /*
- * Depending on the C library we use, we cannot get the
- * task exitted error so do not check for it.
- */
-
- puts( "*** TEST FATAL ***" );
- for ( index=0 ; index< FATAL_LAST ; index++ )
- put_error( Error_Happened[ index ], Expected_Errors[ index ] );
- puts( "NOT TESTING FATAL ERROR WHEN TASK EXITS -- C LIBRARY CATCHES THIS" );
- puts( "*** END OF TEST FATAL ***" );
-
- /*
- * returns to the default fatal error handler instead of
- * calling rtems_shutdown_executive
- */
- return;
-
- } else {
-
- longjmp( Restart_Context, 1 );
- }
-
- Process_case();
-}
-
-
-
-void Process_case()
-{
- switch ( Case_in_switch ) {
- case FATAL_WORKSPACE_OF_ZERO:
- New_Configuration = rtems_configuration_get_table();
- New_Configuration.work_space_start = NULL;
- Case_in_switch = FATAL_NULL_WORKSPACE;
- break;
-
- case FATAL_NULL_WORKSPACE:
- New_Configuration.work_space_start = Workspace;
- New_Configuration.work_space_size = 256;
- Case_in_switch = FATAL_WORKSPACE_TOO_SMALL;
- break;
-
- case FATAL_WORKSPACE_TOO_SMALL:
- Initialization_tasks[ 0 ].initial_priority = RTEMS_CURRENT_PRIORITY;
- New_Configuration.work_space_size = sizeof( Workspace );
- Case_in_switch = FATAL_TASK_CREATE;
- break;
-
- case FATAL_TASK_CREATE:
- Initialization_tasks[ 0 ].initial_priority = 1;
- Initialization_tasks[ 0 ].entry_point = NULL;
- Case_in_switch = FATAL_TASK_START;
- break;
-
- case FATAL_TASK_START:
- /* this extension exits the test */
- Initialization_tasks[ 0 ].entry_point = Init;
- break;
- }
- rtems_initialize_data_structures( &New_Configuration );
-}
diff --git a/testsuites/sptests/spfatal/init.c b/testsuites/sptests/spfatal/init.c
deleted file mode 100644
index d16e98a02b..0000000000
--- a/testsuites/sptests/spfatal/init.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility for creating
- * and starting the tasks that make up the test. If the time of day
- * clock is required for the test, it should also be set to a known
- * value by this function.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * 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 CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- rtems_status_code status;
-
- Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
-
- status = rtems_task_create(
- Task_name[ 1 ],
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &Task_id[ 1 ]
- );
- directive_failed( status, "rtems_task_create of TA1" );
-
- status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
- directive_failed( status, "rtems_task_start of TA1" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
diff --git a/testsuites/sptests/spfatal/puterr.c b/testsuites/sptests/spfatal/puterr.c
deleted file mode 100644
index cc274ddadd..0000000000
--- a/testsuites/sptests/spfatal/puterr.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* put_error
- *
- * This routine verifies that the given error is the expected error.
- *
- * Input parameters:
- * error - actual error code
- * expected - expected error code
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * 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$
- */
-
-#include "system.h"
-
-char *Errors[] = {
- "RTEMS_SUCCESSFUL", /* successful completion */
- "RTEMS_TASK_EXITTED", /* returned from a task */
- "RTEMS_MP_NOT_CONFIGURED", /* multiprocessing not configured */
- "RTEMS_INVALID_NAME", /* invalid object name */
- "RTEMS_INVALID_ID", /* invalid object id */
- "RTEMS_TOO_MANY", /* too many */
- "RTEMS_TIMEOUT", /* timed out waiting */
- "RTEMS_OBJECT_WAS_DELETED", /* object was deleted while waiting */
- "RTEMS_INVALID_SIZE", /* specified size was invalid */
- "RTEMS_INVALID_ADDRESS", /* address specified is invalid */
- "RTEMS_INVALID_NUMBER", /* number was invalid */
- "RTEMS_NOT_DEFINED", /* item has not been initialized */
- "RTEMS_RESOURCE_IN_USE", /* resources still outstanding */
- "RTEMS_UNSATISFIED", /* request not satisfied */
- "RTEMS_INCORRECT_STATE", /* task is in wrong state */
- "RTEMS_ALREADY_SUSPENDED", /* task already in state */
- "RTEMS_ILLEGAL_ON_SELF", /* illegal operation on calling task */
- "RTEMS_ILLEGAL_ON_REMOTE_OBJECT", /* illegal operation for remote object */
- "RTEMS_CALLED_FROM_ISR", /* called from ISR */
- "RTEMS_INVALID_PRIORITY", /* invalid task priority */
- "RTEMS_INVALID_CLOCK", /* invalid date/time */
- "RTEMS_INVALID_NODE", /* invalid node id */
- "RTEMS_NOT_OWNER_OF_RESOURCE", /* not owner of resource */
- "RTEMS_NOT_CONFIGURED", /* directive not configured */
- "RTEMS_NOT_IMPLEMENTED" /* directive not implemented */
-};
-
-/* Task states */
-
-void put_error(
- uint32_t error,
- rtems_status_code expected
-)
-{
-
- if ( error <= RTEMS_NOT_IMPLEMENTED )
- printf( "EXPECTED FATAL - error code is correctly %s\n", Errors[ error ] );
- else
- printf( "ERROR - out of range error code is %d\n", error );
-
- if ( error != expected ) {
- printf( "ERROR - did not get expected code of %d\n", expected );
- }
-}
diff --git a/testsuites/sptests/spfatal/spfatal.doc b/testsuites/sptests/spfatal/spfatal.doc
deleted file mode 100644
index 50fb76c9af..0000000000
--- a/testsuites/sptests/spfatal/spfatal.doc
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# $Id$
-#
-# COPYRIGHT (c) 1989-1999.
-# 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: testfatal
-
-directives: none
-
-concepts:
-
- a. Verifies that the proper error is reported by k_fatal when a task
- exits.
-
- b. Verifies that the task exitted extension works correctly.
-
- c. Verifies that the fatal error extension works corectly.
-
diff --git a/testsuites/sptests/spfatal/spfatal.scn b/testsuites/sptests/spfatal/spfatal.scn
deleted file mode 100644
index ecb9f63597..0000000000
--- a/testsuites/sptests/spfatal/spfatal.scn
+++ /dev/null
@@ -1,8 +0,0 @@
-*** TEST FATAL ***
-EXPECTED FATAL - error code is correctly RTEMS_UNSATISFIED
-EXPECTED FATAL - error code is correctly RTEMS_INVALID_ADDRESS
-EXPECTED FATAL - error code is correctly RTEMS_UNSATISFIED
-EXPECTED FATAL - error code is correctly RTEMS_INVALID_PRIORITY
-EXPECTED FATAL - error code is correctly RTEMS_TASK_EXITTED
-NOT TESTING FATAL ERROR WHEN TASK EXITS -- C LIBRARY CATCHES THIS
-*** END OF TEST FATAL ***
diff --git a/testsuites/sptests/spfatal/system.h b/testsuites/sptests/spfatal/system.h
deleted file mode 100644
index 8d1881c06c..0000000000
--- a/testsuites/sptests/spfatal/system.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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$
- */
-
-#include <tmacros.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-void put_error(
- uint32_t error,
- rtems_status_code expected
-);
-
-rtems_extension Fatal_extension(
- uint32_t source,
- bool is_internal,
- uint32_t error
-);
-
-rtems_task Task_1(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-extern rtems_extensions_table initial_extensions;
-
-#define CONFIGURE_INITIAL_EXTENSIONS \
- { \
- NULL, /* create */ \
- NULL, /* start */ \
- NULL, /* restart */ \
- NULL, /* delete */ \
- NULL, /* switch */ \
- NULL, /* begin */ \
- NULL, /* exitted */ \
- Fatal_extension /* fatal */ \
- }
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(0)
-#define CONFIGURE_TICKS_PER_TIMESLICE 0
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
-
-TEST_EXTERN rtems_configuration_table New_Configuration;
-
-extern rtems_extensions_table Extensions;
-
-/* end of include file */
diff --git a/testsuites/sptests/spfatal/task1.c b/testsuites/sptests/spfatal/task1.c
deleted file mode 100644
index df0ec785e5..0000000000
--- a/testsuites/sptests/spfatal/task1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Task_1
- *
- * This routine serves as a test task. It verifies the task manager.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * 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$
- */
-
-#include "system.h"
-
-rtems_task Task_1(
- rtems_task_argument argument
-)
-{
- puts( "\n\n*** TEST FATAL ***" );
- puts( "TA1 - exitting task" );
-}