diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-11 20:08:46 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-12 09:47:20 +0100 |
commit | 1a48cbfa16bf54a442f9394e4c4d9c2211e82865 (patch) | |
tree | 929eba7ba5e91ae9ae31f77547353dbb04ea5da4 /testsuites/sptests/spfatal01/init.c | |
parent | tests: Simplify fatal error test support (diff) | |
download | rtems-1a48cbfa16bf54a442f9394e4c4d9c2211e82865.tar.bz2 |
sptests: Avoid include path magic
Update #3818.
Diffstat (limited to 'testsuites/sptests/spfatal01/init.c')
-rw-r--r-- | testsuites/sptests/spfatal01/init.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal01/init.c b/testsuites/sptests/spfatal01/init.c new file mode 100644 index 0000000000..95067e74c6 --- /dev/null +++ b/testsuites/sptests/spfatal01/init.c @@ -0,0 +1,48 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "../spfatal_support/spfatal.h" + +/* + * Classic API Init task create failure + */ + +/* + * 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 0 +rtems_initialization_tasks_table Initialization_tasks[] = { + { rtems_build_name('I', 'N', 'I', ' '), + 32UL * 1024UL, + 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 "1" +#define FATAL_ERROR_DESCRIPTION "Classic API Init task create failure" +#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE +#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED + +static void force_error(void) +{ +/* + * Case 2: Null entry + * Case 3: semaphore_create + * _Thread_Dispatch_disable + * semaphore_obtain + */ + + /* we will not run this far */ +} + +#include "../spfatal_support/spfatalimpl.h" |