diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-17 17:18:11 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:22:34 +0100 |
commit | 2456247ae1c10020a9ae519159dedb497dc8e99f (patch) | |
tree | 04aa9e698e08ec69337eeb2cf06289116965d794 | |
parent | spec: Specify signal numbers (diff) | |
download | rtems-central-2456247ae1c10020a9ae519159dedb497dc8e99f.tar.bz2 |
spec: Validate alignment constants
-rw-r--r-- | spec/rtems/part/req/alignment.yml | 15 | ||||
-rw-r--r-- | spec/rtems/part/val/part.yml | 15 | ||||
-rw-r--r-- | spec/rtems/task/req/storage-alignment.yml | 2 | ||||
-rw-r--r-- | 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 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}. |