summaryrefslogtreecommitdiffstats
path: root/spec/rtems/task/req
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-20 08:07:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-24 12:02:01 +0200
commit196cf4ba47419e7e06514eeeee8594078497d357 (patch)
tree01a5ee4d1a5fea19a549468f5c2fccaefe137e7e /spec/rtems/task/req
parentspec: Specify timeout with priority inherit (diff)
downloadrtems-central-196cf4ba47419e7e06514eeeee8594078497d357.tar.bz2
spec: Update due to API changes
Diffstat (limited to 'spec/rtems/task/req')
-rw-r--r--spec/rtems/task/req/delete.yml25
-rw-r--r--spec/rtems/task/req/exit.yml11
-rw-r--r--spec/rtems/task/req/restart.yml25
3 files changed, 26 insertions, 35 deletions
diff --git a/spec/rtems/task/req/delete.yml b/spec/rtems/task/req/delete.yml
index 7f9519bf..4c886abe 100644
--- a/spec/rtems/task/req/delete.yml
+++ b/spec/rtems/task/req/delete.yml
@@ -724,7 +724,7 @@ test-setup:
);
T_rsc_success( sc );
- SetFatalExtension( Fatal );
+ SetFatalHandler( Fatal, ctx );
SetTaskSwitchExtension( TaskSwitch );
SetSelfPriority( PRIO_NORMAL );
@@ -802,39 +802,34 @@ test-support: |
static void Fatal(
rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code code
+ rtems_fatal_code code,
+ void *arg
)
{
Context *ctx;
T_eq_int( source, INTERNAL_ERROR_CORE );
- T_false( always_set_to_false );
T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
- ctx = T_fixture_context();
+ ctx = arg;
++ctx->calls.fatal;
T_assert_eq_int( ctx->calls.fatal, 1 );
-
- ctx = T_fixture_context();
longjmp( ctx->thread_dispatch_context, 1 );
}
static void ResumeThreadDispatch(
rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code code
+ rtems_fatal_code code,
+ void *arg
)
{
Context *ctx;
T_eq_int( source, INTERNAL_ERROR_CORE );
- T_false( always_set_to_false );
T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
- SetFatalExtension( Fatal );
-
- ctx = T_fixture_context();
+ ctx = arg;
+ SetFatalHandler( Fatal, ctx );
longjmp( ctx->thread_dispatch_context, 1 );
}
@@ -931,7 +926,7 @@ test-support: |
if ( ctx->blocked ) {
Per_CPU_Control *cpu_self;
- SetFatalExtension( ResumeThreadDispatch );
+ SetFatalHandler( ResumeThreadDispatch, ctx );
cpu_self = _Thread_Dispatch_disable();
if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
@@ -1103,7 +1098,7 @@ test-teardown:
sc = rtems_extension_delete( ctx->extension_id );
T_rsc_success( sc );
- SetFatalExtension( NULL );
+ SetFatalHandler( NULL, NULL );
SetTaskSwitchExtension( NULL );
DeleteTask( ctx->deleter_id );
DeleteTask( ctx->deleter_2_id );
diff --git a/spec/rtems/task/req/exit.yml b/spec/rtems/task/req/exit.yml
index 5b4d7b0b..521b136e 100644
--- a/spec/rtems/task/req/exit.yml
+++ b/spec/rtems/task/req/exit.yml
@@ -340,7 +340,7 @@ test-setup:
);
T_rsc_success( sc );
- SetFatalExtension( Fatal );
+ SetFatalHandler( Fatal, ctx );
SetSelfPriority( PRIO_NORMAL );
ctx->deleter_id = CreateTask( "DELE", PRIO_HIGH );
@@ -421,19 +421,18 @@ test-support: |
static void Fatal(
rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code code
+ rtems_fatal_code code,
+ void *arg
)
{
Context *ctx;
T_scheduler_log *log;
Per_CPU_Control *cpu_self;
- ctx = T_fixture_context();
+ ctx = arg;
++ctx->fatal_extension_calls;
T_eq_int( source, INTERNAL_ERROR_CORE );
- T_false( always_set_to_false );
T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
T_assert_eq_int( ctx->fatal_extension_calls, 1 );
@@ -496,7 +495,7 @@ test-teardown:
sc = rtems_extension_delete( ctx->extension_id );
T_rsc_success( sc );
- SetFatalExtension( NULL );
+ SetFatalHandler( NULL, NULL );
DeleteTask( ctx->deleter_id );
RestoreRunnerASR();
RestoreRunnerPriority();
diff --git a/spec/rtems/task/req/restart.yml b/spec/rtems/task/req/restart.yml
index ed6cbf67..813ecf97 100644
--- a/spec/rtems/task/req/restart.yml
+++ b/spec/rtems/task/req/restart.yml
@@ -882,7 +882,7 @@ test-setup:
);
T_rsc_success( sc );
- SetFatalExtension( Fatal );
+ SetFatalHandler( Fatal, ctx );
SetSelfPriority( PRIO_NORMAL );
ctx->deleter_id = CreateTask( "DELE", PRIO_HIGH );
@@ -1038,18 +1038,17 @@ test-support: |
static void Fatal(
rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code code
+ rtems_fatal_code code,
+ void *arg
)
{
Context *ctx;
Per_CPU_Control *cpu_self;
T_eq_int( source, INTERNAL_ERROR_CORE );
- T_false( always_set_to_false );
T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
- ctx = T_fixture_context();
+ ctx = arg;
++ctx->calls.fatal;
T_assert_eq_int( ctx->calls.fatal, 1 );
@@ -1062,19 +1061,17 @@ test-support: |
static void ResumeThreadDispatch(
rtems_fatal_source source,
- bool always_set_to_false,
- rtems_fatal_code code
+ rtems_fatal_code code,
+ void *arg
)
{
Context *ctx;
T_eq_int( source, INTERNAL_ERROR_CORE );
- T_false( always_set_to_false );
T_eq_ulong( code, INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
- SetFatalExtension( Fatal );
-
- ctx = T_fixture_context();
+ ctx = arg;
+ SetFatalHandler( Fatal, ctx );
longjmp( ctx->thread_dispatch_context, 1 );
}
@@ -1084,7 +1081,7 @@ test-support: |
)
{
WrapThreadQueueExtract( &ctx->wrap_tq_ctx, ctx->worker_tcb );
- SetFatalExtension( ResumeThreadDispatch );
+ SetFatalHandler( ResumeThreadDispatch, ctx );
if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
(void) rtems_task_restart(
@@ -1111,7 +1108,7 @@ test-support: |
if ( ctx->interrupt || ctx->nested_request ) {
if ( ctx->blocked ) {
- SetFatalExtension( ResumeThreadDispatch );
+ SetFatalHandler( ResumeThreadDispatch, ctx );
cpu_self = _Thread_Dispatch_disable();
if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
@@ -1258,7 +1255,7 @@ test-teardown:
sc = rtems_extension_delete( ctx->extension_id );
T_rsc_success( sc );
- SetFatalExtension( NULL );
+ SetFatalHandler( NULL, NULL );
DeleteTask( ctx->deleter_id );
ReleaseMutex( ctx->mutex_id );
DeleteMutex( ctx->mutex_id );