score: Remove fatal is internal indicator

The fatal is internal indicator is redundant since the fatal source and
error code uniquely identify a fatal error.  Keep the fatal user
extension is internal parameter for backward compatibility and set it to
false always.

Update #2825.
This commit is contained in:
Sebastian Huber
2016-12-08 16:41:30 +01:00
parent 05006c9017
commit b6606e8d99
65 changed files with 59 additions and 225 deletions

View File

@@ -23,7 +23,6 @@ void BSP_panic(char *s)
}
#define THESRC _Internal_errors_What_happened.the_source
#define ISITNL _Internal_errors_What_happened.is_internal
#define THEERR _Internal_errors_What_happened.the_error
void _BSP_Fatal_error(unsigned int v)
@@ -36,7 +35,6 @@ void _BSP_Fatal_error(unsigned int v)
printk("%s\n",_RTEMS_version);
printk("FATAL ERROR:\n");
printk("Internal error: %s\n", ISITNL? "Yes":"No");
printk("Environment:");
switch (THESRC) {
case INTERNAL_ERROR_CORE:

View File

@@ -137,11 +137,7 @@ int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
#endif
if ( eno != 0 ) {
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_GXX_KEY_ADD_FAILED );
}
return 0;
@@ -175,11 +171,7 @@ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
status
);
#endif
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED );
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );

View File

@@ -50,11 +50,7 @@ void RTEMS_Malloc_Initialize(
}
if ( init_or_extend == _Heap_Initialize ) {
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_NO_MEMORY_FOR_HEAP );
}
}
}

View File

@@ -87,7 +87,6 @@ void _POSIX_Threads_Initialize_user_threads_body(void)
if ( thread_entry == NULL ) {
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL
);
}

View File

@@ -89,13 +89,12 @@ void _RTEMS_tasks_Initialize_user_tasks_body( void )
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Terminate( INTERNAL_ERROR_RTEMS_API, true, return_value );
_Terminate( INTERNAL_ERROR_RTEMS_API, return_value );
entry_point = user_tasks[ index ].entry_point;
if ( entry_point == NULL ) {
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL
);
}

View File

@@ -34,7 +34,7 @@ libsapi_a_SOURCES = src/extension.c src/extensioncreate.c \
src/getversionstring.c \
src/chainappendnotify.c src/chaingetnotify.c src/chaingetwait.c \
src/chainprependnotify.c src/rbheap.c src/interrtext.c \
src/fatal2.c src/fatalsrctext.c
src/fatalsrctext.c
libsapi_a_SOURCES += src/chainprotected.c
libsapi_a_SOURCES += src/cpucounterconverter.c
libsapi_a_SOURCES += src/delayticks.c

View File

@@ -73,17 +73,20 @@ void rtems_fatal_error_occurred(
) RTEMS_NO_RETURN;
/**
* @brief Invokes the internal error handler with is internal set to false.
* @brief Terminates the system.
*
* @param[in] source is the fatal source.
* @param[in] error is the fatal code.
* @param[in] fatal_source The fatal source.
* @param[in] error_code The error code.
*
* @see _Terminate().
*/
void rtems_fatal(
rtems_fatal_source source,
rtems_fatal_code error
) RTEMS_NO_RETURN;
RTEMS_INLINE_ROUTINE void rtems_fatal(
rtems_fatal_source fatal_source,
rtems_fatal_code error_code
)
{
_Terminate( fatal_source, error_code );
}
/**
* @brief Returns a text for a fatal source.

View File

@@ -18,7 +18,7 @@
void rtems_shutdown_executive( uint32_t result )
{
_Terminate( RTEMS_FATAL_SOURCE_EXIT, false, result );
_Terminate( RTEMS_FATAL_SOURCE_EXIT, result );
/***************************************************************
***************************************************************

View File

@@ -30,7 +30,7 @@ void rtems_fatal_error_occurred(
uint32_t the_error
)
{
_Terminate( INTERNAL_ERROR_RTEMS_API, FALSE, the_error );
_Terminate( INTERNAL_ERROR_RTEMS_API, the_error );
/* will not return from this routine */
}

View File

@@ -1,35 +0,0 @@
/**
* @file
*
* @brief Invokes the internal error handler with is internal set to false.
*
* @ingroup ClassicFatal
*/
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/fatal.h>
void rtems_fatal(
rtems_fatal_source source,
rtems_fatal_code error
)
{
_Terminate( source, false, error );
}

