sptests: Avoid include path magic

Update #3818.
This commit is contained in:
Sebastian Huber
2019-11-12 09:47:20 +01:00
parent 1e343825f4
commit 1a48cbfa16
29 changed files with 270 additions and 111 deletions
+2 -4
View File
@@ -313,11 +313,9 @@ if TEST_devnullfatal01
lib_tests += devnullfatal01
lib_screens += devnullfatal01/devnullfatal01.scn
lib_docs += devnullfatal01/devnullfatal01.doc
devnullfatal01_SOURCES = ../sptests/spfatal_support/init.c \
devnullfatal01/testcase.h
devnullfatal01_SOURCES = devnullfatal01/init.c
devnullfatal01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_devnullfatal01) \
$(support_includes) -I$(top_srcdir)/../../sptests/spfatal_support \
-I$(top_srcdir)/devnullfatal01
$(support_includes)
endif
if DLTESTS
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../../sptests/spfatal_support/spfatal.h"
/*
* COPYRIGHT (c) 1989-2010, 2017.
* On-Line Applications Research Corporation (OAR).
@@ -15,7 +21,7 @@
#include <rtems/devnull.h>
#include "tmacros.h"
void force_error()
static void force_error(void)
{
int status;
@@ -27,3 +33,5 @@ void force_error()
/* A fatal error would be raised in previous call */
/* we will not run this far */
}
#include "../../sptests/spfatal_support/spfatalimpl.h"
+4 -6
View File
@@ -391,19 +391,17 @@ endif
if TEST_psxfatal01
psx_tests += psxfatal01
psx_screens += psxfatal01/psxfatal01.scn
psxfatal01_SOURCES = psxfatal_support/init.c \
psxfatal01/testcase.h
psxfatal01_SOURCES = psxfatal01/init.c
psxfatal01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxfatal01) \
$(support_includes) -I$(top_srcdir)/psxfatal01
$(support_includes)
endif
if TEST_psxfatal02
psx_tests += psxfatal02
psx_screens += psxfatal02/psxfatal02.scn
psxfatal02_SOURCES = psxfatal_support/init.c \
psxfatal02/testcase.h
psxfatal02_SOURCES = psxfatal02/init.c
psxfatal02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxfatal02) \
$(support_includes) -I$(top_srcdir)/psxfatal02
$(support_includes)
endif
if TEST_psxfchx01
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../psxfatal_support/psxfatal.h"
/*
* Classic API Init task create failure
*/
@@ -31,7 +37,9 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
void force_error(void)
static void force_error(void)
{
/* we will not run this far */
}
#include "../psxfatal_support/psxfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../psxfatal_support/psxfatal.h"
/*
* Classic API Init task create failure
*/
@@ -35,7 +41,9 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
void force_error(void)
static void force_error(void)
{
/* we will not run this far */
}
#include "../psxfatal_support/psxfatalimpl.h"
@@ -0,0 +1,14 @@
/*
* 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.org/license/LICENSE.
*/
#include <rtems/bspIo.h>
#include <tmacros.h>
void *POSIX_Init(void *argument);
@@ -7,20 +7,6 @@
* http://www.rtems.org/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/bspIo.h>
#include <tmacros.h>
void *POSIX_Init(void *argument);
void force_error(void);
#include "testcase.h"
const char rtems_test_name[] = "PSXFATAL " FATAL_ERROR_TEST_NAME;
static void print_test_begin_message(void)
+38 -57
View File
@@ -890,150 +890,135 @@ if TEST_spfatal01
sp_tests += spfatal01
sp_screens += spfatal01/spfatal01.scn
sp_docs += spfatal01/spfatal01.doc
spfatal01_SOURCES = spfatal_support/init.c \
spfatal01/testcase.h
spfatal01_SOURCES = spfatal01/init.c
spfatal01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal01) \
$(support_includes) -I$(top_srcdir)/spfatal01
$(support_includes)
endif
if TEST_spfatal02
sp_tests += spfatal02
sp_screens += spfatal02/spfatal02.scn
sp_docs += spfatal02/spfatal02.doc
spfatal02_SOURCES = spfatal_support/init.c \
spfatal02/testcase.h
spfatal02_SOURCES = spfatal02/init.c
spfatal02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal02) \
$(support_includes) -I$(top_srcdir)/spfatal02
$(support_includes)
endif
if TEST_spfatal03
sp_tests += spfatal03
sp_screens += spfatal03/spfatal03.scn
sp_docs += spfatal03/spfatal03.doc
spfatal03_SOURCES = spfatal_support/init.c \
spfatal03/testcase.h
spfatal03_SOURCES = spfatal03/init.c
spfatal03_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal03) \
$(support_includes) -I$(top_srcdir)/spfatal03
$(support_includes)
endif
if TEST_spfatal04
sp_tests += spfatal04
sp_screens += spfatal04/spfatal04.scn
sp_docs += spfatal04/spfatal04.doc
spfatal04_SOURCES = spfatal_support/init.c \
spfatal04/testcase.h
spfatal04_SOURCES = spfatal04/init.c
spfatal04_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal04) \
$(support_includes) -I$(top_srcdir)/spfatal04
$(support_includes)
endif
if TEST_spfatal05
sp_tests += spfatal05
sp_screens += spfatal05/spfatal05.scn
sp_docs += spfatal05/spfatal05.doc
spfatal05_SOURCES = spfatal_support/init.c \
spfatal05/testcase.h
spfatal05_SOURCES = spfatal05/init.c
spfatal05_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal05) \
$(support_includes) -I$(top_srcdir)/spfatal05
$(support_includes)
endif
if TEST_spfatal06
sp_tests += spfatal06
sp_screens += spfatal06/spfatal06.scn
sp_docs += spfatal06/spfatal06.doc
spfatal06_SOURCES = spfatal_support/init.c \
spfatal06/testcase.h
spfatal06_SOURCES = spfatal06/init.c
spfatal06_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal06) \
$(support_includes) -I$(top_srcdir)/spfatal06
$(support_includes)
endif
if TEST_spfatal08
sp_tests += spfatal08
sp_screens += spfatal08/spfatal08.scn
sp_docs += spfatal08/spfatal08.doc
spfatal08_SOURCES = spfatal_support/init.c \
spfatal08/testcase.h
spfatal08_SOURCES = spfatal08/init.c
spfatal08_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal08) \
$(support_includes) -I$(top_srcdir)/spfatal08
$(support_includes)
endif
if TEST_spfatal09
sp_tests += spfatal09
sp_screens += spfatal09/spfatal09.scn
sp_docs += spfatal09/spfatal09.doc
spfatal09_SOURCES = spfatal_support/init.c \
spfatal09/testcase.h
spfatal09_SOURCES = spfatal09/init.c
spfatal09_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal09) \
$(support_includes) -I$(top_srcdir)/spfatal09
$(support_includes)
endif
if TEST_spfatal10
sp_tests += spfatal10
sp_screens += spfatal10/spfatal10.scn
sp_docs += spfatal10/spfatal10.doc
spfatal10_SOURCES = spfatal_support/init.c \
spfatal10/testcase.h
spfatal10_SOURCES = spfatal10/init.c
spfatal10_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal10) \
$(support_includes) -I$(top_srcdir)/spfatal10
$(support_includes)
endif
if TEST_spfatal11
sp_tests += spfatal11
sp_screens += spfatal11/spfatal11.scn
sp_docs += spfatal11/spfatal11.doc
spfatal11_SOURCES = spfatal_support/init.c \
spfatal11/testcase.h
spfatal11_SOURCES = spfatal11/init.c
spfatal11_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal11) \
$(support_includes) -I$(top_srcdir)/spfatal11
$(support_includes)
endif
if TEST_spfatal12
sp_tests += spfatal12
sp_screens += spfatal12/spfatal12.scn
sp_docs += spfatal12/spfatal12.doc
spfatal12_SOURCES = spfatal_support/init.c \
spfatal12/testcase.h
spfatal12_SOURCES = spfatal12/init.c
spfatal12_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal12) \
$(support_includes) -I$(top_srcdir)/spfatal12
$(support_includes)
endif
if TEST_spfatal14
sp_tests += spfatal14
sp_screens += spfatal14/spfatal14.scn
sp_docs += spfatal14/spfatal14.doc
spfatal14_SOURCES = spfatal_support/init.c \
spfatal14/testcase.h
spfatal14_SOURCES = spfatal14/init.c
spfatal14_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal14) \
$(support_includes) -I$(top_srcdir)/spfatal14
$(support_includes)
endif
if TEST_spfatal15
sp_tests += spfatal15
sp_screens += spfatal15/spfatal15.scn
sp_docs += spfatal15/spfatal15.doc
spfatal15_SOURCES = spfatal_support/init.c \
spfatal15/testcase.h
spfatal15_SOURCES = spfatal15/init.c
spfatal15_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal15) \
$(support_includes) -I$(top_srcdir)/spfatal15
$(support_includes)
endif
if TEST_spfatal24
sp_tests += spfatal24
sp_screens += spfatal24/spfatal24.scn
sp_docs += spfatal24/spfatal24.doc
spfatal24_SOURCES = spfatal_support/init.c \
spfatal24/testcase.h
spfatal24_SOURCES = spfatal24/init.c
spfatal24_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal24) \
$(support_includes) -I$(top_srcdir)/spfatal24
$(support_includes)
endif
if TEST_spfatal25
sp_tests += spfatal25
sp_screens += spfatal25/spfatal25.scn
sp_docs += spfatal25/spfatal25.doc
spfatal25_SOURCES = spfatal_support/init.c \
spfatal25/testcase.h
spfatal25_SOURCES = spfatal25/init.c
spfatal25_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal25) \
$(support_includes) -I$(top_srcdir)/spfatal25
$(support_includes)
endif
if TEST_spfatal26
@@ -1049,30 +1034,27 @@ if TEST_spfatal27
sp_tests += spfatal27
sp_screens += spfatal27/spfatal27.scn
sp_docs += spfatal27/spfatal27.doc
spfatal27_SOURCES = spfatal_support/init.c \
spfatal27/testcase.h
spfatal27_SOURCES = spfatal27/init.c
spfatal27_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal27) \
$(support_includes) -I$(top_srcdir)/spfatal27
$(support_includes)
endif
if TEST_spfatal28
sp_tests += spfatal28
sp_screens += spfatal28/spfatal28.scn
sp_docs += spfatal28/spfatal28.doc
spfatal28_SOURCES = spfatal_support/init.c \
spfatal28/testcase.h
spfatal28_SOURCES = spfatal28/init.c
spfatal28_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal28) \
$(support_includes) -I$(top_srcdir)/spfatal28
$(support_includes)
endif
if TEST_spfatal29
sp_tests += spfatal29
sp_screens += spfatal29/spfatal29.scn
sp_docs += spfatal29/spfatal29.doc
spfatal29_SOURCES = spfatal_support/init.c \
spfatal29/testcase.h
spfatal29_SOURCES = spfatal29/init.c
spfatal29_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal29) \
$(support_includes) -I$(top_srcdir)/spfatal29
$(support_includes)
endif
if TEST_spfatal30
@@ -1097,10 +1079,9 @@ if TEST_spfatal32
sp_tests += spfatal32
sp_screens += spfatal32/spfatal32.scn
sp_docs += spfatal32/spfatal32.doc
spfatal32_SOURCES = spfatal_support/init.c \
spfatal32/testcase.h
spfatal32_SOURCES = spfatal32/init.c
spfatal32_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal32) \
$(support_includes) -I$(top_srcdir)/spfatal32
$(support_includes)
endif
if TEST_spfifo01
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*/
@@ -27,7 +33,7 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
void force_error()
static void force_error(void)
{
/*
* Case 2: Null entry
@@ -38,3 +44,5 @@ void force_error()
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*/
@@ -28,7 +34,7 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL
void force_error()
static void force_error(void)
{
/*
* Case 2: Null entry
@@ -36,3 +42,5 @@ void force_error()
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Semaphore Obtain in Critical Section
*
@@ -19,7 +25,7 @@
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
void force_error(void)
static void force_error(void)
{
rtems_status_code status;
@@ -44,3 +50,5 @@ void force_error(void)
rtems_test_assert( 0 );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*/
@@ -28,8 +34,10 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_ERROR 0xdead
void force_error()
static void force_error(void)
{
rtems_fatal_error_occurred( 0xdead );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*
@@ -44,7 +50,7 @@ rtems_task EmptyTask(
{
}
void force_error()
static void force_error(void)
{
rtems_id id;
rtems_status_code status;
@@ -67,3 +73,5 @@ void force_error()
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*
@@ -46,7 +52,9 @@ void *New_stack_allocate_hook(size_t unused)
return NULL;
}
void force_error()
static void force_error(void)
{
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Classic API Init task create failure
*
@@ -16,8 +22,10 @@
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_WORKSPACE_ALLOCATION
void force_error()
static void force_error(void)
{
_Workspace_Allocate_or_fatal_error( SIZE_MAX );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Malloc Initialization Error
*
@@ -17,8 +23,10 @@
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
void force_error()
static void force_error(void)
{
RTEMS_Malloc_Initialize( NULL, 0, NULL );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/* Test __assert_func with NULL function name
*
* COPYRIGHT (c) 1989-2009.
@@ -32,9 +38,11 @@ static inline bool spfatal10_is_expected_error( rtems_fatal_code error )
&& strcmp( assert_context->failed_expression, ASSERT_FEXP ) == 0;
}
void force_error()
static void force_error(void)
{
__assert_func( ASSERT_FILE, ASSERT_LINE, ASSERT_FUNC, ASSERT_FEXP );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/* Test __assert_func with NULL function name
*
* COPYRIGHT (c) 1989-2009.
@@ -32,9 +38,11 @@ static inline bool spfatal11_is_expected_error( rtems_fatal_code error )
&& strcmp( assert_context->failed_expression, ASSERT_FEXP ) == 0;
}
void force_error()
static void force_error(void)
{
__assert_func( ASSERT_FILE, ASSERT_LINE, ASSERT_FUNC, ASSERT_FEXP );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/* Test __assert_func with NULL function name
*
* COPYRIGHT (c) 1989-2009.
@@ -16,10 +22,12 @@
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
void force_error()
static void force_error(void)
{
Heap_Area area = { .begin = NULL, .size = 0 };
_Workspace_Handler_initialization( &area, 1, NULL );
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -16,7 +22,9 @@
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 1
void force_error()
static void force_error(void)
{
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -15,7 +21,9 @@
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 2
void force_error()
static void force_error(void)
{
/* we will not run this far */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -15,9 +21,11 @@
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_KEY_ADD_FAILED
void force_error()
static void force_error(void)
{
pthread_key_t key = -1;
rtems_gxx_setspecific( &key, NULL );
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -14,7 +20,7 @@
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
void force_error()
static void force_error(void)
{
__gthread_mutex_t mutex;
@@ -23,3 +29,5 @@ void force_error()
rtems_test_assert( mutex != 0 );
}
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
*
@@ -20,7 +26,9 @@
#define CONFIGURE_MAXIMUM_POSIX_KEYS (-1)
#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS (0)
void force_error()
static void force_error(void)
{
/* we should not reach this */
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
*
@@ -19,7 +25,7 @@
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
void force_error()
static void force_error(void)
{
#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT)
rtems_status_code sc;
@@ -39,3 +45,5 @@ void force_error()
_Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_RESOURCE_IN_USE );
#endif
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Copyright (c) 2016 embedded brains GmbH. All rights reserved.
*
@@ -26,7 +32,7 @@ static void timer(rtems_id id, void *arg)
rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
}
void force_error()
static void force_error(void)
{
rtems_status_code sc;
rtems_id id;
@@ -42,3 +48,5 @@ void force_error()
rtems_task_exit();
}
#include "../spfatal_support/spfatalimpl.h"
@@ -1,3 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../spfatal_support/spfatal.h"
/*
* Copyright (c) 2018 embedded brains GmbH. All rights reserved.
*
@@ -20,8 +26,10 @@
#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
#define FATAL_ERROR_EXPECTED_ERROR 1
void force_error()
static void force_error(void)
{
uintptr_t invalid = 1;
free((void *) invalid);
}
#include "../spfatal_support/spfatalimpl.h"
@@ -0,0 +1,14 @@
/*
* COPYRIGHT (c) 1989-2011.
* 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.org/license/LICENSE.
*/
#include <rtems/bspIo.h>
#include <tmacros.h>
rtems_task Init( rtems_task_argument argument );
@@ -7,20 +7,12 @@
* http://www.rtems.org/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/bspIo.h>
#include <tmacros.h>
rtems_task Init( rtems_task_argument argument );
void force_error( void );
#include "testcase.h"
const char rtems_test_name[] = "SPFATAL " FATAL_ERROR_TEST_NAME;
static void print_test_begin_message(void)