diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-10 14:49:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-16 07:40:09 +0100 |
commit | b722d660e6053db94d14d7c240086c8b6d64b601 (patch) | |
tree | 561d9902fc1008c786c2c964f10c98e1b07fd93c | |
parent | spec: Improve interrupt set affinity handling (diff) | |
download | rtems-central-b722d660e6053db94d14d7c240086c8b6d64b601.tar.bz2 |
spec: Specify SMP multitasking start error
5 files changed, 133 insertions, 1 deletions
diff --git a/spec/score/smp/if/fatal-start-on-not-online-processor.yml b/spec/score/smp/if/fatal-start-on-not-online-processor.yml new file mode 100644 index 00000000..a27becbb --- /dev/null +++ b/spec/score/smp/if/fatal-start-on-not-online-processor.yml @@ -0,0 +1,12 @@ +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-define +links: +- role: interface-placement + uid: header-impl +name: SMP_FATAL_START_ON_NOT_ONLINE_PROCESSOR +references: [] +type: interface diff --git a/spec/score/smp/req/fatal-start-on-not-online-processor.yml b/spec/score/smp/req/fatal-start-on-not-online-processor.yml new file mode 100644 index 00000000..12966cb1 --- /dev/null +++ b/spec/score/smp/req/fatal-start-on-not-online-processor.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: RTEMS_SMP +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 multitasking is started on a not online processor, then the system shall + terminate with the ${/score/interr/if/source-smp:/name} fatal source and the + ${../if/fatal-start-on-not-online-processor:/name} fatal code. +type: requirement diff --git a/spec/score/smp/val/fatal-start-of-mandatory-processor-failed.yml b/spec/score/smp/val/fatal-start-of-mandatory-processor-failed.yml index 7d91dfd4..c1782b20 100644 --- a/spec/score/smp/val/fatal-start-of-mandatory-processor-failed.yml +++ b/spec/score/smp/val/fatal-start-of-mandatory-processor-failed.yml @@ -6,7 +6,7 @@ links: [] test-actions: - action-brief: | The test action is carried out by the application configuration of the test - suite. + suite and the wrapped _CPU_SMP_Start_processor(). action-code: | /* Nothing to do */ checks: diff --git a/spec/score/smp/val/fatal-start-on-not-online-processor.yml b/spec/score/smp/val/fatal-start-on-not-online-processor.yml new file mode 100644 index 00000000..93947064 --- /dev/null +++ b/spec/score/smp/val/fatal-start-on-not-online-processor.yml @@ -0,0 +1,74 @@ +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: RTEMS_SMP +links: [] +test-actions: +- action-brief: | + The test action is carried out by the wrapped _CPU_SMP_Start_processor(). + action-code: | + /* Nothing to do */ + checks: + - brief: | + Check that the expected fatal source is present. + code: | + T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_SMP ); + links: + - role: validation + uid: ../req/fatal-start-on-not-online-processor + - brief: | + Check that the expected fatal code is present. + code: | + T_step_eq_ulong( + ${step}, + ctx->code, + SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR + ); + links: + - role: validation + uid: ../req/fatal-start-on-not-online-processor + links: + - role: validation + uid: /acfg/req/scheduler-assign-processor-mandatory +test-brief: | + Tests a fatal error. +test-context: [] +test-context-support: null +test-description: null +test-header: + code: null + freestanding: true + includes: + - rtems.h + local-includes: [] + run-params: + - description: | + is fatal source. + dir: null + name: source + specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name} + - description: | + is fatal code. + dir: null + name: code + specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name} + target: testsuites/validation/tr-fatal-start-on-not-online-processor.h +test-includes: +- rtems/score/smpimpl.h +test-local-includes: +- tr-fatal-start-on-not-online-processor.h +test-setup: null +test-stop: null +test-support: | + bool __real__CPU_SMP_Start_processor( uint32_t cpu_index ); + + bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index ); + + bool __wrap__CPU_SMP_Start_processor( uint32_t cpu_index ) + { + (void) __real__CPU_SMP_Start_processor( cpu_index ); + return false; + } +test-target: testsuites/validation/tr-fatal-start-on-not-online-processor.c +test-teardown: null +type: test-case diff --git a/spec/testsuites/fatal-start-on-not-online-processor.yml b/spec/testsuites/fatal-start-on-not-online-processor.yml new file mode 100644 index 00000000..87e5b5e8 --- /dev/null +++ b/spec/testsuites/fatal-start-on-not-online-processor.yml @@ -0,0 +1,28 @@ +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: RTEMS_SMP +links: +- role: requirement-refinement + uid: /req/test-suites +test-brief: | + This validation test suite contains a test case which triggers a fatal error + during system initialization. +test-code: | + const char rtems_test_name[] = "${.:/test-suite-name}"; + + #define FATAL_SYSINIT_RUN ScoreSmpValFatalStartOnNotOnlineProcessor_Run + + #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + + #define CONFIGURE_MAXIMUM_PROCESSORS 2 + + #include "ts-fatal-sysinit.h" +test-description: null +test-includes: [] +test-local-includes: +- tr-fatal-start-on-not-online-processor.h +- ts-config.h +test-suite-name: FatalStartOnNotOnlineProcessor +test-target: testsuites/validation/ts-fatal-start-on-not-online-processor.c +type: test-suite |