[rtems-central commit] spec: Validate alignment constants
Sebastian Huber
sebh at rtems.org
Fri Nov 19 07:51:57 UTC 2021
Module: rtems-central
Branch: master
Commit: 2456247ae1c10020a9ae519159dedb497dc8e99f
Changeset: http://git.rtems.org/rtems-central/commit/?id=2456247ae1c10020a9ae519159dedb497dc8e99f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 17 17:18:11 2021 +0100
spec: Validate alignment constants
---
spec/rtems/part/req/alignment.yml | 15 +++++++++++++++
spec/rtems/part/val/part.yml | 15 ++++++++++++++-
spec/rtems/task/req/storage-alignment.yml | 2 +-
spec/rtems/task/val/task.yml | 12 ++++++++++++
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 0000000..45844b4
--- /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 3b3ad1d..00c24ba 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 cf1317f..0f78a27 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 01757c8..36c0046 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}.
More information about the vc
mailing list