summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-09-28 13:32:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-10-11 08:02:57 +0200
commitb00ec1df11d35067104502d673e35890992e6970 (patch)
treef5a81cca20a464738b583b9c8293a54e73f0192c
parentspec: Move to another acfg group (diff)
downloadrtems-central-b00ec1df11d35067104502d673e35890992e6970.tar.bz2
spec: Add INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
-rw-r--r--spec/score/interr/if/idle-thread-create-failed.yml17
-rw-r--r--spec/score/thread/req/fatal-idle-thread-create-failed.yml18
-rw-r--r--spec/score/thread/val/fatal-idle-thread-create-failed.yml64
-rw-r--r--spec/testsuites/fatal-idle-thread-create-failed.yml36
4 files changed, 135 insertions, 0 deletions
diff --git a/spec/score/interr/if/idle-thread-create-failed.yml b/spec/score/interr/if/idle-thread-create-failed.yml
new file mode 100644
index 00000000..7f2877ca
--- /dev/null
+++ b/spec/score/interr/if/idle-thread-create-failed.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-enumerator
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: group
+name: INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
+references:
+- identifier: internal_errors
+ name: c-user
+ type: document
+type: interface
diff --git a/spec/score/thread/req/fatal-idle-thread-create-failed.yml b/spec/score/thread/req/fatal-idle-thread-create-failed.yml
new file mode 100644
index 00000000..037fa1f1
--- /dev/null
+++ b/spec/score/thread/req/fatal-idle-thread-create-failed.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+- role: requirement-refinement
+ uid: ../if/group
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ If the initialization of an idle thread fails, then the system shall
+ terminate with the ${/score/interr/if/internal-error-core:/name} fatal source
+ and the ${/score/interr/if/idle-thread-create-failed:/name} fatal code.
+type: requirement
diff --git a/spec/score/thread/val/fatal-idle-thread-create-failed.yml b/spec/score/thread/val/fatal-idle-thread-create-failed.yml
new file mode 100644
index 00000000..a2bc547f
--- /dev/null
+++ b/spec/score/thread/val/fatal-idle-thread-create-failed.yml
@@ -0,0 +1,64 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by configuring a task create extension which
+ always fails.
+ action-code: |
+ /* Nothing to do */
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, INTERNAL_ERROR_CORE );
+ links:
+ - role: validation
+ uid: ../req/fatal-idle-thread-create-failed
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-idle-thread-create-failed
+ links: []
+test-brief: |
+ Tests a fatal error caused by a failing task create extension.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is the fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is the fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-idle-thread-create-failed.h
+test-includes:
+- rtems.h
+test-local-includes:
+- tr-fatal-idle-thread-create-failed.h
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/validation/tr-fatal-idle-thread-create-failed.c
+test-teardown: null
+type: test-case
diff --git a/spec/testsuites/fatal-idle-thread-create-failed.yml b/spec/testsuites/fatal-idle-thread-create-failed.yml
new file mode 100644
index 00000000..a805e6e8
--- /dev/null
+++ b/spec/testsuites/fatal-idle-thread-create-failed.yml
@@ -0,0 +1,36 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which is triggered by a fatal
+ error during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ static bool CreateTask( rtems_tcb *executing, rtems_tcb *created )
+ {
+ (void) executing;
+ (void) created;
+ return false;
+ }
+
+ #define FATAL_SYSINIT_RUN ScoreThreadValFatalIdleThreadCreateFailed_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+ #define FATAL_SYSINIT_INITIAL_EXTENSION { .thread_create = CreateTask }
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-idle-thread-create-failed.h
+test-suite-name: FatalIdleThreadCreateFailed
+test-target: testsuites/validation/ts-fatal-idle-thread-create-failed.c
+type: test-suite