diff options
Diffstat (limited to 'spec/rtems/mode/val/modes.yml')
-rw-r--r-- | spec/rtems/mode/val/modes.yml | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/spec/rtems/mode/val/modes.yml b/spec/rtems/mode/val/modes.yml index e1d71a2c..b1bdb621 100644 --- a/spec/rtems/mode/val/modes.yml +++ b/spec/rtems/mode/val/modes.yml @@ -4,183 +4,185 @@ copyrights: enabled-by: true links: [] test-actions: -- action: | +- action-brief: | + Validate the non-default task mode constants. + action-code: | /* No action */ checks: - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_ASR ) ); - description: | + - brief: | Check that RTEMS_NO_ASR is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_ASR ) ); links: - role: validation uid: ../req/bit-set - role: validation uid: ../if/no-asr - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_PREEMPT ) ); - description: | + - brief: | Check that RTEMS_NO_PREEMPT is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_PREEMPT ) ); links: - role: validation uid: ../req/bit-set - role: validation uid: ../if/no-preempt - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE ) ); - description: | + - brief: | Check that RTEMS_TIMESLICE is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE ) ); links: - role: validation uid: ../req/bit-set - role: validation uid: ../if/timeslice - description: | - Validate the non-default task mode constants. links: [] -- action: | +- action-brief: | + Validate the default task mode constants. + action-code: | /* No action */ checks: - - check: | - T_step_eq_u32( ${step}, RTEMS_ASR, 0 ); - description: | + - brief: | Check that RTEMS_ASR is equal to zero. + code: | + T_step_eq_u32( ${step}, RTEMS_ASR, 0 ); links: - role: validation uid: ../req/default - role: validation uid: ../if/asr - - check: | - T_step_eq_u32( ${step}, RTEMS_DEFAULT_MODES, 0 ); - description: | + - brief: | Check that RTEMS_DEFAULT_MODES is equal to zero. + code: | + T_step_eq_u32( ${step}, RTEMS_DEFAULT_MODES, 0 ); links: - role: validation uid: ../req/default - role: validation uid: ../if/default - - check: | - T_step_eq_u32( ${step}, RTEMS_NO_TIMESLICE, 0 ); - description: | + - brief: | Check that RTEMS_NO_TIMESLICE is equal to zero. + code: | + T_step_eq_u32( ${step}, RTEMS_NO_TIMESLICE, 0 ); links: - role: validation uid: ../req/default - role: validation uid: ../if/no-timeslice - - check: | - T_step_eq_u32( ${step}, RTEMS_PREEMPT, 0 ); - description: | + - brief: | Check that RTEMS_PREEMPT is equal to zero. + code: | + T_step_eq_u32( ${step}, RTEMS_PREEMPT, 0 ); links: - role: validation uid: ../req/default - role: validation uid: ../if/preempt - description: | - Validate the default task mode constants. links: [] -- action: | +- action-brief: | + Validate RTEMS_ALL_MODE_MASKS. + action-code: | /* No action */ checks: - - check: | + - brief: | + Check that the bitwise and of RTEMS_ASR_MASK and RTEMS_ALL_MODE_MASKS is + equal to RTEMS_ASR_MASK. + code: | 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: ../req/masks-all - role: validation uid: ../if/asr-mask - - check: | + - brief: | + Check that the bitwise and of RTEMS_PREEMPT_MASK and RTEMS_ALL_MODE_MASKS + is equal to RTEMS_PREEMPT_MASK. + code: | 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: ../req/masks-all - role: validation uid: ../if/preempt-mask - - check: | + - brief: | + Check that the bitwise and of RTEMS_TIMESLICE_MASK and + RTEMS_ALL_MODE_MASKS is equal to RTEMS_TIMESLICE_MASK. + code: | 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: ../req/masks-all - role: validation uid: ../if/timeslice-mask - - check: | + - brief: | + Check that the bitwise and of RTEMS_INTERRUPT_MASK and + RTEMS_ALL_MODE_MASKS is equal to RTEMS_INTERRUPT_MASK. + code: | 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: ../req/masks-all - role: validation uid: ../if/interrupt-mask - description: | - Validate RTEMS_ALL_MODE_MASKS. links: [] -- action: | +- action-brief: | + Validate the task mode mask constants except RTEMS_INTERRUPT_MASK. + action-code: | /* No action */ checks: - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_ASR_MASK ) ); - description: | + - brief: | Check that RTEMS_ASR_MASK is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_ASR_MASK ) ); links: - role: validation uid: ../req/masks - role: validation uid: ../if/asr-mask - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_PREEMPT_MASK ) ); - description: | + - brief: | Check that RTEMS_PREEMPT_MASK is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_PREEMPT_MASK ) ); links: - role: validation uid: ../req/masks - role: validation uid: ../if/preempt-mask - - check: | - T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE_MASK ) ); - description: | + - brief: | Check that RTEMS_TIMESLICE_MASK is a power of two representable as an integer of type rtems_mode. + code: | + T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE_MASK ) ); links: - role: validation uid: ../req/masks - role: validation uid: ../if/timeslice-mask - description: | - Validate the task mode mask constants except RTEMS_INTERRUPT_MASK. links: [] -- action: | +- action-brief: | + Calculate the bitwise or of all task mode mask constants and 0xff. + action-code: | rtems_mode modes; modes = 0; @@ -189,15 +191,15 @@ test-actions: modes |= RTEMS_PREEMPT_MASK; modes |= RTEMS_TIMESLICE_MASK; checks: - - check: | - T_step_eq_int( ${step}, PopCount( modes ), 11 ); - description: | + - brief: | 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. + code: | + T_step_eq_int( ${step}, PopCount( modes ), 11 ); links: - role: validation uid: ../req/unique @@ -207,8 +209,6 @@ test-actions: uid: ../if/preempt-mask - role: validation uid: ../if/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. |