View File

@@ -25,5 +25,5 @@ void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
{
uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
_Terminate( INTERNAL_ERROR_POSIX_API, false, code );
_Terminate( INTERNAL_ERROR_POSIX_API, code );
}

View File

@@ -62,7 +62,7 @@ void _CPU_Context_Initialize(
if ( !ok ) {
/* The task stack allocator must ensure that the stack area is valid */
_Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
_Terminate( INTERNAL_ERROR_CORE, 0xdeadbeef );
}
}
}

View File

@@ -48,7 +48,7 @@ uint32_t _CPU_ISR_Get_level( void )
break;
default:
/* FIXME */
_Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
_Terminate( INTERNAL_ERROR_CORE, 0xdeadbeef );
break;
}

View File

@@ -48,7 +48,7 @@ uint32_t _Nios2_ISR_Set_level( uint32_t new_level, uint32_t status )
break;
default:
/* FIXME */
_Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
_Terminate( INTERNAL_ERROR_CORE, 0xdeadbeef );
break;
}

View File

@@ -31,9 +31,5 @@ void _CPU_ISR_install_vector(
proc_ptr *old_handler
)
{
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR );
}

View File

@@ -182,8 +182,6 @@ typedef CPU_Uint32ptr Internal_errors_t;
typedef struct {
/** This is the source of the error. */
Internal_errors_Source the_source;
/** This indicates if the error is internal of external. */
bool is_internal;
/** This is the error code. */
Internal_errors_t the_error;
} Internal_errors_Information;
@@ -225,16 +223,13 @@ extern Internal_errors_Information _Internal_errors_What_happened;
*
* @param[in] the_source The fatal source indicating the subsystem the fatal
* condition originated in.
* @param[in] is_internal Indicates if the fatal condition was generated
* internally to the executive.
* @param[in] the_error The fatal error code. This value must be interpreted
* with respect to the source.
*
* @see rtems_fatal_error_occurred() and rtems_fatal().
* @see rtems_fatal() and _Internal_error().
*/
void _Terminate(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
) RTEMS_NO_RETURN;

View File

