summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-17 17:18:11 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-19 08:22:34 +0100
commit2456247ae1c10020a9ae519159dedb497dc8e99f (patch)
tree04aa9e698e08ec69337eeb2cf06289116965d794
parentspec: Specify signal numbers (diff)
downloadrtems-central-2456247ae1c10020a9ae519159dedb497dc8e99f.tar.bz2
spec: Validate alignment constants
-rw-r--r--spec/rtems/part/req/alignment.yml15
-rw-r--r--spec/rtems/part/val/part.yml15
-rw-r--r--spec/rtems/task/req/storage-alignment.yml2
-rw-r--r--spec/rtems/task/val/task.yml12
4 files changed, 42 insertions, 2 deletions
diff --git a/spec/rtems/part/req/alignment.yml b/spec/rtems/part/req/alignment.yml
new file mode 100644
index 00000000..45844b4f
--- /dev/null
+++ b/spec/rtems/part/req/alignment.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: interface-function
+ uid: ../if/alignment
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The ${../if/alignment:/name} constant shall expand to a constant expression
+ which evaluates to the value of ${/score/cpu/if/sizeof-pointer:/name}.
+type: requirement
diff --git a/spec/rtems/part/val/part.yml b/spec/rtems/part/val/part.yml
index 3b3ad1d6..00c24ba5 100644
--- a/spec/rtems/part/val/part.yml
+++ b/spec/rtems/part/val/part.yml
@@ -95,8 +95,21 @@ test-actions:
- role: validation
uid: ../req/fifo
links: []
+- action-brief: |
+ Assert that ${../if/alignment:/name} is a constant expression which
+ evaluates to the expected value.
+ action-code: |
+ RTEMS_STATIC_ASSERT(
+ RTEMS_PARTITION_ALIGNMENT == CPU_SIZEOF_POINTER,
+ ALIGNMENT
+ );
+ checks: []
+ links:
+ - role: validation
+ uid: ../req/alignment
test-brief: |
- Validates some functional requirements of the Partition Manager.
+ This test case collection provides validation test cases for requirements of
+ the ${../if/group:/name}.
test-context: []
test-context-support: null
test-description: null
diff --git a/spec/rtems/task/req/storage-alignment.yml b/spec/rtems/task/req/storage-alignment.yml
index cf1317fc..0f78a277 100644
--- a/spec/rtems/task/req/storage-alignment.yml
+++ b/spec/rtems/task/req/storage-alignment.yml
@@ -10,7 +10,7 @@ rationale: null
references: []
requirement-type: functional
text: |
- The ${../if/storage-alignment:/name} define shall expand to a constant
+ The ${../if/storage-alignment:/name} constant shall expand to a constant
expression which evaluates to the value of
${/score/cpu/if/stack-alignment:/name}.
type: requirement
diff --git a/spec/rtems/task/val/task.yml b/spec/rtems/task/val/task.yml
index 01757c87..36c00460 100644
--- a/spec/rtems/task/val/task.yml
+++ b/spec/rtems/task/val/task.yml
@@ -89,6 +89,18 @@ test-actions:
- role: validation
uid: ../req/iterate-stop
links: []
+- action-brief: |
+ Assert that ${../if/storage-alignment:/name} is a constant expression which
+ evaluates to the expected value.
+ action-code: |
+ RTEMS_STATIC_ASSERT(
+ RTEMS_TASK_STORAGE_ALIGNMENT == CPU_STACK_ALIGNMENT,
+ STORAGE_ALIGNMENT
+ );
+ checks: []
+ links:
+ - role: validation
+ uid: ../req/storage-alignment
test-brief: |
This test case collection provides validation test cases for requirements of
the ${../if/group:/name}.