diff options
Diffstat (limited to 'spec/req/rtems/modes')
-rw-r--r-- | spec/req/rtems/modes/bit-set.yml | 15 | ||||
-rw-r--r-- | spec/req/rtems/modes/default.yml | 14 | ||||
-rw-r--r-- | spec/req/rtems/modes/masks-all.yml | 16 | ||||
-rw-r--r-- | spec/req/rtems/modes/masks-unique.yml | 14 | ||||
-rw-r--r-- | spec/req/rtems/modes/masks.yml | 16 | ||||
-rw-r--r-- | spec/req/rtems/modes/unique.yml | 14 | ||||
-rw-r--r-- | spec/req/rtems/modes/val/modes.yml | 242 |
7 files changed, 0 insertions, 331 deletions
diff --git a/spec/req/rtems/modes/bit-set.yml b/spec/req/rtems/modes/bit-set.yml deleted file mode 100644 index 04928658..00000000 --- a/spec/req/rtems/modes/bit-set.yml +++ /dev/null @@ -1,15 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/group -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - Each non-default task mode constant shall be a power of two representable as - an integer of type ${/if/rtems/modes/mode:/name}. -type: requirement diff --git a/spec/req/rtems/modes/default.yml b/spec/req/rtems/modes/default.yml deleted file mode 100644 index 3eb1c0c0..00000000 --- a/spec/req/rtems/modes/default.yml +++ /dev/null @@ -1,14 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/group -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - Each default task mode constant shall have a value of zero. -type: requirement diff --git a/spec/req/rtems/modes/masks-all.yml b/spec/req/rtems/modes/masks-all.yml deleted file mode 100644 index ceb0a07f..00000000 --- a/spec/req/rtems/modes/masks-all.yml +++ /dev/null @@ -1,16 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/all-mode-masks -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - The bitwise and of a task mode mask constant and - ${/if/rtems/modes/all-mode-masks:/name} shall be equal to the task mode mask - constant. -type: requirement diff --git a/spec/req/rtems/modes/masks-unique.yml b/spec/req/rtems/modes/masks-unique.yml deleted file mode 100644 index 770faf6d..00000000 --- a/spec/req/rtems/modes/masks-unique.yml +++ /dev/null @@ -1,14 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/group -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - The task mode mask constants and 0xff shall have unique values. -type: requirement diff --git a/spec/req/rtems/modes/masks.yml b/spec/req/rtems/modes/masks.yml deleted file mode 100644 index 9b066881..00000000 --- a/spec/req/rtems/modes/masks.yml +++ /dev/null @@ -1,16 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/group -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - Each task mode mask constant except ${/if/rtems/modes/interrupt-mask} shall - be a power of two representable as an integer of type - ${/if/rtems/modes/mode:/name}. -type: requirement diff --git a/spec/req/rtems/modes/unique.yml b/spec/req/rtems/modes/unique.yml deleted file mode 100644 index 39a39b07..00000000 --- a/spec/req/rtems/modes/unique.yml +++ /dev/null @@ -1,14 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: -- role: requirement-refinement - uid: /if/rtems/modes/group -non-functional-type: interface -rationale: null -references: [] -requirement-type: non-functional -text: | - The non-default task mode constants shall have unique values. -type: requirement diff --git a/spec/req/rtems/modes/val/modes.yml b/spec/req/rtems/modes/val/modes.yml deleted file mode 100644 index cdb67966..00000000 --- a/spec/req/rtems/modes/val/modes.yml +++ /dev/null @@ -1,242 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -enabled-by: true -links: [] -test-actions: -- action: | - /* No action */ - checks: - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_ASR ) ); - description: | - Check that RTEMS_NO_ASR is a power of two representable as an integer of - type rtems_mode. - links: - - role: validation - uid: ../bit-set - - role: validation - uid: /if/rtems/modes/no-asr - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_PREEMPT ) ); - description: | - Check that RTEMS_NO_PREEMPT is a power of two representable as an integer - of type rtems_mode. - links: - - role: validation - uid: ../bit-set - - role: validation - uid: /if/rtems/modes/no-preempt - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE ) ); - description: | - Check that RTEMS_TIMESLICE is a power of two representable as an integer - of type rtems_mode. - links: - - role: validation - uid: ../bit-set - - role: validation - uid: /if/rtems/modes/timeslice - description: | - Validate the non-default task mode constants. - links: [] -- action: | - /* No action */ - checks: - - check: | - T_step_eq_u32( ${step}, RTEMS_ASR, 0 ); - description: | - Check that RTEMS_ASR is equal to zero. - links: - - role: validation - uid: ../default - - role: validation - uid: /if/rtems/modes/asr - - check: | - T_step_eq_u32( ${step}, RTEMS_DEFAULT_MODES, 0 ); - description: | - Check that RTEMS_DEFAULT_MODES is equal to zero. - links: - - role: validation - uid: ../default - - role: validation - uid: /if/rtems/modes/default - - check: | - T_step_eq_u32( ${step}, RTEMS_NO_TIMESLICE, 0 ); - description: | - Check that RTEMS_NO_TIMESLICE is equal to zero. - links: - - role: validation - uid: ../default - - role: validation - uid: /if/rtems/modes/no-timeslice - - check: | - T_step_eq_u32( ${step}, RTEMS_PREEMPT, 0 ); - description: | - Check that RTEMS_PREEMPT is equal to zero. - links: - - role: validation - uid: ../default - - role: validation - uid: /if/rtems/modes/preempt - description: | - Validate the default task mode constants. - links: [] -- action: | - /* No action */ - checks: - - check: | - T_step_eq_u32( - ${step}, - RTEMS_ASR_MASK & RTEMS_ALL_MODE_MASKS, - RTEMS_ASR_MASK - ); - description: | - Check that the bitwise and of RTEMS_ASR_MASK and RTEMS_ALL_MODE_MASKS is - equal to RTEMS_ASR_MASK. - links: - - role: validation - uid: ../masks-all - - role: validation - uid: /if/rtems/modes/asr-mask - - check: | - T_step_eq_u32( - ${step}, - RTEMS_PREEMPT_MASK & RTEMS_ALL_MODE_MASKS, - RTEMS_PREEMPT_MASK - ); - description: | - Check that the bitwise and of RTEMS_PREEMPT_MASK and RTEMS_ALL_MODE_MASKS - is equal to RTEMS_PREEMPT_MASK. - links: - - role: validation - uid: ../masks-all - - role: validation - uid: /if/rtems/modes/preempt-mask - - check: | - T_step_eq_u32( - ${step}, - RTEMS_TIMESLICE_MASK & RTEMS_ALL_MODE_MASKS, - RTEMS_TIMESLICE_MASK - ); - description: | - Check that the bitwise and of RTEMS_TIMESLICE_MASK and - RTEMS_ALL_MODE_MASKS is equal to RTEMS_TIMESLICE_MASK. - links: - - role: validation - uid: ../masks-all - - role: validation - uid: /if/rtems/modes/timeslice-mask - - check: | - T_step_eq_u32( - ${step}, - RTEMS_INTERRUPT_MASK & RTEMS_ALL_MODE_MASKS, - RTEMS_INTERRUPT_MASK - ); - description: | - Check that the bitwise and of RTEMS_INTERRUPT_MASK and - RTEMS_ALL_MODE_MASKS is equal to RTEMS_INTERRUPT_MASK. - links: - - role: validation - uid: ../masks-all - - role: validation - uid: /if/rtems/modes/interrupt-mask - description: | - Validate RTEMS_ALL_MODE_MASKS. - links: [] -- action: | - /* No action */ - checks: - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_ASR_MASK ) ); - description: | - Check that RTEMS_ASR_MASK is a power of two representable as an integer - of type rtems_mode. - links: - - role: validation - uid: ../masks - - role: validation - uid: /if/rtems/modes/asr-mask - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_PREEMPT_MASK ) ); - description: | - Check that RTEMS_PREEMPT_MASK is a power of two representable as an - integer of type rtems_mode. - links: - - role: validation - uid: ../masks - - role: validation - uid: /if/rtems/modes/preempt-mask - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE_MASK ) ); - description: | - Check that RTEMS_TIMESLICE_MASK is a power of two representable as an - integer of type rtems_mode. - links: - - role: validation - uid: ../masks - - role: validation - uid: /if/rtems/modes/timeslice-mask - description: | - Validate the task mode mask constants except RTEMS_INTERRUPT_MASK. - links: [] -- action: | - modes = 0; - modes |= 0xff; - modes |= RTEMS_ASR_MASK; - modes |= RTEMS_PREEMPT_MASK; - modes |= RTEMS_TIMESLICE_MASK; - checks: - - check: | - T_step_eq_int( ${step}, PopCount( modes ), 11 ); - description: | - Check that the count of set bits in the calculated value is equal to the - count of task mode mask constants except RTEMS_INTERRUPT_MASK plus eight. - Since each task mode mask constants except RTEMS_INTERRUPT_MASK is a - power of two and the bitwise and of 0xff and RTEMS_INTERRUPT_MASK is - equal to RTEMS_INTERRUPT_MASK this proves that each constant and 0xff has - a unique value. - links: - - role: validation - uid: ../unique - - role: validation - uid: /if/rtems/modes/asr-mask - - role: validation - uid: /if/rtems/modes/preempt-mask - - role: validation - uid: /if/rtems/modes/timeslice-mask - description: | - Calculate the bitwise or of all task mode mask constants and 0xff. - links: [] -test-brief: | - Tests the task mode constants and function-like macros of the Classic API. -test-description: null -test-epilogue: null -test-fixture: null -test-header: null -test-includes: -- rtems.h -test-local-includes: [] -test-prologue: | - rtems_mode modes; -test-support: | - static bool IsPowerOfTwo( rtems_mode mode ) - { - return mode != 0 && ( mode & ( mode - 1 ) ) == 0; - } - - static int PopCount( rtems_mode modes ) - { - int count; - - count = 0; - - while ( modes != 0 ) { - ++count; - modes &= modes - 1; - } - - return count; - } -test-target: testsuites/validation/tc-modes.c -type: test-case |