@@ -84,7 +84,7 @@ typedef enum {
static inline void _SMP_Fatal( SMP_Fatal_code code )
{
_Terminate( RTEMS_FATAL_SOURCE_SMP, false, code );
_Terminate( RTEMS_FATAL_SOURCE_SMP, code );
}
/**

View File

@@ -195,8 +195,8 @@ typedef void( *User_extensions_thread_exitted_extension )(
*
* @param[in] source The fatal source indicating the subsystem the fatal
* condition originated in.
* @param[in] is_internal Indicates if the fatal condition was generated
* internally to the executive.
* @param[in] is_internal This parameter is always false and provide only for
* backward compatibility reasons.
* @param[in] code The fatal error code. This value must be interpreted with
* respect to the source.
*/

View File

@@ -166,7 +166,6 @@ void _User_extensions_Thread_exitted_visitor(
typedef struct {
Internal_errors_Source source;
bool is_internal;
Internal_errors_t error;
} User_extensions_Fatal_context;
@@ -300,11 +299,10 @@ static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
static inline void _User_extensions_Fatal(
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
User_extensions_Fatal_context ctx = { source, error };
_User_extensions_Iterate(
&ctx,

View File

@@ -157,7 +157,7 @@
)
{
/* FIXME */
_Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
_Terminate( INTERNAL_ERROR_CORE, 0xdeadbeef );
}
#endif

View File

@@ -28,16 +28,14 @@ System_state_Codes _System_state_Current;
Internal_errors_Information _Internal_errors_What_happened;
void _Terminate(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
Internal_errors_Source the_source,
Internal_errors_t the_error
)
{
_User_extensions_Fatal( the_source, is_internal, the_error );
_User_extensions_Fatal( the_source, the_error );
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.the_error = the_error;
_System_state_Set( SYSTEM_STATE_TERMINATED );

View File

@@ -51,7 +51,6 @@ void _ISR_Handler_initialization( void )
if ( !_Stack_Is_enough( stack_size ) )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);

View File

@@ -95,11 +95,7 @@ static void _MPCI_Handler_initialization( void )
users_mpci_table = _Configuration_MP_table->User_mpci_table;
if ( _System_state_Is_multiprocessing && !users_mpci_table )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_NO_MPCI
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_NO_MPCI );
_MPCI_table = users_mpci_table;
@@ -191,11 +187,7 @@ MP_packet_Prefix *_MPCI_Get_packet ( void )
(*_MPCI_table->get_packet)( &the_packet );
if ( the_packet == NULL )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_PACKETS
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_PACKETS );
/*
* Put in a default timeout that will be used for
@@ -375,11 +367,7 @@ void _MPCI_Receive_server(
the_function = _MPCI_Packet_processors[ the_packet->the_class ];
if ( !the_function )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_PACKET
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_BAD_PACKET );
(*the_function)( the_packet );
}
@@ -463,7 +451,6 @@ void _MPCI_Internal_packets_Process_packet (
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
);
}

View File

@@ -76,7 +76,6 @@ void _Objects_Do_initialize_information(
if ( information->auto_extend && maximum_per_allocation == 0) {
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
);
}

View File

@@ -165,11 +165,7 @@ void _Objects_MP_Handler_early_initialization(void)
maximum_nodes = _Configuration_MP_table->maximum_nodes;
if ( node < 1 || node > maximum_nodes )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INVALID_NODE
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_INVALID_NODE );
_Objects_Local_node = node;
_Objects_Maximum_nodes = maximum_nodes;
@@ -246,12 +242,7 @@ bool _Objects_MP_Allocate_and_open (
if ( is_fatal_error == false )
return false;
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS );
}
_Objects_MP_Open( information, the_global_object, the_name, the_id );
@@ -291,11 +282,7 @@ void _Objects_MP_Close (
} else {
_Objects_MP_Global_release( &lock_context );
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INVALID_GLOBAL_ID
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_INVALID_GLOBAL_ID );
}
}

View File

@@ -84,11 +84,7 @@ void _Thread_Handler_initialization(void)
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_BAD_STACK_HOOK );
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );

View File

@@ -156,7 +156,6 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level )
) {
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
);
}
@@ -241,7 +240,6 @@ void _Thread_Dispatch_direct( Per_CPU_Control *cpu_self )
if ( cpu_self->thread_dispatch_disable_level != 1 ) {
_Terminate(
INTERNAL_ERROR_CORE,
0,
INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
);
}

View File

@@ -96,9 +96,5 @@ void _Thread_Handler( void )
_User_extensions_Thread_exitted( executing );
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_THREAD_EXITTED
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_THREAD_EXITTED );
}

View File

@@ -173,11 +173,7 @@ Thread_Control *_Thread_MP_Allocate_proxy (
_Thread_MP_Proxies_release( &lock_context );
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_PROXIES
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_PROXIES );
/*
* NOTE: The following return ensures that the compiler will

View File

@@ -372,11 +372,7 @@ void _Thread_queue_Deadlock_status( Thread_Control *the_thread )
void _Thread_queue_Deadlock_fatal( Thread_Control *the_thread )
{
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
}
static void _Thread_queue_Timeout(
@@ -525,7 +521,6 @@ Status_Control _Thread_queue_Enqueue_sticky(
if ( cpu_self->thread_dispatch_disable_level != 1 ) {
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE
);
}

View File

@@ -136,11 +136,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread )
{
#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT)
if ( _Thread_Owns_resources( the_thread ) ) {
_Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_RESOURCE_IN_USE
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_RESOURCE_IN_USE );
}
#endif

View File

@@ -129,7 +129,7 @@ void _User_extensions_Fatal_visitor(
if ( callout != NULL ) {
const User_extensions_Fatal_context *ctx = arg;
(*callout)( ctx->source, ctx->is_internal, ctx->error );
(*callout)( ctx->source, false, ctx->error );
}
}

View File

@@ -134,11 +134,7 @@ void _Workspace_Handler_initialization(
}
if ( remaining > 0 ) {
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE );
}
_Heap_Protection_set_delayed_free_fraction( &_Workspace_Area, 1 );
@@ -204,11 +200,7 @@ void *_Workspace_Allocate_or_fatal_error(
#endif
if ( memory == NULL )
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_WORKSPACE_ALLOCATION );
return memory;
}

View File

@@ -10,7 +10,6 @@
#define FATAL_ERROR_TEST_NAME "/DEV/NULL 1"
#define FATAL_ERROR_DESCRIPTION "/dev/null already registered"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define TESTS_USE_PRINTK

View File

@@ -28,7 +28,6 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_DESCRIPTION \
"POSIX API Init thread create failure - NULL entry"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL

View File

@@ -33,7 +33,6 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_DESCRIPTION \
"POSIX API Init thread create failure -- no memory for stack"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_POSIX_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR ((POSIX_FD_PTHREAD << 8) | EAGAIN)
void force_error(void)

View File

@@ -77,13 +77,8 @@ void Fatal_extension(
printk( ")\n" );
}
if ( is_internal != FATAL_ERROR_EXPECTED_IS_INTERNAL )
{
if ( is_internal == TRUE )
printk( "ERROR==> Fatal Extension is internal set to TRUE expected FALSE\n" );
else
printk( "ERROR==> Fatal Extension is internal set to FALSE expected TRUE\n" );
}
if ( is_internal )
printk( "ERROR==> Fatal Extension is internal set to true expected false\n" );
if ( error != FATAL_ERROR_EXPECTED_ERROR ) {
printk( "ERROR==> Fatal Error Expected (");
@@ -95,7 +90,7 @@ void Fatal_extension(
if (
source == FATAL_ERROR_EXPECTED_SOURCE
&& is_internal == FATAL_ERROR_EXPECTED_IS_INTERNAL
&& !is_internal
&& error == FATAL_ERROR_EXPECTED_ERROR
) {
TEST_END();

View File

@@ -25,7 +25,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_TEST_NAME "1"
#define FATAL_ERROR_DESCRIPTION "Classic API Init task create failure"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_UNSATISFIED
void force_error()

View File

@@ -25,7 +25,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_TEST_NAME "2"
#define FATAL_ERROR_DESCRIPTION "Classic API Init task start failure"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "3"
#define FATAL_ERROR_DESCRIPTION "Core Mutex obtain in critical section"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL

View File

@@ -26,7 +26,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_DESCRIPTION \
"Classic API call rtems_fatal_error_occurred"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR 0xdead
void force_error()

View File

@@ -34,7 +34,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_TEST_NAME "5"
#define FATAL_ERROR_DESCRIPTION "Core fall out of a task"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_THREAD_EXITTED
rtems_task EmptyTask( rtems_task_argument unused );

View File

@@ -33,7 +33,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_DESCRIPTION \
"Core initialize with invalid stack hook"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_STACK_HOOK
void *New_stack_allocate_hook(size_t unused);

View File

@@ -33,7 +33,6 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_DESCRIPTION \
"Core Configuration Invalid ISR stack size"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "8"
#define FATAL_ERROR_DESCRIPTION "Core workspace too small"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_WORKSPACE_ALLOCATION
void force_error()

View File

@@ -15,7 +15,6 @@
#define FATAL_ERROR_TEST_NAME "9"
#define FATAL_ERROR_DESCRIPTION "Bad heap address to malloc"
#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()

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "10"
#define FATAL_ERROR_DESCRIPTION "asserting with non-NULL strings..."
#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_ASSERT
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR_CHECK spfatal10_is_expected_error
#define ASSERT_FILE "testcase.h"

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "11"
#define FATAL_ERROR_DESCRIPTION "asserting with NULL strings..."
#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_ASSERT
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR_CHECK spfatal11_is_expected_error
#define ASSERT_FILE "testcase.h"

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_DESCRIPTION \
"_Heap_Initialize fails during RTEMS initialization"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
void force_error()

View File

@@ -12,7 +12,6 @@
#define FATAL_ERROR_DESCRIPTION \
"Configuration of unlimited and maximum of 0"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
/*

View File

@@ -12,7 +12,6 @@
#define FATAL_ERROR_TEST_NAME "14"
#define FATAL_ERROR_DESCRIPTION "fail to open stdout"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR 0x55544431
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 1

View File

@@ -11,7 +11,6 @@
#define FATAL_ERROR_TEST_NAME "15"
#define FATAL_ERROR_DESCRIPTION "fail to open stderr"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR 0x55544432
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 2

View File

@@ -16,7 +16,6 @@
#define FATAL_ERROR_TEST_NAME "16"
#define FATAL_ERROR_DESCRIPTION "termios sem create #1"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "17"
#define FATAL_ERROR_DESCRIPTION "termios sem create #2"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "18"
#define FATAL_ERROR_DESCRIPTION "termios sem create #3"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \

View File

@@ -14,7 +14,6 @@
#define FATAL_ERROR_TEST_NAME "19"
#define FATAL_ERROR_DESCRIPTION "termios sem create #4"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \

View File

@@ -11,7 +11,6 @@
#define FATAL_ERROR_DESCRIPTION \
"rtems_termios_initialize cannot create semaphore"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \

View File

@@ -13,7 +13,6 @@
#define FATAL_ERROR_TEST_NAME "GXX KEY ADD FAILURE"
#define FATAL_ERROR_DESCRIPTION "GXX KEY ADD FAILURE"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_KEY_ADD_FAILED
void force_error()

View File

@@ -12,7 +12,6 @@
#define FATAL_ERROR_TEST_NAME "GXX MUTEX INIT FAILED"
#define FATAL_ERROR_DESCRIPTION "GXX MUTEX INIT FAILED"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
void force_error()

View File

@@ -15,7 +15,6 @@
#define FATAL_ERROR_TEST_NAME "27"
#define FATAL_ERROR_DESCRIPTION "libio init no posix key left"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_UNSATISFIED
#define CONFIGURE_MAXIMUM_POSIX_KEYS (-1)

View File

@@ -15,7 +15,6 @@
#define FATAL_ERROR_TEST_NAME "28"
#define FATAL_ERROR_DESCRIPTION "delete a task with a semaphore in use"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_RESOURCE_IN_USE
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
@@ -38,6 +37,6 @@ void force_error()
sc = rtems_task_delete(RTEMS_SELF);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
#else
_Terminate( INTERNAL_ERROR_CORE, false, INTERNAL_ERROR_RESOURCE_IN_USE );
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_RESOURCE_IN_USE );
#endif
}

View File

@@ -15,7 +15,6 @@
#define FATAL_ERROR_TEST_NAME "29"
#define FATAL_ERROR_DESCRIPTION "yield in interrupt context"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
#define CONFIGURE_MAXIMUM_TIMERS 1

View File

@@ -80,17 +80,10 @@ void Fatal_extension(
printk( ")\n" );
}
if ( is_internal != FATAL_ERROR_EXPECTED_IS_INTERNAL )
{
if ( is_internal == TRUE )
printk(
"ERROR==> Fatal Extension is internal set to TRUE expected FALSE\n"
);
else
printk(
"ERROR==> Fatal Extension is internal set to FALSE expected TRUE\n"
);
}
if ( is_internal )
printk(
"ERROR==> Fatal Extension is internal set to true expected false\n"
);
#ifdef FATAL_ERROR_EXPECTED_ERROR
if ( error != FATAL_ERROR_EXPECTED_ERROR ) {
@@ -104,7 +97,7 @@ void Fatal_extension(
if (
source == FATAL_ERROR_EXPECTED_SOURCE
&& is_internal == FATAL_ERROR_EXPECTED_IS_INTERNAL
&& !is_internal
&& is_expected_error( error )
) {
TEST_END();

View File

@@ -26,13 +26,11 @@ const char rtems_test_name[] = "SPINTERNALERROR 1";
#define FATAL_SOURCE 0xdeadbeef
#define FATAL_IS_INTERNAL false
#define FATAL_ERROR 0x600df00d
void boot_card( const char *cmdline )
{
_Terminate( FATAL_SOURCE, FATAL_IS_INTERNAL, FATAL_ERROR );
_Terminate( FATAL_SOURCE, FATAL_ERROR );
}
static void fatal_extension(
@@ -43,11 +41,7 @@ static void fatal_extension(
{
TEST_BEGIN();
if (
source == FATAL_SOURCE
&& is_internal == FATAL_IS_INTERNAL
&& error == FATAL_ERROR
) {
if ( source == FATAL_SOURCE && !is_internal && error == FATAL_ERROR ) {
TEST_END();
}
}

View File

@@ -151,7 +151,7 @@ void boot_card(const char *cmdline)
TEST_END();
_Terminate(RTEMS_FATAL_SOURCE_EXIT, false, 0);
_Terminate(RTEMS_FATAL_SOURCE_EXIT, 0);
}
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER