[rtems-central commit] spec: Specify EDF SMP set affinity error
Sebastian Huber
sebh at rtems.org
Fri Nov 19 07:51:57 UTC 2021
Module: rtems-central
Branch: master
Commit: 5b5b9bf489edf12be67620e773377f0d5f72ae01
Changeset: http://git.rtems.org/rtems-central/commit/?id=5b5b9bf489edf12be67620e773377f0d5f72ae01
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Nov 19 08:19:48 2021 +0100
spec: Specify EDF SMP set affinity error
---
.../edf/req/set-affinity-unsupported-subset.yml | 20 +++++++++
spec/score/sched/smp/edf/val/edf.yml | 50 ++++++++++++++++++++++
spec/score/status/if/invalid-number.yml | 12 ++++++
3 files changed, 82 insertions(+)
diff --git a/spec/score/sched/smp/edf/req/set-affinity-unsupported-subset.yml b/spec/score/sched/smp/edf/req/set-affinity-unsupported-subset.yml
new file mode 100644
index 0000000..8efdea3
--- /dev/null
+++ b/spec/score/sched/smp/edf/req/set-affinity-unsupported-subset.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: RTEMS_SMP
+links:
+- role: requirement-refinement
+ uid: group
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While a thread to processor affinity set is a proper subset of the set of the
+ online processors, while the affinity set contains at least two processors,
+ while at least one processor of the affinity set is owned by a scheduler,
+ while a thread uses the scheduler as its ${/glossary/scheduler-home:/term},
+ when an attempt is made to set the thread to processor affinity set of the
+ thread to the affinity set, the operation shall abort with an error status
+ derived from ${/score/status/if/invalid-number:/name}.
+type: requirement
diff --git a/spec/score/sched/smp/edf/val/edf.yml b/spec/score/sched/smp/edf/val/edf.yml
new file mode 100644
index 0000000..4883b98
--- /dev/null
+++ b/spec/score/sched/smp/edf/val/edf.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ Validate a set affinity error case with an unsupported subset.
+ action-code: |
+ if ( rtems_scheduler_get_processor_maximum() >= 3 ) {
+ rtems_status_code sc;
+ cpu_set_t affinity;
+
+ CPU_ZERO( &affinity );
+ CPU_SET( 0, &affinity );
+ CPU_SET( 1, &affinity );
+
+ RemoveProcessor( SCHEDULER_B_ID, 1 );
+ RemoveProcessor( SCHEDULER_C_ID, 2 );
+ AddProcessor( SCHEDULER_A_ID, 1 );
+ AddProcessor( SCHEDULER_B_ID, 2 );
+
+ sc = rtems_task_set_affinity( RTEMS_SELF, sizeof( affinity), &affinity );
+ T_rsc( sc, RTEMS_INVALID_NUMBER );
+
+ RemoveProcessor( SCHEDULER_A_ID, 1 );
+ RemoveProcessor( SCHEDULER_B_ID, 2 );
+ AddProcessor( SCHEDULER_B_ID, 1 );
+ AddProcessor( SCHEDULER_C_ID, 2 );
+ }
+ checks: []
+ links:
+ - role: validation
+ uid: ../req/set-affinity-unsupported-subset
+test-brief: |
+ Tests for operations of the EDF SMP scheduler.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems.h
+test-local-includes:
+- tx-support.h
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/validation/tc-sched-smp-edf.c
+test-teardown: null
+type: test-case
diff --git a/spec/score/status/if/invalid-number.yml b/spec/score/status/if/invalid-number.yml
new file mode 100644
index 0000000..2381100
--- /dev/null
+++ b/spec/score/status/if/invalid-number.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified
+links:
+- role: interface-placement
+ uid: header
+name: STATUS_INVALID_NUMBER
+references: []
+type: interface
More information about the vc
mailing list