diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-19 08:03:32 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-19 08:04:39 +0200 |
commit | 7a7ed32b22cb4c0b0abea7716d8bbef48cae1991 (patch) | |
tree | 40f1ca6985f6a06d08748901799af8adaf7c3cc5 | |
parent | Update company name (diff) | |
download | rtems-central-7a7ed32b22cb4c0b0abea7716d8bbef48cae1991.tar.bz2 |
spec: Add checks to static assert only tests
This ensures that the test cases have at least one test step.
-rw-r--r-- | spec/rtems/scheduler/val/non-smp.yml | 26 | ||||
-rw-r--r-- | spec/rtems/status/val/status.yml | 20 | ||||
-rw-r--r-- | spec/rtems/type/val/type.yml | 9 |
3 files changed, 46 insertions, 9 deletions
diff --git a/spec/rtems/scheduler/val/non-smp.yml b/spec/rtems/scheduler/val/non-smp.yml index c6531ab3..2b8acaf9 100644 --- a/spec/rtems/scheduler/val/non-smp.yml +++ b/spec/rtems/scheduler/val/non-smp.yml @@ -1,13 +1,13 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause copyrights: -- Copyright (C) 2021 embedded brains GmbH & Co. KG +- Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG enabled-by: not: RTEMS_SMP links: [] test-actions: - action-brief: | - Check that calling ${../if/get-processor:/name} is a constant expression - which evaluates to zero. + Assert that ${../if/get-processor:/name} is a constant expression which + evaluates to zero. action-code: | RTEMS_STATIC_ASSERT( rtems_scheduler_get_processor() == 0, GET_PROCESSOR ); checks: [] @@ -15,8 +15,16 @@ test-actions: - role: validation uid: ../req/get-processor-non-smp - action-brief: | - Check that calling ${../if/get-processor-maximum:/name} is a constant - expression which evaluates to zero. + Check that calling ${../if/get-processor:/name} returns zero. + action-code: | + T_eq_u32( rtems_scheduler_get_processor(), 0 ); + checks: [] + links: + - role: validation + uid: ../req/get-processor-non-smp +- action-brief: | + Assert that ${../if/get-processor-maximum:/name} is a constant expression + which evaluates to zero. action-code: | RTEMS_STATIC_ASSERT( rtems_scheduler_get_processor_maximum() == 1, @@ -26,6 +34,14 @@ test-actions: links: - role: validation uid: ../req/get-processor-maximum-non-smp +- action-brief: | + Check that calling ${../if/get-processor-maximum:/name} returns one. + action-code: | + T_eq_u32( rtems_scheduler_get_processor_maximum(), 1 ); + checks: [] + links: + - role: validation + uid: ../req/get-processor-maximum-non-smp test-brief: | This test case collection provides validation test cases for non-SMP requirements of the ${../if/group:/name}. diff --git a/spec/rtems/status/val/status.yml b/spec/rtems/status/val/status.yml index c08600d1..cb800d23 100644 --- a/spec/rtems/status/val/status.yml +++ b/spec/rtems/status/val/status.yml @@ -1,6 +1,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause copyrights: -- Copyright (C) 2021 embedded brains GmbH & Co. KG +- Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG enabled-by: true links: [] test-actions: @@ -10,7 +10,7 @@ test-actions: /* Nothing to do */ checks: - brief: | - Check that ${../if/first:/name} has the expected value and is a constant + Assert that ${../if/first:/name} has the expected value and is a constant expression. code: | RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_FIRST == 0, FIRST ); @@ -18,13 +18,27 @@ test-actions: - role: validation uid: ../req/first - brief: | - Check that ${../if/last:/name} has the expected value and is a constant + Check that ${../if/first:/name} has the expected value. + code: | + T_eq_int( RTEMS_STATUS_CODES_FIRST, 0 ); + links: + - role: validation + uid: ../req/first + - brief: | + Assert that ${../if/last:/name} has the expected value and is a constant expression. code: | RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_LAST == 29, LAST ); links: - role: validation uid: ../req/last + - brief: | + Check that ${../if/last:/name} has the expected value. + code: | + T_eq_int( RTEMS_STATUS_CODES_LAST, 29 ); + links: + - role: validation + uid: ../req/last links: [] test-brief: | Tests some ${../if/group:/name} interfaces. diff --git a/spec/rtems/type/val/type.yml b/spec/rtems/type/val/type.yml index b049b450..ae38f9b5 100644 --- a/spec/rtems/type/val/type.yml +++ b/spec/rtems/type/val/type.yml @@ -1,6 +1,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause copyrights: -- Copyright (C) 2021 embedded brains GmbH & Co. KG +- Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG enabled-by: true links: [] test-actions: @@ -35,6 +35,13 @@ test-actions: links: - role: validation uid: ../req/no-timeout + - brief: | + Check that ${../if/no-timeout:/name} evaluates to a value of zero. + code: | + T_eq_u32( RTEMS_NO_TIMEOUT, 0 ); + links: + - role: validation + uid: ../req/no-timeout links: [] test-brief: | Tests some ${../if/group:/name} interfaces. |