summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/Makefile.am2
-rw-r--r--testsuites/sptests/configure.ac1
-rw-r--r--testsuites/sptests/spfatal06/testcase.h11
-rw-r--r--testsuites/sptests/spfatal07/testcase.h6
-rw-r--r--testsuites/sptests/spfatal08/testcase.h14
-rw-r--r--testsuites/sptests/spfatal09/testcase.h11
-rw-r--r--testsuites/sptests/spfatal12/testcase.h5
-rw-r--r--testsuites/sptests/spfatal21/Makefile.am21
-rw-r--r--testsuites/sptests/spfatal21/spfatal21.doc19
-rw-r--r--testsuites/sptests/spfatal21/spfatal21.scn3
-rw-r--r--testsuites/sptests/spfatal21/testcase.h34
-rw-r--r--testsuites/sptests/spfatal_support/init.c9
12 files changed, 34 insertions, 102 deletions
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 479cdf6cd4..a0dc24af36 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -17,7 +17,7 @@ SUBDIRS = \
sperror01 sperror02 sperror03 \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
- spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 spfatal21 \
+ spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
spfatal22 spfatal23 spfatal24 spfatal25 \
spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 33a0755615..32063e2221 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -139,7 +139,6 @@ spfatal17/Makefile
spfatal18/Makefile
spfatal19/Makefile
spfatal20/Makefile
-spfatal21/Makefile
spfatal22/Makefile
spfatal23/Makefile
spfatal24/Makefile
diff --git a/testsuites/sptests/spfatal06/testcase.h b/testsuites/sptests/spfatal06/testcase.h
index 29669d96bf..27c615d7e7 100644
--- a/testsuites/sptests/spfatal06/testcase.h
+++ b/testsuites/sptests/spfatal06/testcase.h
@@ -38,6 +38,10 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
void *New_stack_allocate_hook(size_t unused);
+#define CONFIGURE_TASK_STACK_ALLOCATOR New_stack_allocate_hook
+
+#define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
+
void *New_stack_allocate_hook(size_t unused)
{
return NULL;
@@ -45,12 +49,5 @@ void *New_stack_allocate_hook(size_t unused)
void force_error()
{
- if (Configuration.stack_free_hook != NULL)
- Configuration.stack_allocate_hook = NULL;
- else
- Configuration.stack_allocate_hook = New_stack_allocate_hook;
-
- rtems_initialize_data_structures();
/* we will not run this far */
}
-
diff --git a/testsuites/sptests/spfatal07/testcase.h b/testsuites/sptests/spfatal07/testcase.h
index c95fc0df48..77ef6e8af7 100644
--- a/testsuites/sptests/spfatal07/testcase.h
+++ b/testsuites/sptests/spfatal07/testcase.h
@@ -37,11 +37,15 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
+#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
+ #define CONFIGURE_MEMORY_OVERHEAD (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS)
+#endif
+
void force_error()
{
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
Configuration.interrupt_stack_size = (STACK_MINIMUM_SIZE-1);
- rtems_initialize_data_structures();
+ _ISR_Handler_initialization();
#else
printk(
"WARNING - Test not applicable on this target architecture.\n"
diff --git a/testsuites/sptests/spfatal08/testcase.h b/testsuites/sptests/spfatal08/testcase.h
index 50a831f33f..83615f5b04 100644
--- a/testsuites/sptests/spfatal08/testcase.h
+++ b/testsuites/sptests/spfatal08/testcase.h
@@ -9,6 +9,8 @@
* http://www.rtems.com/license/LICENSE.
*/
+#include <rtems/score/wkspace.h>
+
/*
* Way too much stack space. Should generate a fatal error
* on the init task create.
@@ -39,10 +41,16 @@ char Workspace[ 256 ] CPU_STRUCTURE_ALIGNMENT;
void force_error()
{
- rtems_configuration_set_work_space_start( Workspace );
- rtems_configuration_set_work_space_size( sizeof(Workspace) );
+ Heap_Area area = {
+ .begin = Workspace,
+ .size = sizeof( Workspace )
+ };
+
+ rtems_configuration_set_work_space_size( 0 );
rtems_configuration_set_stack_space_size( 0 );
- rtems_initialize_data_structures();;
+ _Workspace_Handler_initialization( &area, 1, NULL );
+
+ _Workspace_Allocate_or_fatal_error( 2 * sizeof( Workspace ) );
/* we will not run this far */
}
diff --git a/testsuites/sptests/spfatal09/testcase.h b/testsuites/sptests/spfatal09/testcase.h
index eb50c30dfd..dc6dfa9f24 100644
--- a/testsuites/sptests/spfatal09/testcase.h
+++ b/testsuites/sptests/spfatal09/testcase.h
@@ -14,15 +14,12 @@
#define FATAL_ERROR_TEST_NAME "9"
#define FATAL_ERROR_DESCRIPTION "Bad heap address to malloc"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_NO_MEMORY
-
-char Malloc_Heap[ 1 ] CPU_STRUCTURE_ALIGNMENT;
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
void force_error()
{
- RTEMS_Malloc_Initialize( Malloc_Heap, sizeof(Malloc_Heap), 0 );
-
+ RTEMS_Malloc_Initialize( NULL, 0, NULL );
/* we will not run this far */
}
diff --git a/testsuites/sptests/spfatal12/testcase.h b/testsuites/sptests/spfatal12/testcase.h
index feeec46034..73cb7a9616 100644
--- a/testsuites/sptests/spfatal12/testcase.h
+++ b/testsuites/sptests/spfatal12/testcase.h
@@ -17,9 +17,8 @@
void force_error()
{
- rtems_configuration_set_work_space_size( sizeof(void *) );
- rtems_configuration_set_stack_space_size( 0 );
- rtems_initialize_data_structures();
+ Heap_Area area = { .begin = NULL, .size = 0 };
+ _Workspace_Handler_initialization( &area, 1, NULL );
/* we will not run this far */
}
diff --git a/testsuites/sptests/spfatal21/Makefile.am b/testsuites/sptests/spfatal21/Makefile.am
deleted file mode 100644
index 3a2439ac80..0000000000
--- a/testsuites/sptests/spfatal21/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-rtems_tests_PROGRAMS = spfatal21
-spfatal21_SOURCES = ../spfatal_support/init.c \
- ../spfatal_support/system.h ../../support/src/test_support.c testcase.h
-
-dist_rtems_tests_DATA = spfatal21.scn
-dist_rtems_tests_DATA += spfatal21.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 = $(spfatal21_OBJECTS)
-LINK_LIBS = $(spfatal21_LDLIBS)
-
-spfatal21$(EXEEXT): $(spfatal21_OBJECTS) $(spfatal21_DEPENDENCIES)
- @rm -f spfatal21$(EXEEXT)
- $(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal21/spfatal21.doc b/testsuites/sptests/spfatal21/spfatal21.doc
deleted file mode 100644
index ba1e65c0f2..0000000000
--- a/testsuites/sptests/spfatal21/spfatal21.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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: spfatal21
-
-directives:
-
- malloc_sbrk_initialize
-
-concepts:
-
-+ exercise fatal error when sbrk fails to extend memory on the initial call.
diff --git a/testsuites/sptests/spfatal21/spfatal21.scn b/testsuites/sptests/spfatal21/spfatal21.scn
deleted file mode 100644
index 1ea32a5d3f..0000000000
--- a/testsuites/sptests/spfatal21/spfatal21.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL FATAL 21 ***
-Fatal error (sbrk during init fails) hit
-*** END OF TEST FATAL 21 ***
diff --git a/testsuites/sptests/spfatal21/testcase.h b/testsuites/sptests/spfatal21/testcase.h
deleted file mode 100644
index 788f06be5e..0000000000
--- a/testsuites/sptests/spfatal21/testcase.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2012.
- * 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.
- */
-
-#define FATAL_ERROR_TEST_NAME "FATAL 21"
-#define FATAL_ERROR_DESCRIPTION "sbrk during init fails"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_NO_MEMORY
-
-#include <rtems/libcsupport.h>
-#include <rtems/malloc.h>
-#include <unistd.h>
-
-/* Safe information on real heap */
-extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
-extern rtems_malloc_sbrk_functions_t rtems_malloc_sbrk_helpers_table;
-
-void * sbrk(ptrdiff_t incr)
-{
- return (void *) -1;
-}
-
-void force_error()
-{
- rtems_malloc_sbrk_helpers = &rtems_malloc_sbrk_helpers_table;
-
- RTEMS_Malloc_Initialize( NULL, 0, 64 );
-}
diff --git a/testsuites/sptests/spfatal_support/init.c b/testsuites/sptests/spfatal_support/init.c
index 923c08f7db..9822b13276 100644
--- a/testsuites/sptests/spfatal_support/init.c
+++ b/testsuites/sptests/spfatal_support/init.c
@@ -88,13 +88,18 @@ char *Errors_Core[] = {
"INTERNAL_ERROR_BAD_ATTRIBUTES",
"INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY",
"INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL",
- "INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE"
+ "INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE",
+ "INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0",
+ "INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
+ "INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
+ "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
+ "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP"
};
void Put_Error( uint32_t source, uint32_t error )
{
if ( source == INTERNAL_ERROR_CORE ) {
- if ( error > INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE )
+ if ( error > INTERNAL_ERROR_NO_MEMORY_FOR_HEAP )
printk("Unknown Internal Core Error (%d)", error);
else
printk( Errors_Core[ error ] );