summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 13:22:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 14:23:43 +0100
commitf8cd9770fe28836746883a19343508df92c436c8 (patch)
tree015b14ccdb05000cf6b586de65dc328771b2f345
parentvalidation: Do not pass NULL context (diff)
downloadrtems-central-f8cd9770fe28836746883a19343508df92c436c8.tar.bz2
spec: Rename test case action attributes
The new attribute keys make it easier to write test cases.
-rw-r--r--rtemsspec/tests/spec-validation/tc.yml36
-rw-r--r--rtemsspec/tests/spec-validation/tc2.yml24
-rw-r--r--rtemsspec/tests/spec-validation/tc3.yml12
-rw-r--r--rtemsspec/tests/spec-validation/tc5.yml36
-rw-r--r--rtemsspec/tests/spec-validation/tc7.yml8
-rw-r--r--rtemsspec/validation.py8
-rw-r--r--spec/rtems/attr/val/attr.yml160
-rw-r--r--spec/rtems/barrier/val/ident.yml8
-rw-r--r--spec/rtems/basedefs/val/basedefs.yml808
-rw-r--r--spec/rtems/event/val/event-constant.yml296
-rw-r--r--spec/rtems/event/val/events.yml36
-rw-r--r--spec/rtems/event/val/send-receive.yml8
-rw-r--r--spec/rtems/event/val/system-send-receive.yml8
-rw-r--r--spec/rtems/message/val/ident.yml8
-rw-r--r--spec/rtems/mode/val/modes.yml128
-rw-r--r--spec/rtems/option/val/options.yml54
-rw-r--r--spec/rtems/part/val/ident.yml8
-rw-r--r--spec/rtems/part/val/part.yml24
-rw-r--r--spec/rtems/ratemon/val/ident.yml8
-rw-r--r--spec/rtems/sem/val/ident.yml8
-rw-r--r--spec/rtems/timer/val/ident.yml8
-rw-r--r--spec/rtems/userext/val/ident.yml8
-rw-r--r--spec/spec/test-case-action.yml10
-rw-r--r--spec/spec/test-case-check.yml10
-rw-r--r--spec/testsuites/validation/c-library.yml56
-rw-r--r--spec/testsuites/validation/classic-barrier.yml64
26 files changed, 921 insertions, 921 deletions
diff --git a/rtemsspec/tests/spec-validation/tc.yml b/rtemsspec/tests/spec-validation/tc.yml
index 782ea763..0ee06063 100644
--- a/rtemsspec/tests/spec-validation/tc.yml
+++ b/rtemsspec/tests/spec-validation/tc.yml
@@ -4,37 +4,37 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case action 0 description.
+ action-code: |
/* Test case action 0 code */
checks:
- - check: |
- /* Test case action 0 check 0 code: ${steps/123} */
- description: |
+ - brief: |
Test case action 0 check 0 description.
+ code: |
+ /* Test case action 0 check 0 code: ${steps/123} */
links: []
- - check: |
- /* Test case action 0 check 1 code; step ${step} */
- description: |
+ - brief: |
Test case action 0 check 1 description.
+ code: |
+ /* Test case action 0 check 1 code; step ${step} */
links: []
- description: |
- Test case action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case action 1 description.
+ action-code: |
/* Test case action 1 code */
checks:
- - check: |
- /* Test case action 1 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case action 1 check 0 description.
+ code: |
+ /* Test case action 1 check 0 code; step ${step} */
links: []
- - check: |
- /* Test case action 1 check 1 code */
- description: |
+ - brief: |
Test case action 1 check 1 description.
+ code: |
+ /* Test case action 1 check 1 code */
links: []
- description: |
- Test case action 1 description.
links: []
test-brief: Test case brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc2.yml b/rtemsspec/tests/spec-validation/tc2.yml
index fc389198..0f56f380 100644
--- a/rtemsspec/tests/spec-validation/tc2.yml
+++ b/rtemsspec/tests/spec-validation/tc2.yml
@@ -4,27 +4,27 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case 2 action 0 description.
+ action-code: |
/* Test case 2 action 0 code */
checks:
- - check: |
- /* Test case 2 action 0 check 0 code */
- description: |
+ - brief: |
Test case 2 action 0 check 0 description.
+ code: |
+ /* Test case 2 action 0 check 0 code */
links: []
- - check: |
- /* Test case 2 action 0 check 1 code */
- description: |
+ - brief: |
Test case 2 action 0 check 1 description.
+ code: |
+ /* Test case 2 action 0 check 1 code */
links: []
- description: |
- Test case 2 action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case 2 action 1 description.
+ action-code: |
/* Test case 2 action 1 code */
checks: []
- description: |
- Test case 2 action 1 description.
links: []
test-brief: Test case 2 brief description.
test-context:
diff --git a/rtemsspec/tests/spec-validation/tc3.yml b/rtemsspec/tests/spec-validation/tc3.yml
index f8293a61..0914c522 100644
--- a/rtemsspec/tests/spec-validation/tc3.yml
+++ b/rtemsspec/tests/spec-validation/tc3.yml
@@ -4,16 +4,16 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case 3 action 0 description.
+ action-code: |
/* Test case 3 action 0 code */
checks:
- - check: |
- /* Test case 3 action 0 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case 3 action 0 check 0 description.
+ code: |
+ /* Test case 3 action 0 check 0 code; step ${step} */
links: []
- description: |
- Test case 3 action 0 description.
links: []
test-brief: Test case 3 brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc5.yml b/rtemsspec/tests/spec-validation/tc5.yml
index 00866c9c..ee603675 100644
--- a/rtemsspec/tests/spec-validation/tc5.yml
+++ b/rtemsspec/tests/spec-validation/tc5.yml
@@ -4,37 +4,37 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case action 0 description.
+ action-code: |
/* Test case action 0 code */
checks:
- - check: |
- /* Test case action 0 check 0 code */
- description: |
+ - brief: |
Test case action 0 check 0 description.
+ code: |
+ /* Test case action 0 check 0 code */
links: []
- - check: |
- /* Test case action 0 check 1 code; step ${step} */
- description: |
+ - brief: |
Test case action 0 check 1 description.
+ code: |
+ /* Test case action 0 check 1 code; step ${step} */
links: []
- description: |
- Test case action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case action 1 description.
+ action-code: |
/* Test case action 1 code */
checks:
- - check: |
- /* Test case action 1 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case action 1 check 0 description.
+ code: |
+ /* Test case action 1 check 0 code; step ${step} */
links: []
- - check: |
- /* Test case action 1 check 1 code */
- description: |
+ - brief: |
Test case action 1 check 1 description.
+ code: |
+ /* Test case action 1 check 1 code */
links: []
- description: |
- Test case action 1 description.
links: []
test-brief: Test case 5 brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc7.yml b/rtemsspec/tests/spec-validation/tc7.yml
index bdcf1e04..93797cee 100644
--- a/rtemsspec/tests/spec-validation/tc7.yml
+++ b/rtemsspec/tests/spec-validation/tc7.yml
@@ -4,11 +4,11 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
- /* ${step} */
- checks: []
- description: |
+- action-brief: |
Action.
+ action-code: |
+ /* ${step} */
+ checks: []
links: []
test-brief: null
test-context: []
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index f2f2d786..64e08f54 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -181,10 +181,10 @@ class _TestItem:
if actions:
content.add("This test case performs the following actions:")
for action in actions:
- content.wrap(self.substitute_text(action["description"]),
+ content.wrap(self.substitute_text(action["action-brief"]),
initial_indent="- ")
for check in action["checks"]:
- content.wrap(self.substitute_text(check["description"]),
+ content.wrap(self.substitute_text(check["brief"]),
initial_indent=" - ",
subsequent_indent=" ")
@@ -201,9 +201,9 @@ class _TestItem:
actions.gap = False
actions.call_function(None, method, args)
with content.function("static void", method, params):
- content.add(self.substitute_code(action["action"]))
+ content.add(self.substitute_code(action["action-code"]))
for check in action["checks"]:
- content.append(self.substitute_text(check["check"]))
+ content.append(self.substitute_text(check["code"]))
return actions
def _get_run_params(self, header: Optional[Dict[str, Any]]) -> List[str]:
diff --git a/spec/rtems/attr/val/attr.yml b/spec/rtems/attr/val/attr.yml
index 1e2b58ab..eea9f10f 100644
--- a/spec/rtems/attr/val/attr.yml
+++ b/spec/rtems/attr/val/attr.yml
@@ -4,202 +4,204 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Validate the non-default attribute constants.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_BARRIER_AUTOMATIC_RELEASE ) );
- description: |
+ - brief: |
Check that RTEMS_BARRIER_AUTOMATIC_RELEASE is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_BARRIER_AUTOMATIC_RELEASE ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/barrier-automatic-release
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_BINARY_SEMAPHORE ) );
- description: |
+ - brief: |
Check that RTEMS_BINARY_SEMAPHORE is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_BINARY_SEMAPHORE ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/binary-semaphore
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_FLOATING_POINT ) );
- description: |
+ - brief: |
Check that RTEMS_FLOATING_POINT is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_FLOATING_POINT ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/floating-point
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_GLOBAL ) );
- description: |
+ - brief: |
Check that RTEMS_GLOBAL is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_GLOBAL ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/global
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_INHERIT_PRIORITY ) );
- description: |
+ - brief: |
Check that RTEMS_INHERIT_PRIORITY is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_INHERIT_PRIORITY ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/inherit-priority
- - check: |
+ - brief: |
+ Check that RTEMS_MULTIPROCESSOR_RESOURCE_SHARING is a power of two.
+ code: |
T_step_true(
${step},
IsPowerOfTwo( RTEMS_MULTIPROCESSOR_RESOURCE_SHARING )
);
- description: |
- Check that RTEMS_MULTIPROCESSOR_RESOURCE_SHARING is a power of two.
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/multiprocessor-resource-sharing
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY ) );
- description: |
+ - brief: |
Check that RTEMS_PRIORITY is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/priority
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY_CEILING ) );
- description: |
+ - brief: |
Check that RTEMS_PRIORITY_CEILING is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY_CEILING ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/priority-ceiling
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_SIMPLE_BINARY_SEMAPHORE ) );
- description: |
+ - brief: |
Check that RTEMS_SIMPLE_BINARY_SEMAPHORE is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_SIMPLE_BINARY_SEMAPHORE ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/simple-binary-semaphore
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_SYSTEM_TASK ) );
- description: |
+ - brief: |
Check that RTEMS_SYSTEM_TASK is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_SYSTEM_TASK ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/system-task
- description: |
- Validate the non-default attribute constants.
links: []
-- action: |
+- action-brief: |
+ Validate the default attribute constants.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_APPLICATION_TASK, 0 );
- description: |
+ - brief: |
Check that RTEMS_APPLICATION_TASK is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_APPLICATION_TASK, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/application-task
- - check: |
- T_step_eq_u32( ${step}, RTEMS_BARRIER_MANUAL_RELEASE, 0 );
- description: |
+ - brief: |
Check that RTEMS_BARRIER_MANUAL_RELEASE is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_BARRIER_MANUAL_RELEASE, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/barrier-manual-release
- - check: |
- T_step_eq_u32( ${step}, RTEMS_COUNTING_SEMAPHORE, 0 );
- description: |
+ - brief: |
Check that RTEMS_COUNTING_SEMAPHORE is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_COUNTING_SEMAPHORE, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/counting-semaphore
- - check: |
- T_step_eq_u32( ${step}, RTEMS_DEFAULT_ATTRIBUTES, 0 );
- description: |
+ - brief: |
Check that RTEMS_DEFAULT_ATTRIBUTES is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_DEFAULT_ATTRIBUTES, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/default
- - check: |
- T_step_eq_u32( ${step}, RTEMS_FIFO, 0 );
- description: |
+ - brief: |
Check that RTEMS_FIFO is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_FIFO, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/fifo
- - check: |
- T_step_eq_u32( ${step}, RTEMS_LOCAL, 0 );
- description: |
+ - brief: |
Check that RTEMS_LOCAL is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_LOCAL, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/local
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_FLOATING_POINT, 0 );
- description: |
+ - brief: |
Check that RTEMS_NO_FLOATING_POINT is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_NO_FLOATING_POINT, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/no-floating-point
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_INHERIT_PRIORITY, 0 );
- description: |
+ - brief: |
Check that RTEMS_NO_INHERIT_PRIORITY is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_NO_INHERIT_PRIORITY, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/no-inherit-priority
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING, 0 );
- description: |
+ - brief: |
Check that RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/no-multiprocessor-resource-sharing
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_PRIORITY_CEILING, 0 );
- description: |
+ - brief: |
Check that RTEMS_NO_PRIORITY_CEILING is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_NO_PRIORITY_CEILING, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/no-priority-ceiling
- description: |
- Validate the default attribute constants.
links: []
-- action: |
+- action-brief: |
+ Calculate the bitwise or of all non-default attribute constants.
+ action-code: |
rtems_attribute attributes;
attributes = 0;
@@ -215,20 +217,22 @@ test-actions:
attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
attributes |= RTEMS_SYSTEM_TASK;
checks:
- - check: |
- T_step_eq_int( ${step}, PopCount( attributes ), 10 );
- description: |
+ - brief: |
Check that the count of set bits in the calculated value is equal to the
count of non-default attribute constants. Since each non-default
attribute constant is a power of two, this proves that each constant has
a unique value.
+ code: |
+ T_step_eq_int( ${step}, PopCount( attributes ), 10 );
links:
- role: validation
uid: ../req/unique
- description: |
- Calculate the bitwise or of all non-default attribute constants.
links: []
-- action: |
+- action-brief: |
+ Calculate the bitwise or of the RTEMS_BINARY_SEMAPHORE,
+ RTEMS_COUNTING_SEMAPHORE, and RTEMS_SIMPLE_BINARY_SEMAPHORE attribute
+ constants.
+ action-code: |
rtems_attribute attributes;
attributes = 0;
@@ -236,17 +240,13 @@ test-actions:
attributes |= RTEMS_COUNTING_SEMAPHORE;
attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_SEMAPHORE_CLASS, attributes );
- description: |
+ - brief: |
Check that the calculated value is equal to RTEMS_SEMAPHORE_CLASS.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_SEMAPHORE_CLASS, attributes );
links:
- role: validation
uid: ../req/semaphore-class
- description: |
- Calculate the bitwise or of the RTEMS_BINARY_SEMAPHORE,
- RTEMS_COUNTING_SEMAPHORE, and RTEMS_SIMPLE_BINARY_SEMAPHORE attribute
- constants.
links: []
test-brief: |
Tests the attribute constants of the Classic API.
diff --git a/spec/rtems/barrier/val/ident.yml b/spec/rtems/barrier/val/ident.yml
index 9b3f7e93..df4359cf 100644
--- a/spec/rtems/barrier/val/ident.yml
+++ b/spec/rtems/barrier/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API partition class
+ objects defined by ${../../req/ident-local}.
+ action-code: |
rtems_status_code sc;
rtems_id id_local_object;
@@ -26,9 +29,6 @@ test-actions:
sc = rtems_barrier_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API partition class
- objects defined by ${../../req/ident-local}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/rtems/basedefs/val/basedefs.yml b/spec/rtems/basedefs/val/basedefs.yml
index 797cc5e7..11daa93b 100644
--- a/spec/rtems/basedefs/val/basedefs.yml
+++ b/spec/rtems/basedefs/val/basedefs.yml
@@ -4,22 +4,24 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Use the ${../if/alias:/name}() macro.
+ action-code: |
int alias_result;
alias_result = ori_func( 3 ) + alias_func( 5 );
checks:
- - check: |
- T_step_eq_int( ${step}, alias_result, 16 );
- description: |
+ - brief: |
Check that ori_func() and alias_func() are the same function.
+ code: |
+ T_step_eq_int( ${step}, alias_result, 16 );
links:
- role: validation
uid: ../req/alias-0
- description: |
- Use the ${../if/alias:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/align-down:/name}() macro in various examples.
+ action-code: |
int align_down0_result;
int align_down1_result;
int align_down2_result;
@@ -42,7 +44,10 @@ test-actions:
align_down8_result = RTEMS_ALIGN_DOWN( 256, 16 );
align_down9_result = RTEMS_ALIGN_DOWN( 257, 16 );
checks:
- - check: |
+ - brief: |
+ Check that ${../if/align-down:/name}() calculates the expected result
+ and is side-effect free.
+ code: |
T_step_eq_int( ${step}, align_down0_result, 0 );
T_step_eq_int( ${step}, align_down1_result, 0 );
T_step_eq_int( ${step}, align_down2_result, 0 );
@@ -53,16 +58,13 @@ test-actions:
T_step_eq_int( ${step}, align_down7_result, 240 );
T_step_eq_int( ${step}, align_down8_result, 256 );
T_step_eq_int( ${step}, align_down9_result, 256 );
- description: |
- Check that ${../if/align-down:/name}() calculates the expected result
- and is side-effect free.
links:
- role: validation
uid: ../req/align-down-0
- description: |
- Use the ${../if/align-down:/name}() macro in various examples.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/align-up:/name}() macro in various examples.
+ action-code: |
int align_up0_result;
int align_up1_result;
int align_up2_result;
@@ -85,7 +87,10 @@ test-actions:
align_up8_result = RTEMS_ALIGN_UP( 256, 16 );
align_up9_result = RTEMS_ALIGN_UP( 257, 16 );
checks:
- - check: |
+ - brief: |
+ Check that ${../if/align-up:/name}() calculates the expected result
+ and is side-effect free.
+ code: |
T_step_eq_int( ${step}, align_up0_result, 0 );
T_step_eq_int( ${step}, align_up1_result, 0 );
T_step_eq_int( ${step}, align_up2_result, 2 );
@@ -96,115 +101,118 @@ test-actions:
T_step_eq_int( ${step}, align_up7_result, 256 );
T_step_eq_int( ${step}, align_up8_result, 256 );
T_step_eq_int( ${step}, align_up9_result, 272 );
- description: |
- Check that ${../if/align-up:/name}() calculates the expected result
- and is side-effect free.
links:
- role: validation
uid: ../req/align-up-0
- description: |
- Use the ${../if/align-up:/name}() macro in various examples.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/aligned:/name}() macro.
+ action-code: |
char unaligned_var = 'c';
char aligned_var RTEMS_ALIGNED( 8 ) = 'd';
(void) unaligned_var;
checks:
- - check: |
+ - brief: |
+ Check that ${../if/aligned:/name}() correctly aligns a variable on the stack
+ and a structure member.
+ code: |
T_step_eq_int( ${step}, ( ( uintptr_t ) &aligned_var ) % 8, 0 );
T_step_eq_int( ${step},
offsetof( aligned_member_struct, aligned_member ) % 8, 0 );
- description: |
- Check that ${../if/aligned:/name}() correctly aligns a variable on the stack
- and a structure member.
links:
- role: validation
uid: ../req/aligned-0
- description: |
- Use the ${../if/aligned:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/alloc-align:/name}() macro.
+ action-code: |
void *free_ptr;
void *alloc_align_ptr;
alloc_align_ptr = basedefs_alloc_align_func( 1024, &free_ptr, 64 );
basedefs_free( free_ptr );
checks:
- - check: |
+ - brief: |
+ It cannot be checked that the ${../if/alloc-align:/name}() macro has
+ the desired effect. Yet, the check confirms that such a macro exists and
+ that it can be used on such a memory function and that the
+ argument counting starts at 1.
+ code: |
T_step_not_null( ${step}, alloc_align_ptr );
T_step_eq_int( ${step}, ( ( uintptr_t ) alloc_align_ptr ) % 64, 0 );
T_step_ge_uptr( ${step}, ( ( uintptr_t ) alloc_align_ptr ),
( ( uintptr_t ) free_ptr ) );
T_step_lt_uptr( ${step}, ( ( uintptr_t ) alloc_align_ptr ),
( ( uintptr_t ) free_ptr ) + 64 );
- description: |
- It cannot be checked that the ${../if/alloc-align:/name}() macro has
- the desired effect. Yet, the check confirms that such a macro exists and
- that it can be used on such a memory function and that the
- argument counting starts at 1.
links:
- role: validation
uid: ../req/alloc-align-0
- description: |
- Use a function declared with the ${../if/alloc-align:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/alloc-size:/name}() macro.
+ action-code: |
void *alloc_size_ptr;
alloc_size_ptr = basedefs_alloc_size_func( 1024 );
basedefs_free( alloc_size_ptr );
checks:
- - check: |
- T_step_not_null( ${step}, alloc_size_ptr );
- description: |
+ - brief: |
It cannot be checked that the ${../if/alloc-size:/name}() macro has
the desired effect. Yet, the check confirms that such a macro exists and
that it can be used on such a memory function and that the
argument counting starts at 1.
+ code: |
+ T_step_not_null( ${step}, alloc_size_ptr );
links:
- role: validation
uid: ../req/alloc-size-0
- description: |
- Use a function declared with the ${../if/alloc-size:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/alloc-size-2:/name}() macro.
+ action-code: |
void *alloc_size_2_ptr;
alloc_size_2_ptr = basedefs_alloc_size_2_func( 8, 128 );
basedefs_free( alloc_size_2_ptr );
checks:
- - check: |
- T_step_not_null( ${step}, alloc_size_2_ptr );
- description: |
+ - brief: |
It cannot be checked that the ${../if/alloc-size-2:/name}() macro has
the desired effect. Yet, the check confirms that such a macro exists and
that it can be used on such a memory function and that the
argument counting starts at 1.
+ code: |
+ T_step_not_null( ${step}, alloc_size_2_ptr );
links:
- role: validation
uid: ../req/alloc-size-2-0
- description: |
- Use a function declared with the ${../if/alloc-size-2:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/array-size:/name}() macro.
+ action-code: |
int array[] = { 10, 20, 30, 40, 50 };
unsigned char array2[12];
int array_size = RTEMS_ARRAY_SIZE(array);
int array2_size = RTEMS_ARRAY_SIZE(array2);
checks:
- - check: |
+ - brief: |
+ Check that the calculated size of the arrays fit their definition.
+ code: |
T_step_eq_sz( ${step}, array_size, 5 );
T_step_eq_sz( ${step}, array2_size, 12 );
- description: |
- Check that the calculated size of the arrays fit their definition.
links:
- role: validation
uid: ../req/array-size-0
- description: |
- Use the ${../if/array-size:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/compiler-deprecated-attribute:/name} macro.
+ action-code: |
int compiler_deprecated_attribute RTEMS_COMPILER_DEPRECATED_ATTRIBUTE = 42;
checks:
- - check: |
+ - brief: |
+ It cannot automatically be checked that the
+ ${../if/compiler-deprecated-attribute:/name}() macro has the desired
+ effect. The gcc compiler should issue a warning about the use of a
+ deprecated variable on the above line
+ where the ``compiler_deprecated_attribute`` is used.
+ code: |
/*
* Derivation from Coding Style:
* The following code suppresses a compiler warning (instead of fixing
@@ -217,48 +225,42 @@ test-actions:
_Pragma( "GCC diagnostic ignored \"-Wdeprecated-declarations\"" )
T_step_eq_int( ${step}, compiler_deprecated_attribute, 42 );
_Pragma( "GCC diagnostic pop" )
- description: |
- It cannot automatically be checked that the
- ${../if/compiler-deprecated-attribute:/name}() macro has the desired
- effect. The gcc compiler should issue a warning about the use of a
- deprecated variable on the above line
- where the ``compiler_deprecated_attribute`` is used.
links:
- role: validation
uid: ../req/compiler-deprecated-attribute-0
- description: |
- Use the ${../if/compiler-deprecated-attribute:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/compiler-memory-barrier:/name} macro.
+ action-code: |
RTEMS_COMPILER_MEMORY_BARRIER();
checks:
- - check: ''
- description: |
+ - brief: |
It cannot be checked that the
${../if/compiler-memory-barrier:/name} macro has the desired
effect. It is only checked that such a macro exists.
+ code: ''
links:
- role: validation
uid: ../req/compiler-memory-barrier-0
- description: |
- Use the ${../if/compiler-memory-barrier:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/compiler-no-return-attribute:/name} macro at the
+ beginning of this file.
+ action-code: |
(void) compiler_no_return_attribute_func;
checks:
- - check: ''
- description: |
+ - brief: |
It cannot be checked that the
${../if/compiler-no-return-attribute:/name} macro has the desired
effect. It is only checked that such a macro exists.
+ code: ''
links:
- role: validation
uid: ../req/compiler-no-return-attribute-0
- description: |
- Use of the ${../if/compiler-no-return-attribute:/name} macro at the
- beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/compiler-packed-attribute:/name} macro.
+ action-code: |
typedef struct {
uint8_t c;
RTEMS_COMPILER_PACKED_ATTRIBUTE uint32_t i;
@@ -266,99 +268,99 @@ test-actions:
int compiler_packed_attribute_offset =
offsetof( compiler_packed_attribute_struct, i );
checks:
- - check: |
- T_step_eq_int( ${step}, compiler_packed_attribute_offset, 1 );
- description: |
+ - brief: |
Check that ${../if/compiler-packed-attribute:/name}() correctly aligns
a structure member.
+ code: |
+ T_step_eq_int( ${step}, compiler_packed_attribute_offset, 1 );
links:
- role: validation
uid: ../req/compiler-packed-attribute-0
- description: |
- Use the ${../if/compiler-packed-attribute:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/compiler-pure-attribute:/name} macro at the beginning
+ of this file.
+ action-code: |
int compiler_pure_attribute_result;
int compiler_pure_attribute_result_2;
compiler_pure_attribute_result = compiler_pure_attribute_func();
compiler_pure_attribute_result_2 =
compiler_pure_attribute_func();
checks:
- - check: |
- T_step_eq_int( ${step}, compiler_pure_attribute_result, 21 );
- T_step_eq_int( ${step}, compiler_pure_attribute_result_2, 21 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/compiler-pure-attribute:/name}
macro has the desired effect. It is checked that such a macro exists.
+ code: |
+ T_step_eq_int( ${step}, compiler_pure_attribute_result, 21 );
+ T_step_eq_int( ${step}, compiler_pure_attribute_result_2, 21 );
links:
- role: validation
uid: ../req/compiler-pure-attribute-0
- description: |
- Use the ${../if/compiler-pure-attribute:/name} macro at the beginning
- of this file.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/compiler-unused-attribute:/name} macro.
+ action-code: |
int compiler_unused_attribute_var RTEMS_COMPILER_UNUSED_ATTRIBUTE;
checks:
- - check: ''
- description: |
+ - brief: |
It cannot automatically be checked that the
${../if/compiler-unused-attribute:/name}
macro has the desired effect. It is checked that such a macro exists
and one can manually check that no compiler warnings are produced
for the compiler_unused_attribute_var.
+ code: ''
links:
- role: validation
uid: ../req/compiler-unused-attribute-0
- description: |
- Use the ${../if/compiler-unused-attribute:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/concat:/name}() macro on examples.
+ action-code: |
int concat0_result;
int concat1_result;
concat0_result = RTEMS_CONCAT( con, cat )();
concat1_result = RTEMS_CONCAT( abc, cat )();
checks:
- - check: |
- T_step_eq_int( ${step}, concat0_result, 91 );
- description: |
+ - brief: |
Check that the two arguments of ${../if/concat:/name}() are concatenated to a
new token.
+ code: |
+ T_step_eq_int( ${step}, concat0_result, 91 );
links:
- role: validation
uid: ../req/concat-0
- role: validation
uid: ../req/concat-1
- - check: |
- T_step_eq_int( ${step}, concat1_result, 91 );
- description: |
+ - brief: |
Check that the result of the ${../if/concat:/name}() expansion is subject to
a further pre-processor substitution.
+ code: |
+ T_step_eq_int( ${step}, concat1_result, 91 );
links:
- role: validation
uid: ../req/concat-2
- description: |
- Invoke the ${../if/concat:/name}() macro on examples.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/const:/name} macro at the beginning of this file.
+ action-code: |
int const_result;
int const_result_2;
const_result = const_func( 7 );
const_result_2 = const_func( 7 );
checks:
- - check: |
- T_step_eq_int( ${step}, const_result, 28 );
- T_step_eq_int( ${step}, const_result_2, 28 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/const:/name}
macro has the desired effect. It is checked that such a macro exists.
+ code: |
+ T_step_eq_int( ${step}, const_result, 28 );
+ T_step_eq_int( ${step}, const_result_2, 28 );
links:
- role: validation
uid: ../req/const-0
- description: |
- Use the ${../if/const:/name} macro at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/container-of:/name} macro.
+ action-code: |
typedef struct {
int a;
int b;
@@ -370,72 +372,72 @@ test-actions:
container_of_struct_adr =
RTEMS_CONTAINER_OF( container_of_struct_b_adr, container_of_struct, b );
checks:
- - check: |
- T_step_eq_ptr( ${step},
- container_of_struct_adr, &container_of_struct_var );
- description: |
+ - brief: |
Check that the ${../if/container-of:/name}
macro evaluates to a pointer to container_of_struct_var.
+ code: |
+ T_step_eq_ptr( ${step},
+ container_of_struct_adr, &container_of_struct_var );
links:
- role: validation
uid: ../req/container-of-0
- description: |
- Use the ${../if/container-of:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/declare-global-symbol:/name} macro in the
+ file tc-basedefs-pendant.h.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_int( ${step}, basedefs_get_global_symbol(), 0xabc );
- description: |
+ - brief: |
Check that the ${../if/declare-global-symbol:/name}
macro declares a global symbol which can be accessed by function
basedefs_get_global_symbol() which is defined in a file
different from the file in which the gobal symbol is defined.
+ code: |
+ T_step_eq_int( ${step}, basedefs_get_global_symbol(), 0xabc );
links:
- role: validation
uid: ../req/declare-global-symbol-0
- description: |
- Use the ${../if/declare-global-symbol:/name} macro in the
- file tc-basedefs-pendant.h.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/deconst:/name} macro.
+ action-code: |
const int deconst_array[] = { 52, 55 };
int *deconst_pointer;
deconst_pointer = RTEMS_DECONST( int *, deconst_array );
checks:
- - check: |
+ - brief: |
+ Check that the ${../if/deconst:/name} macro returns a pointer
+ which allows to write into an otherwise const value.
+ code: |
T_step_eq_int( ${step}, deconst_pointer[0], 52 );
T_step_eq_int( ${step}, deconst_pointer[1], 55 );
deconst_pointer[1] = 13;
T_step_eq_int( ${step}, deconst_pointer[1], 13 );
- description: |
- Check that the ${../if/deconst:/name} macro returns a pointer
- which allows to write into an otherwise const value.
links:
- role: validation
uid: ../req/deconst-0
- description: |
- Use the ${../if/deconst:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/define-global-symbol:/name} macro at the
+ beginning of this file.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_int( ${step}, (uintptr_t) global_symbol, 0xabc );
- description: |
+ - brief: |
Check that the ${../if/define-global-symbol:/name}
macro defines a global symbol with the correct value.
+ code: |
+ T_step_eq_int( ${step}, (uintptr_t) global_symbol, 0xabc );
links:
- role: validation
uid: ../req/define-global-symbol-0
- role: validation
uid: ../req/define-global-symbol-1
- description: |
- Use the ${../if/define-global-symbol:/name} macro at the
- beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/deprecated:/name}() macro.
+ action-code: |
int deprecated_result;
/*
* Derivation from Coding Style:
@@ -449,21 +451,21 @@ test-actions:
deprecated_result = deprecated_func( 5 );
_Pragma( "GCC diagnostic pop" )
checks:
- - check: |
- T_step_eq_int( ${step}, deprecated_result, 15 );
- description: |
+ - brief: |
It cannot automatically be checked that the
${../if/deprecated:/name} macro has the desired
effect. The gcc compiler should issue a warning about the use of a
deprecated function on the above line
where the ``deprecated_func`` is used.
+ code: |
+ T_step_eq_int( ${step}, deprecated_result, 15 );
links:
- role: validation
uid: ../req/deprecated-0
- description: |
- Use a function declared with the ${../if/deprecated:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/dequalify-depthx:/name} macro.
+ action-code: |
const volatile int dequalify_depthx_array[] = { 52, 55 };
const char dequalify_depthx_var = 'a';
const char *dequalify_depthx_one_pointer = &dequalify_depthx_var;
@@ -476,7 +478,10 @@ test-actions:
dequalify_depthx_twice_pointer = RTEMS_DEQUALIFY_DEPTHX(
**, volatile char **, dequalify_depthx_two_pointer );
checks:
- - check: |
+ - brief: |
+ Check that the ${../if/dequalify-depthx:/name} macro returns a pointer
+ which allows to write into an otherwise const (volatile) value.
+ code: |
T_step_eq_int( ${step}, dequalify_depthx_pointer[0], 52 );
T_step_eq_int( ${step}, dequalify_depthx_pointer[1], 55 );
dequalify_depthx_pointer[0] = 13;
@@ -484,83 +489,80 @@ test-actions:
T_step_eq_char( ${step}, **dequalify_depthx_twice_pointer, 'a' );
**dequalify_depthx_twice_pointer = 'Z';
T_step_eq_char( ${step}, **dequalify_depthx_twice_pointer, 'Z' );
- description: |
- Check that the ${../if/dequalify-depthx:/name} macro returns a pointer
- which allows to write into an otherwise const (volatile) value.
links:
- role: validation
uid: ../req/dequalify-depthx-0
- description: |
- Use the ${../if/dequalify-depthx:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/dequalify:/name} macro.
+ action-code: |
const volatile int dequalify_array[] = { 52, 55 };
int *dequalify_pointer;
dequalify_pointer = RTEMS_DECONST( int *, dequalify_array );
checks:
- - check: |
+ - brief: |
+ Check that the ${../if/dequalify:/name} macro returns a pointer
+ which allows to write into an otherwise const volatile value.
+ code: |
T_step_eq_int( ${step}, dequalify_pointer[0], 52 );
T_step_eq_int( ${step}, dequalify_pointer[1], 55 );
dequalify_pointer[0] = 13;
T_step_eq_int( ${step}, dequalify_pointer[0], 13 );
- description: |
- Check that the ${../if/dequalify:/name} macro returns a pointer
- which allows to write into an otherwise const volatile value.
links:
- role: validation
uid: ../req/dequalify-0
- description: |
- Use the ${../if/dequalify:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/devolatile:/name} macro.
+ action-code: |
volatile int devolatile_array[] = { 52, 55 };
int *devolatile_pointer;
devolatile_pointer = RTEMS_DEVOLATILE( int *, devolatile_array );
checks:
- - check: |
+ - brief: |
+ Check that the ${../if/devolatile:/name} macro returns a pointer
+ which allows to write into an otherwise volatile value.
+ code: |
T_step_eq_int( ${step}, devolatile_pointer[0], 52 );
T_step_eq_int( ${step}, devolatile_pointer[1], 55 );
devolatile_pointer[1] = 13;
T_step_eq_int( ${step}, devolatile_pointer[1], 13 );
- description: |
- Check that the ${../if/devolatile:/name} macro returns a pointer
- which allows to write into an otherwise volatile value.
links:
- role: validation
uid: ../req/devolatile-0
- description: |
- Use the ${../if/devolatile:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/expand:/name}() macro on an example.
+ action-code: |
int expand_result;
expand_result = RTEMS_EXPAND( EXPAND )();
checks:
- - check: |
- T_step_eq_int( ${step}, expand_result, 82 );
- description: |
+ - brief: |
Check that the argument of ${../if/expand:/name}() is expanded and
returned.
+ code: |
+ T_step_eq_int( ${step}, expand_result, 82 );
links:
- role: validation
uid: ../req/expand-0
- description: |
- Invoke the ${../if/expand:/name}() macro on an example.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/false:/name}() macro on an example.
+ action-code: |
char *false_result;
false_result = _TO_STR( FALSE );
checks:
- - check: |
- T_step_eq_str( ${step}, false_result, "0" );
- description: |
+ - brief: |
Check that of ${../if/false:/name} is substituted by 0.
+ code: |
+ T_step_eq_str( ${step}, false_result, "0" );
links:
- role: validation
uid: ../req/false-0
- description: |
- Invoke the ${../if/false:/name}() macro on an example.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/have-member-same-type:/name}() macro on examples.
+ action-code: |
typedef union {
short s;
int **i;
@@ -596,7 +598,10 @@ test-actions:
int same_type_result_9 = RTEMS_HAVE_MEMBER_SAME_TYPE(
same_type_union, s, same_type_struct, u );
checks:
- - check: |
+ - brief: |
+ Check that of ${../if/have-member-same-type:/name} returns 0 and 1
+ depending on whether these types are compatible.
+ code: |
T_step_eq_int( ${step}, same_type_result_0, 1 );
T_step_eq_int( ${step}, same_type_result_1, 0 );
T_step_eq_int( ${step}, same_type_result_2, 0 );
@@ -607,23 +612,25 @@ test-actions:
T_step_eq_int( ${step}, same_type_result_7, 0 );
T_step_eq_int( ${step}, same_type_result_8, 0 );
T_step_eq_int( ${step}, same_type_result_9, 1 );
- description: |
- Check that of ${../if/have-member-same-type:/name} returns 0 and 1
- depending on whether these types are compatible.
links:
- role: validation
uid: ../req/have-member-same-type-0
- description: |
- Invoke the ${../if/have-member-same-type:/name}() macro on examples.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/inline-routine:/name} in the definition of function
+ inline_routine_func() at the beginning of this file. Obtain the text
+ the macro ${../if/inline-routine:/name} produces.
+ action-code: |
const int inline_routine_step = ${step};
int inline_routine_result;
char *inline_routine_text;
inline_routine_result = inline_routine_func( 3 );
inline_routine_text = _TO_STR( RTEMS_INLINE_ROUTINE );
checks:
- - check: |
+ - brief: |
+ Check that the ${../if/inline-routine:/name} exists
+ and that it produces the desired text.
+ code: |
if( 0 == strcmp( "static inline", inline_routine_text ) ) {
T_step_eq_str( inline_routine_step,
inline_routine_text, "static inline" );
@@ -632,18 +639,13 @@ test-actions:
inline_routine_text, "static __inline__" );
}
T_step_eq_int( ${step}, inline_routine_result, 8 );
- description: |
- Check that the ${../if/inline-routine:/name} exists
- and that it produces the desired text.
links:
- role: validation
uid: ../req/inline-routine-0
- description: |
- Use the ${../if/inline-routine:/name} in the definition of function
- inline_routine_func() at the beginning of this file. Obtain the text
- the macro ${../if/inline-routine:/name} produces.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/malloclike:/name}() macro.
+ action-code: |
void *malloclike_ptr;
/*
* If this code is not compiled using GNU C, I still have to run a check
@@ -656,21 +658,21 @@ test-actions:
malloclike_text = remove_white_space( _TO_STR( RTEMS_MALLOCLIKE ) );
#endif
checks:
- - check: |
- T_step_not_null( ${step}, malloclike_ptr );
- T_step_eq_str( ${step}, malloclike_text, "__attribute__((__malloc__))" );
- description: |
+ - brief: |
It cannot be checked that the ${../if/malloclike:/name} macro has
the desired effect. Yet, the check confirms that such a macro exists and
that it can be used on such a memory function and that it produces
the correct code.
+ code: |
+ T_step_not_null( ${step}, malloclike_ptr );
+ T_step_eq_str( ${step}, malloclike_text, "__attribute__((__malloc__))" );
links:
- role: validation
uid: ../req/malloclike-0
- description: |
- Use a function declared with the ${../if/malloclike:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/no-inline:/name}() macro.
+ action-code: |
int no_inline_result;
/*
* If this code is not compiled using GNU C, I still have to run a check
@@ -682,51 +684,51 @@ test-actions:
no_inline_text = remove_white_space( _TO_STR( RTEMS_NO_INLINE ) );
#endif
checks:
- - check: |
- T_step_eq_int( ${step}, no_inline_result, 75 );
- T_step_eq_str( ${step}, no_inline_text, "__attribute__((__noinline__))" );
- description: |
+ - brief: |
It cannot be checked that the ${../if/no-inline:/name} macro has
the desired effect. Yet, the check confirms that such a macro exists and
that it can be used on such a function and that it produces
the correct code.
+ code: |
+ T_step_eq_int( ${step}, no_inline_result, 75 );
+ T_step_eq_str( ${step}, no_inline_text, "__attribute__((__noinline__))" );
links:
- role: validation
uid: ../req/no-inline-0
- description: |
- Use a function declared with the ${../if/no-inline:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/no-return:/name} macro at the beginning of this file.
+ action-code: |
(void) no_return_func;
checks:
- - check: ''
- description: |
+ - brief: |
It cannot be checked that the
${../if/no-return:/name} macro has the desired
effect. It is only checked that such a macro exists.
+ code: ''
links:
- role: validation
uid: ../req/no-return-0
- description: |
- Use of the ${../if/no-return:/name} macro at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/obfuscate-variable:/name}() macro.
+ action-code: |
short obfuscate_variable = 66;
RTEMS_OBFUSCATE_VARIABLE( obfuscate_variable );
checks:
- - check: |
- T_step_eq_int( ${step}, obfuscate_variable, 66 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/obfuscate-variable:/name}
macro has the desired effect. Yet, the check confirms that such a
macro exists and can be used.
+ code: |
+ T_step_eq_int( ${step}, obfuscate_variable, 66 );
links:
- role: validation
uid: ../req/obfuscate-variable-0
- description: |
- Use the ${../if/obfuscate-variable:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/packed:/name} macro.
+ action-code: |
int packed_offset;
int packed_full_i_offset;
int packed_full_j_offset;
@@ -751,62 +753,62 @@ test-actions:
packed_full_j_offset = offsetof( packed_full_struct, j );
packed_enum_size = sizeof( packed_enum );
checks:
- - check: |
- T_step_eq_int( ${step}, packed_offset, 1 );
- description: |
+ - brief: |
Check that ${../if/packed:/name}() correctly aligns a structure member.
+ code: |
+ T_step_eq_int( ${step}, packed_offset, 1 );
links:
- role: validation
uid: ../req/packed-0
- - check: |
+ - brief: |
+ Check that ${../if/packed:/name}() correctly aligns all structure members.
+ code: |
T_step_eq_int( ${step}, packed_full_i_offset, 1 );
T_step_eq_int( ${step}, packed_full_j_offset, 5 );
- description: |
- Check that ${../if/packed:/name}() correctly aligns all structure members.
links:
- role: validation
uid: ../req/packed-1
- - check: |
- T_step_eq_int( ${step}, packed_enum_size, 1 );
- description: |
+ - brief: |
Check that ${../if/packed:/name}() correctly enforces a minimal enum type.
+ code: |
+ T_step_eq_int( ${step}, packed_enum_size, 1 );
links:
- role: validation
uid: ../req/packed-2
- description: |
- Use the ${../if/packed:/name} macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/predict-false:/name}() macro.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_int( ${step}, RTEMS_PREDICT_FALSE( PREDICT_FALSE 1 ), 0 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/predict-false:/name}
macro has the desired effect. Yet, the check confirms that such a
macro exists and can be used.
+ code: |
+ T_step_eq_int( ${step}, RTEMS_PREDICT_FALSE( PREDICT_FALSE 1 ), 0 );
links:
- role: validation
uid: ../req/predict-false-0
- description: |
- Use the ${../if/predict-false:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/predict-true:/name}() macro.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_int( ${step}, RTEMS_PREDICT_TRUE( 6 - 5 ), 1 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/predict-true:/name}
macro has the desired effect. Yet, the check confirms that such a
macro exists and can be used.
+ code: |
+ T_step_eq_int( ${step}, RTEMS_PREDICT_TRUE( 6 - 5 ), 1 );
links:
- role: validation
uid: ../req/predict-true-0
- description: |
- Use the ${../if/predict-true:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use a function declared with the ${../if/printflike:/name}() macro.
+ action-code: |
int printflike_result;
printflike_result = printflike_func(
"RTEMS_PRINTFLIKE",
@@ -816,40 +818,40 @@ test-actions:
"test output"
);
checks:
- - check: |
- T_step_eq_int( ${step}, printflike_result, 23 );
- description: |
+ - brief: |
It cannot automatically be checked that the ${../if/printflike:/name}
macro has the desired effect. Yet, the check confirms that such a macro
exists and that it can be used on such a printf-like function and that
the argument numbers are correct.
+ code: |
+ T_step_eq_int( ${step}, printflike_result, 23 );
links:
- role: validation
uid: ../req/printflike-0
- role: validation
uid: ../req/printflike-1
- description: |
- Use a function declared with the ${../if/printflike:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/pure:/name} macro at the beginning of this file.
+ action-code: |
int pure_result;
int pure_result_2;
pure_result = pure_func();
pure_result_2 = pure_func();
checks:
- - check: |
- T_step_eq_int( ${step}, pure_result, 21 );
- T_step_eq_int( ${step}, pure_result_2, 21 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/pure:/name}
macro has the desired effect. It is checked that such a macro exists.
+ code: |
+ T_step_eq_int( ${step}, pure_result, 21 );
+ T_step_eq_int( ${step}, pure_result_2, 21 );
links:
- role: validation
uid: ../req/pure-0
- description: |
- Use the ${../if/pure:/name} macro at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Get the code the ${../if/return-address:/name}() macro produces as string.
+ action-code: |
/*
* If this code is not compiled using GNU C, I still have to run a check
* to avoid trouble with the {step} counter of the checks.
@@ -860,69 +862,69 @@ test-actions:
remove_white_space( _TO_STR( RTEMS_RETURN_ADDRESS() ) );
#endif
checks:
- - check: |
- T_step_eq_str( ${step},
- return_address_text, "__builtin_return_address(0)" );
- description: |
+ - brief: |
The check confirms that a ${../if/return-address:/name}() macro exists
and that it produces the correct code.
+ code: |
+ T_step_eq_str( ${step},
+ return_address_text, "__builtin_return_address(0)" );
links:
- role: validation
uid: ../req/return-address-0
- description: |
- Get the code the ${../if/return-address:/name}() macro produces as string.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/section:/name}() macro on ``section_variable`` and
+ ``section_func`` at the beginning of this file.
+ action-code: |
short section_result;
section_result = section_func( 1234567 );
checks:
- - check: |
- T_step_eq_int( ${step}, section_var, 28 );
- T_step_eq_int( ${step}, section_result, 67 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/section:/name}()
macro has the desired effect. Yet, the check confirms that such a
macro exists and can be used.
+ code: |
+ T_step_eq_int( ${step}, section_var, 28 );
+ T_step_eq_int( ${step}, section_result, 67 );
links:
- role: validation
uid: ../req/section-0
- description: |
- Use the ${../if/section:/name}() macro on ``section_variable`` and
- ``section_func`` at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/static-assert:/name}() macro.
+ action-code: |
RTEMS_STATIC_ASSERT( STATIC_ASSERT_COND 1, RTEMS_STATIC_ASSERT_test );
checks:
- - check: ''
- description: |
+ - brief: |
It cannot be automatically check that
the ${../if/static-assert:/name}() macro has the desired effect.
Yet, it can be checked that the macro exists and accepts the
specified arguments.
+ code: ''
links:
- role: validation
uid: ../req/static-assert-0
- description: |
- Use the ${../if/static-assert:/name}() macro.
links: []
-- action: "const char *string_var;\nconst char *string_empty_var;\n/* strange spacing\
- \ and tabs belong to the test */\nstring_var = RTEMS_STRING( \\\\ STRING_PREFIX\
+- action-brief: |
+ Use the ${../if/string:/name}() macro.
+ action-code: "const char *string_var;\nconst char *string_empty_var;\n/* strange\
+ \ spacing and tabs belong to the test */\nstring_var = RTEMS_STRING( \\\\ STRING_PREFIX\
\ \t\tcat\"\"\\n );\nstring_empty_var = RTEMS_STRING();\n"
checks:
- - check: |
- T_step_eq_str( ${step}, string_var, "\\ STRING_PREFIX cat\"\"\n" );
- T_step_eq_str( ${step}, string_empty_var, "" );
- description: |
+ - brief: |
Check that the ${../if/string:/name}() macro
converts its argument into a string without applying
pre-processor substitutions on its argument.
+ code: |
+ T_step_eq_str( ${step}, string_var, "\\ STRING_PREFIX cat\"\"\n" );
+ T_step_eq_str( ${step}, string_empty_var, "" );
links:
- role: validation
uid: ../req/string-0
- description: |
- Use the ${../if/string:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/symbol-name:/name}() macro on examples.
+ action-code: |
const int symbol_name = 321;
int symbol_name_0_var;
int symbol_name_1_var;
@@ -935,23 +937,23 @@ test-actions:
prefixed_symbol_id_var = basedefs_use_prefixed_symbol_id();
prefixed_upper_symbol_name_var = basedefs_use_prefixed_upper_symbol_name();
checks:
- - check: |
- T_step_eq_int( ${step}, symbol_name_0_var, 321 );
- description: |
+ - brief: |
Case ``__USER_LABEL_PREFIX__`` undefined.
Check that the ${../if/symbol-name:/name}() macro
without any pre-processor substitutions applicable results
in its literal argument.
+ code: |
+ T_step_eq_int( ${step}, symbol_name_0_var, 321 );
links:
- role: validation
uid: ../req/symbol-name-3
- - check: |
- T_step_eq_int( ${step}, symbol_name_1_var, 321 );
- description: |
+ - brief: |
Case ``__USER_LABEL_PREFIX__`` undefined.
Check that the ${../if/symbol-name:/name}() macro
applies pre-processor substitutions to its argument
and its result.
+ code: |
+ T_step_eq_int( ${step}, symbol_name_1_var, 321 );
links:
- role: validation
uid: ../req/symbol-name-0
@@ -959,24 +961,24 @@ test-actions:
uid: ../req/symbol-name-3
- role: validation
uid: ../req/symbol-name-5
- - check: |
- T_step_eq_int( ${step}, prefixed_symbol_name_var, 124 );
- description: |
+ - brief: |
Case ``__USER_LABEL_PREFIX__`` defined.
Check that the ${../if/symbol-name:/name}() macro
without any pre-processor substitutions applicable results
in the literal prefix and argument.
+ code: |
+ T_step_eq_int( ${step}, prefixed_symbol_name_var, 124 );
links:
- role: validation
uid: ../req/symbol-name-1
- role: validation
uid: ../req/symbol-name-2
- - check: |
- T_step_eq_int( ${step}, prefixed_upper_symbol_name_var, 125 );
- description: |
+ - brief: |
Case ``__USER_LABEL_PREFIX__`` defined.
Check that the ${../if/symbol-name:/name}() macro
applies pre-processor substitutions to its argument.
+ code: |
+ T_step_eq_int( ${step}, prefixed_upper_symbol_name_var, 125 );
links:
- role: validation
uid: ../req/symbol-name-1
@@ -984,12 +986,12 @@ test-actions:
uid: ../req/symbol-name-2
- role: validation
uid: ../req/symbol-name-6
- - check: |
- T_step_eq_int( ${step}, prefixed_symbol_id_var, 126 );
- description: |
+ - brief: |
Case ``__USER_LABEL_PREFIX__`` defined.
Check that the ${../if/symbol-name:/name}() macro
applies pre-processor substitutions to its result.
+ code: |
+ T_step_eq_int( ${step}, prefixed_symbol_id_var, 126 );
links:
- role: validation
uid: ../req/symbol-name-4
@@ -997,24 +999,26 @@ test-actions:
uid: ../req/symbol-name-5
- role: validation
uid: ../req/symbol-name-6
- description: |
- Use the ${../if/symbol-name:/name}() macro on examples.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/true:/name}() macro on an example.
+ action-code: |
char *true_result;
true_result = _TO_STR( TRUE );
checks:
- - check: |
- T_step_eq_str( ${step}, true_result, "1" );
- description: |
+ - brief: |
Check that of ${../if/true:/name} is substituted by 0.
+ code: |
+ T_step_eq_str( ${step}, true_result, "1" );
links:
- role: validation
uid: ../req/true-0
- description: |
- Invoke the ${../if/true:/name}() macro on an example.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/typeof-refx:/name}() macro on several examples.
+ This use is already the test as the statements will not compile
+ without error if the macro did not evaluate to the correct type.
+ action-code: |
int type_refx_val = 7;
char type_refx_chr = 'c';
char *type_refx_chr_p = &type_refx_chr;
@@ -1031,7 +1035,10 @@ test-actions:
RTEMS_TYPEOF_REFX( *, const short **)
type_refx_xx_const_short_p = &type_refx_const_val;
checks:
- - check: |
+ - brief: |
+ The checks here are proforma. The macro is tested by the fact that
+ the action will not compile if the macro returns a wrong result.
+ code: |
T_step_eq_int( ${step}, type_refx_val, 7 );
T_step_eq_int( ${step}, type_refx_x_int, 8 );
T_step_eq_int( ${step}, type_refx_xx_int, 9 );
@@ -1043,18 +1050,14 @@ test-actions:
T_step_eq_char( ${step}, type_refx_char, 'f' );
T_step_eq_char( ${step}, type_refx_xx_char, 'g' );
T_step_eq_short( ${step}, *type_refx_xx_const_short_p, 333 );
- description: |
- The checks here are proforma. The macro is tested by the fact that
- the action will not compile if the macro returns a wrong result.
links:
- role: validation
uid: ../req/typeof-refx-0
- description: |
- Use of the ${../if/typeof-refx:/name}() macro on several examples.
- This use is already the test as the statements will not compile
- without error if the macro did not evaluate to the correct type.
links: []
-- action: |
+- action-brief: |
+ Use the ${../if/unused:/name} macro. See also unused_func() at the
+ beginning of this file.
+ action-code: |
int unused_var RTEMS_UNUSED;
typedef struct RTEMS_UNUSED {
char c;
@@ -1062,81 +1065,81 @@ test-actions:
} unused_struct_t;
unused_struct_t unused_struct = { '@', 13 };
checks:
- - check: ''
- description: |
+ - brief: |
It cannot automatically be checked that the ${../if/unused:/name}
macro has the desired effect. It is checked that such a macro exists
and one can manually check that no compiler warnings are produced
for the unused_func().
+ code: ''
links:
- role: validation
uid: ../req/unused-0
- - check: |
- unused_lable:
- RTEMS_UNUSED;
- description: |
+ - brief: |
It cannot automatically be checked that the ${../if/unused:/name}
macro has the desired effect. It is checked that such a macro exists
and one can manually check that no compiler warnings are produced
for the unused_lable.
+ code: |
+ unused_lable:
+ RTEMS_UNUSED;
links:
- role: validation
uid: ../req/unused-1
- - check: ''
- description: |
+ - brief: |
It cannot automatically be checked that the ${../if/unused:/name}
macro has the desired effect. It is checked that such a macro exists
and one can manually check that no compiler warnings are produced
for the unused_struct.
+ code: ''
links:
- role: validation
uid: ../req/unused-2
- - check: ''
- description: |
+ - brief: |
It cannot automatically be checked that the ${../if/unused:/name}
macro has the desired effect. It is checked that such a macro exists
and one can manually check that no compiler warnings are produced
for the unused items unused_var and the unused argument and variable
in unused_func().
+ code: ''
links:
- role: validation
uid: ../req/unused-3
- description: |
- Use the ${../if/unused:/name} macro. See also unused_func() at the
- beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/unreachable:/name} macro in function definition of
+ unreachable_func() at the beginning of this file.
+ action-code: |
int unreachable_result;
unreachable_result = unreachable_func(2101);
checks:
- - check: |
- T_step_eq_int( ${step}, unreachable_result, 2101 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/unreachable:/name}
macro has the desired effect. It is checked that such a macro exists
and the compiler warning about the missing return statement is suppressed.
+ code: |
+ T_step_eq_int( ${step}, unreachable_result, 2101 );
links:
- role: validation
uid: ../req/unreachable-0
- description: |
- Use of the ${../if/unreachable:/name} macro in function definition of
- unreachable_func() at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/used:/name} macro in function definition of
+ used_func() at the beginning of this file and with used_var above.
+ action-code: |
/* No action */
checks:
- - check: ''
- description: |
+ - brief: |
It cannot be checked that the ${../if/used:/name} macro has the
desired effect. It is checked that such a macro exists.
+ code: ''
links:
- role: validation
uid: ../req/used-0
- description: |
- Use of the ${../if/used:/name} macro in function definition of
- used_func() at the beginning of this file and with used_var above.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/warn-unused-result:/name} macro in function definition of
+ warn_unused_func() at the beginning of this file.
+ action-code: |
int warn_unused_result;
warn_unused_result = warn_unused_func( 33 );
/*
@@ -1153,82 +1156,81 @@ test-actions:
warn_unused_func( 66 );
_Pragma( "GCC diagnostic pop" )
checks:
- - check: |
- T_step_eq_int( ${step}, warn_unused_result, 11 );
- description: |
+ - brief: |
It cannot be checked that the ${../if/warn-unused-result:/name} macro
has the desired effect. The GNU C compiler should issue a warning
about the disregarded result returned by the call
to the ``warn_unused_func()`` function.
+ code: |
+ T_step_eq_int( ${step}, warn_unused_result, 11 );
links:
- role: validation
uid: ../req/warn-unused-result-0
- description: |
- Use of the ${../if/warn-unused-result:/name} macro in function definition of
- warn_unused_func() at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use of ``basedefs_weak_alias_0/1_func()`` which are defined with the
+ ${../if/weak-alias:/name} macro at the beginning of this file.
+ action-code: |
int weak_alias_0_result;
int weak_alias_1_result;
weak_alias_0_result = ori_func( 3 ) + basedefs_weak_alias_0_func( 5 );
weak_alias_1_result = ori_func( 3 ) + basedefs_weak_alias_1_func( 5 );
checks:
- - check: |
- T_step_eq_int( ${step}, weak_alias_0_result, 16 );
- description: |
+ - brief: |
There exists no strong alias for basedefs_weak_alias_0_func().
Check that ori_func() and basedefs_weak_alias_0_func() are the
same function.
+ code: |
+ T_step_eq_int( ${step}, weak_alias_0_result, 16 );
links:
- role: validation
uid: ../req/weak-alias-0
- - check: |
- T_step_eq_int( ${step}, weak_alias_1_result, 56 );
- description: |
+ - brief: |
File ``tc_basedefs_pndant.c`` defines a strong function for
basedefs_weak_alias_1_func().
Check that ori_func() and basedefs_weak_alias_1_func() are not
the same function.
+ code: |
+ T_step_eq_int( ${step}, weak_alias_1_result, 56 );
links:
- role: validation
uid: ../req/weak-alias-1
- description: |
- Use of ``basedefs_weak_alias_0/1_func()`` which are defined with the
- ${../if/weak-alias:/name} macro at the beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Use of ``basedefs_weak_0/1_var`` and ``basedefs_weak_0/1_func()``
+ which are defined with the ${../if/weak:/name} macro at the
+ beginning of this file.
+ action-code: |
int weak_0_result;
int weak_1_result;
weak_0_result = basedefs_weak_0_func();
weak_1_result = basedefs_weak_1_func();
checks:
- - check: |
- T_step_eq_int( ${step}, basedefs_weak_0_var, 60 );
- T_step_eq_int( ${step}, weak_0_result, 63 );
- description: |
+ - brief: |
For ``basedefs_weak_0_var`` and ``basedefs_weak_0_func()`` there
exists no other symbols with the same name.
Hence, the checks test that the weak symbols are used.
+ code: |
+ T_step_eq_int( ${step}, basedefs_weak_0_var, 60 );
+ T_step_eq_int( ${step}, weak_0_result, 63 );
links:
- role: validation
uid: ../req/weak-0
- - check: |
- T_step_eq_int( ${step}, basedefs_weak_1_var, 62 );
- T_step_eq_int( ${step}, weak_1_result, 65 );
- description: |
+ - brief: |
``basedefs_weak_1_var`` and ``basedefs_weak_1_func()``
are overwritten by strong symbols defined in file
``tc_basedefs_pendant.c``. Hence, the checks test that the strong
variants are used.
+ code: |
+ T_step_eq_int( ${step}, basedefs_weak_1_var, 62 );
+ T_step_eq_int( ${step}, weak_1_result, 65 );
links:
- role: validation
uid: ../req/weak-1
- description: |
- Use of ``basedefs_weak_0/1_var`` and ``basedefs_weak_0/1_func()``
- which are defined with the ${../if/weak:/name} macro at the
- beginning of this file.
links: []
-- action: |
+- action-brief: |
+ Invoke the ${../if/xconcat:/name}() macro on examples.
+ action-code: |
int xconcat0_result;
int xconcat1_result;
int xconcat2_result;
@@ -1239,61 +1241,62 @@ test-actions:
RTEMS_XCONCAT( RTEMS_XCONCAT( CO, N ), RTEMS_XCONCAT( ca, t ) )();
xconcat3_result = RTEMS_CONCAT( def, cat )();
checks:
- - check: |
- T_step_eq_int( ${step}, xconcat0_result, 91 );
- description: |
+ - brief: |
Check that the two arguments of ${../if/xconcat:/name}() are
concatenated without inserting new characters.
+ code: |
+ T_step_eq_int( ${step}, xconcat0_result, 91 );
links:
- role: validation
uid: ../req/xconcat-0
- role: validation
uid: ../req/xconcat-1
- - check: |
- T_step_eq_int( ${step}, xconcat1_result, 91 );
- description: |
+ - brief: |
Check that the two arguments of ${../if/xconcat:/name}() are
substituted before they are concatenated.
+ code: |
+ T_step_eq_int( ${step}, xconcat1_result, 91 );
links:
- role: validation
uid: ../req/xconcat-2
- - check: |
- T_step_eq_int( ${step}, xconcat2_result, 91 );
- description: |
+ - brief: |
Check that the two arguments of ${../if/xconcat:/name}() are can
be the macro itself.
+ code: |
+ T_step_eq_int( ${step}, xconcat2_result, 91 );
links:
- role: validation
uid: ../req/xconcat-3
- - check: |
- T_step_eq_int( ${step}, xconcat3_result, 91 );
- description: |
+ - brief: |
Check that the result of the ${../if/xconcat:/name}() expansion
is subject to a further pre-processor substitution.
+ code: |
+ T_step_eq_int( ${step}, xconcat3_result, 91 );
links:
- role: validation
uid: ../req/xconcat-2
- description: |
- Invoke the ${../if/xconcat:/name}() macro on examples.
links: []
-- action: "const char *xstring_var;\nconst char *xstring_empty_var;\n/* strange spacing\
- \ and tabs belong to the test */\nxstring_var = RTEMS_XSTRING( \\\\ STRING_PREFIX\
+- action-brief: |
+ Use the ${../if/xstring:/name}() macro.
+ action-code: "const char *xstring_var;\nconst char *xstring_empty_var;\n/* strange\
+ \ spacing and tabs belong to the test */\nxstring_var = RTEMS_XSTRING( \\\\ STRING_PREFIX\
\ \t\tcat\"\"\\n );\nxstring_empty_var = RTEMS_XSTRING();\n"
checks:
- - check: |
- T_step_eq_str( ${step}, xstring_var, "\\ str cat\"\"\n" );
- T_step_eq_str( ${step}, xstring_empty_var, "" );
- description: |
+ - brief: |
Check that the ${../if/xstring:/name}() macro applies
pre-processor substitutions on its argument and
converts its argument into a string.
+ code: |
+ T_step_eq_str( ${step}, xstring_var, "\\ str cat\"\"\n" );
+ T_step_eq_str( ${step}, xstring_empty_var, "" );
links:
- role: validation
uid: ../req/xstring-0
- description: |
- Use the ${../if/xstring:/name}() macro.
links: []
-- action: |
+- action-brief: |
+ Use of the ${../if/zero-length-array:/name} macro in a declaration of
+ a structure.
+ action-code: |
typedef struct {
char chr;
int array[RTEMS_ZERO_LENGTH_ARRAY];
@@ -1303,22 +1306,19 @@ test-actions:
int array[1];
} zero_length_struct_1;
checks:
- - check: |
+ - brief: |
+ Checked that the ${../if/zero-length-array:/name} macro
+ produces a structure similar to a structure with one element.
+ code: |
T_step_eq_sz( ${step}, sizeof( zero_length_struct_0 ),
sizeof( zero_length_struct_1 ) - sizeof( int ) );
T_step_eq_sz( ${step}, offsetof( zero_length_struct_0, chr ),
offsetof( zero_length_struct_1, chr ) );
T_step_eq_sz( ${step}, offsetof( zero_length_struct_0, array ),
offsetof( zero_length_struct_1, array ) );
- description: |
- Checked that the ${../if/zero-length-array:/name} macro
- produces a structure similar to a structure with one element.
links:
- role: validation
uid: ../req/zero-length-array-0
- description: |
- Use of the ${../if/zero-length-array:/name} macro in a declaration of
- a structure.
links: []
test-brief: |
Tests the basedefs macros of the Classic API.
diff --git a/spec/rtems/event/val/event-constant.yml b/spec/rtems/event/val/event-constant.yml
index 1b76d81e..7b1e3b2a 100644
--- a/spec/rtems/event/val/event-constant.yml
+++ b/spec/rtems/event/val/event-constant.yml
@@ -4,29 +4,31 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Validate the event constant.
+ action-code: |
/* No action */
checks:
- - check: |
+ - brief: |
+ Check that the event constant is equal to the event number bit in the
+ event set.
+ code: |
T_step_eq_u32(
${step},
ctx->event,
( (rtems_event_set) 1 ) << ctx->number
);
- description: |
- Check that the event constant is equal to the event number bit in the
- event set.
links: []
- - check: |
- T_step_eq_u32( ${step}, ctx->event & RTEMS_PENDING_EVENTS, 0 );
- description: |
+ - brief: |
Check that the event number bit of the event constant is not set in
RTEMS_PENDING_EVENTS.
+ code: |
+ T_step_eq_u32( ${step}, ctx->event & RTEMS_PENDING_EVENTS, 0 );
links: []
- description: |
- Validate the event constant.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -38,20 +40,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -63,20 +65,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive all pending events of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -88,20 +90,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
- description: |
+ - brief: |
Check that the directive call was unsatisfied.
+ code: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no events received.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Receive all pending events of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive all pending events of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -113,33 +115,33 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
- description: |
+ - brief: |
Check that the directive call was unsatisfied.
+ code: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no events received.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Receive all pending events of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Send the event to the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
sc = rtems_event_send( RTEMS_SELF, ctx->event );
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- description: |
- Send the event to the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -151,21 +153,21 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, ctx->event );
- description: |
+ - brief: |
Check that the pending event is equal to the event sent by a previous
action.
+ code: |
+ T_step_eq_u32( ${step}, out, ctx->event );
links: []
- description: |
- Get all pending events of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -177,20 +179,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive any event of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -202,21 +204,21 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, ctx->event );
- description: |
+ - brief: |
Check that the received event is equal to the event sent by a previous
action.
+ code: |
+ T_step_eq_u32( ${step}, out, ctx->event );
links: []
- description: |
- Receive any event of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive any event of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -228,33 +230,33 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
- description: |
+ - brief: |
Check that the directive call was unsatisfied.
+ code: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that the no events were received.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Receive any event of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Send the event to the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
sc = rtems_event_system_send( RTEMS_SELF, ctx->event );
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- description: |
- Send the event to the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -266,20 +268,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -291,21 +293,21 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, ctx->event );
- description: |
+ - brief: |
Check that the pending event is equal to the event sent by a previous
action.
+ code: |
+ T_step_eq_u32( ${step}, out, ctx->event );
links: []
- description: |
- Get all pending events of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive any event of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -317,20 +319,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
- description: |
+ - brief: |
Check that the directive call was unsatisfied.
+ code: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that the no events were received.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Receive any event of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Receive any event of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -342,21 +344,21 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, ctx->event );
- description: |
+ - brief: |
Check that the received event is equal to the event sent by a previous
action.
+ code: |
+ T_step_eq_u32( ${step}, out, ctx->event );
links: []
- description: |
- Receive any event of the system event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the Classic event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -368,20 +370,20 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the Classic event set of the executing task.
links: []
-- action: |
+- action-brief: |
+ Get all pending events of the system event set of the executing task.
+ action-code: |
rtems_status_code sc;
rtems_event_set out;
@@ -393,18 +395,16 @@ test-actions:
&out
);
checks:
- - check: |
- T_step_rsc_success( ${step}, sc );
- description: |
+ - brief: |
Check that the directive call was successful.
+ code: |
+ T_step_rsc_success( ${step}, sc );
links: []
- - check: |
- T_step_eq_u32( ${step}, out, 0 );
- description: |
+ - brief: |
Check that there were no pending events.
+ code: |
+ T_step_eq_u32( ${step}, out, 0 );
links: []
- description: |
- Get all pending events of the system event set of the executing task.
links: []
test-brief: |
Tests an event constant and number of the Event Manager using the Classic and
diff --git a/spec/rtems/event/val/events.yml b/spec/rtems/event/val/events.yml
index 43578af0..42ab27a1 100644
--- a/spec/rtems/event/val/events.yml
+++ b/spec/rtems/event/val/events.yml
@@ -4,7 +4,9 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Run the event constant and number test for all 32 event constants.
+ action-code: |
int i;
for ( i = 0; i < 32; ++i ) {
@@ -12,10 +14,10 @@ test-actions:
T_step( (unsigned int) i ); /* ${steps/32} */
}
checks: []
- description: |
- Run the event constant and number test for all 32 event constants.
links: []
-- action: |
+- action-brief: |
+ Calculate the value of a bitwise or of all 32 event constants.
+ action-code: |
rtems_event_set all;
int i;
@@ -25,30 +27,28 @@ test-actions:
all |= events[ i ];
}
checks:
- - check: |
- T_step_eq_u32( ${step}, all, RTEMS_ALL_EVENTS );
- description: |
+ - brief: |
Check that the value is equal to RTEMS_ALL_EVENTS.
+ code: |
+ T_step_eq_u32( ${step}, all, RTEMS_ALL_EVENTS );
links: []
- description: |
- Calculate the value of a bitwise or of all 32 event constants.
links: []
-- action: |
+- action-brief: |
+ Validate the Event Manager directive options.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
- description: |
+ - brief: |
Check that RTEMS_EVENT_ALL is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
links: []
- - check: |
+ - brief: |
+ Check that RTEMS_EVENT_ANY is a power of two.
+ code: |
T_step_ne_u32( ${step}, RTEMS_EVENT_ANY, 0 );
T_step_eq_u32( ${step}, RTEMS_EVENT_ANY & ( RTEMS_EVENT_ANY - 1 ), 0 );
- description: |
- Check that RTEMS_EVENT_ANY is a power of two.
links: []
- description: |
- Validate the Event Manager directive options.
links: []
test-brief: Tests the Event Manager API.
test-context: []
diff --git a/spec/rtems/event/val/send-receive.yml b/spec/rtems/event/val/send-receive.yml
index ec12f2fd..f3a41211 100644
--- a/spec/rtems/event/val/send-receive.yml
+++ b/spec/rtems/event/val/send-receive.yml
@@ -8,7 +8,10 @@ links:
- role: validation
uid: ../req/send
test-actions:
-- action: |
+- action-brief: |
+ Run the event send and receive tests for the application event set defined
+ by ${../req/send-receive}.
+ action-code: |
${../req/send-receive:/test-run}(
EventSend,
EventReceive,
@@ -17,9 +20,6 @@ test-actions:
STATES_WAITING_FOR_EVENT
);
checks: []
- description: |
- Run the event send and receive tests for the application event set defined
- by ${../req/send-receive}.
links: []
test-brief: |
Tests the ${../if/send:/name} and ${../if/receive:/name} directives.
diff --git a/spec/rtems/event/val/system-send-receive.yml b/spec/rtems/event/val/system-send-receive.yml
index bda6cd33..7e0418d5 100644
--- a/spec/rtems/event/val/system-send-receive.yml
+++ b/spec/rtems/event/val/system-send-receive.yml
@@ -8,7 +8,10 @@ links:
- role: validation
uid: ../req/system-send
test-actions:
-- action: |
+- action-brief: |
+ Run the event send and receive tests for the system event set defined
+ by ${../req/send-receive}.
+ action-code: |
${../req/send-receive:/test-run}(
EventSystemSend,
EventSystemReceive,
@@ -17,9 +20,6 @@ test-actions:
STATES_WAITING_FOR_SYSTEM_EVENT
);
checks: []
- description: |
- Run the event send and receive tests for the system event set defined
- by ${../req/send-receive}.
links: []
test-brief: |
Tests the ${../if/system-send:/name} and ${../if/system-receive:/name}
diff --git a/spec/rtems/message/val/ident.yml b/spec/rtems/message/val/ident.yml
index 83b04f82..a4ca45c9 100644
--- a/spec/rtems/message/val/ident.yml
+++ b/spec/rtems/message/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API message queue
+ class objects defined by ${../../req/ident}.
+ action-code: |
rtems_status_code sc;
rtems_id id_local_object;
@@ -24,9 +27,6 @@ test-actions:
sc = rtems_message_queue_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API message queue
- class objects defined by ${../../req/ident}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
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.
diff --git a/spec/rtems/option/val/options.yml b/spec/rtems/option/val/options.yml
index a69530eb..21a8c0ee 100644
--- a/spec/rtems/option/val/options.yml
+++ b/spec/rtems/option/val/options.yml
@@ -4,77 +4,79 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Validate the non-default option constants.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_EVENT_ANY ) );
- description: |
+ - brief: |
Check that RTEMS_EVENT_ANY is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_EVENT_ANY ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/event-any
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_WAIT ) );
- description: |
+ - brief: |
Check that RTEMS_NO_WAIT is a power of two.
+ code: |
+ T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_WAIT ) );
links:
- role: validation
uid: ../req/bit-set
- role: validation
uid: ../if/no-wait
- description: |
- Validate the non-default option constants.
links: []
-- action: |
+- action-brief: |
+ Validate the default option constants.
+ action-code: |
/* No action */
checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_DEFAULT_OPTIONS, 0 );
- description: |
+ - brief: |
Check that RTEMS_DEFAULT_OPTIONS is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_DEFAULT_OPTIONS, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/default
- - check: |
- T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
- description: |
+ - brief: |
Check that RTEMS_EVENT_ALL is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/event-all
- - check: |
- T_step_eq_u32( ${step}, RTEMS_WAIT, 0 );
- description: |
+ - brief: |
Check that RTEMS_WAIT is equal to zero.
+ code: |
+ T_step_eq_u32( ${step}, RTEMS_WAIT, 0 );
links:
- role: validation
uid: ../req/default
- role: validation
uid: ../if/wait
- description: |
- Validate the default option constants.
links: []
-- action: |
+- action-brief: |
+ Calculate the bitwise or of all non-default option constants.
+ action-code: |
rtems_option options;
options = 0;
options |= RTEMS_EVENT_ANY;
options |= RTEMS_NO_WAIT;
checks:
- - check: |
- T_step_eq_int( ${step}, PopCount( options ), 2 );
- description: |
+ - brief: |
Check that the count of set bits in the calculated value is equal to the
count of non-default option constants. Since each non-default option
constant is a power of two, this proves that each constant has a unique
value.
+ code: |
+ T_step_eq_int( ${step}, PopCount( options ), 2 );
links:
- role: validation
uid: ../req/unique
@@ -82,8 +84,6 @@ test-actions:
uid: ../if/event-any
- role: validation
uid: ../if/no-wait
- description: |
- Calculate the bitwise or of all non-default option constants.
links: []
test-brief: |
Tests the option constants of the Classic API.
diff --git a/spec/rtems/part/val/ident.yml b/spec/rtems/part/val/ident.yml
index f80c96ed..1762872b 100644
--- a/spec/rtems/part/val/ident.yml
+++ b/spec/rtems/part/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API partition class
+ objects defined by ${../../req/ident}.
+ action-code: |
static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) long area[32];
rtems_status_code sc;
rtems_id id_local_object;
@@ -29,9 +32,6 @@ test-actions:
sc = rtems_partition_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API partition class
- objects defined by ${../../req/ident}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/rtems/part/val/part.yml b/spec/rtems/part/val/part.yml
index 413304a0..3b3ad1d6 100644
--- a/spec/rtems/part/val/part.yml
+++ b/spec/rtems/part/val/part.yml
@@ -4,7 +4,10 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Create a partition with a buffer area length which is greater than three
+ times the buffer size and less than four times the buffer size.
+ action-code: |
RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
buffers[ 4 ][ 2 * sizeof( void * ) ];
void *pointers[ RTEMS_ARRAY_SIZE( buffers ) ];
@@ -23,7 +26,10 @@ test-actions:
);
T_step_rsc_success( ${step}, sc );
checks:
- - check: |
+ - brief: |
+ Check that exactly three buffers can be obtained from the partition for
+ use in parallel.
+ code: |
pointers[ 0 ] = NULL;
sc = rtems_partition_get_buffer( id, &pointers[ 0 ] );
T_step_rsc_success( ${step}, sc );
@@ -43,13 +49,13 @@ test-actions:
sc = rtems_partition_get_buffer( id, &pointers[ 3 ] );
T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
T_step_null( ${step}, pointers[ 3 ] );
- description: |
- Check that exactly three buffers can be obtained from the partition for
- use in parallel.
links:
- role: validation
uid: ../req/buffers
- - check: |
+ - brief: |
+ Return the three buffers in use to the partition and check that they can
+ be obtained from the partition for use in parallel in FIFO order.
+ code: |
sc = rtems_partition_return_buffer( id, pointers[ 1 ] );
T_step_rsc_success( ${step}, sc );
@@ -85,15 +91,9 @@ test-actions:
sc = rtems_partition_delete( id );
T_step_rsc_success( ${step}, sc );
- description: |
- Return the three buffers in use to the partition and check that they can
- be obtained from the partition for use in parallel in FIFO order.
links:
- role: validation
uid: ../req/fifo
- description: |
- Create a partition with a buffer area length which is greater than three
- times the buffer size and less than four times the buffer size.
links: []
test-brief: |
Validates some functional requirements of the Partition Manager.
diff --git a/spec/rtems/ratemon/val/ident.yml b/spec/rtems/ratemon/val/ident.yml
index 591da70e..223adb75 100644
--- a/spec/rtems/ratemon/val/ident.yml
+++ b/spec/rtems/ratemon/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API rate monotonic
+ class objects defined by ${../../req/ident-local}.
+ action-code: |
rtems_status_code sc;
rtems_id id_local_object;
@@ -24,9 +27,6 @@ test-actions:
sc = rtems_rate_monotonic_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API rate monotonic
- class objects defined by ${../../req/ident-local}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/rtems/sem/val/ident.yml b/spec/rtems/sem/val/ident.yml
index 5da9bd2a..ea674936 100644
--- a/spec/rtems/sem/val/ident.yml
+++ b/spec/rtems/sem/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API semaphore class
+ objects defined by ${../../req/ident}.
+ action-code: |
rtems_status_code sc;
rtems_id id_local_object;
@@ -27,9 +30,6 @@ test-actions:
sc = rtems_semaphore_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API semaphore class
- objects defined by ${../../req/ident}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/rtems/timer/val/ident.yml b/spec/rtems/timer/val/ident.yml
index 6d756a74..ca168715 100644
--- a/spec/rtems/timer/val/ident.yml
+++ b/spec/rtems/timer/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API timer class
+ objects defined by ${../../req/ident-local}.
+ action-code: |
rtems_status_code sc;
rtems_id id_local_object;
@@ -24,9 +27,6 @@ test-actions:
sc = rtems_timer_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API timer class
- objects defined by ${../../req/ident-local}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/rtems/userext/val/ident.yml b/spec/rtems/userext/val/ident.yml
index b07286dc..16f7497e 100644
--- a/spec/rtems/userext/val/ident.yml
+++ b/spec/rtems/userext/val/ident.yml
@@ -6,7 +6,10 @@ links:
- role: validation
uid: ../req/ident
test-actions:
-- action: |
+- action-brief: |
+ Run the generic object identification tests for Classic API user extension
+ class objects defined by ${../../req/ident-local}.
+ action-code: |
static const rtems_extensions_table table;
rtems_status_code sc;
rtems_id id_local_object;
@@ -26,9 +29,6 @@ test-actions:
sc = rtems_extension_delete( id_local_object );
T_rsc_success( sc );
checks: []
- description: |
- Run the generic object identification tests for Classic API user extension
- class objects defined by ${../../req/ident-local}.
links: []
test-brief: Test the ${../if/ident:/name} directive.
test-context: []
diff --git a/spec/spec/test-case-action.yml b/spec/spec/test-case-action.yml
index 46c3866d..669edbd0 100644
--- a/spec/spec/test-case-action.yml
+++ b/spec/spec/test-case-action.yml
@@ -10,17 +10,17 @@ spec-example: null
spec-info:
dict:
attributes:
- action:
+ action-brief:
+ description: |
+ It shall be the test case action brief description.
+ spec-type: optional-str
+ action-code:
description: |
It shall be the test case action code.
spec-type: str
checks:
description: null
spec-type: test-case-check-list
- description:
- description: |
- It shall be the test case action description.
- spec-type: optional-str
links:
description: null
spec-type: links
diff --git a/spec/spec/test-case-check.yml b/spec/spec/test-case-check.yml
index ebe8c47b..d0b32385 100644
--- a/spec/spec/test-case-check.yml
+++ b/spec/spec/test-case-check.yml
@@ -10,14 +10,14 @@ spec-example: null
spec-info:
dict:
attributes:
- check:
+ brief:
+ description: |
+ It shall be the test case check brief description.
+ spec-type: optional-str
+ code:
description: |
It shall be the test case check code.
spec-type: str
- description:
- description: |
- It shall be the test case check description.
- spec-type: optional-str
links:
description: null
spec-type: links
diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml
index 45149175..e3c3cfbe 100644
--- a/spec/testsuites/validation/c-library.yml
+++ b/spec/testsuites/validation/c-library.yml
@@ -4,52 +4,55 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Allocate four bytes with an alignment of 128 bytes with aligned_alloc().
+ action-code: |
void *p;
p = aligned_alloc(128, 4);
checks:
- - check: |
- T_step_not_null(${step}, p);
- description: |
+ - brief: |
Check that the returned pointer is not NULL.
+ code: |
+ T_step_not_null(${step}, p);
links: []
- - check: |
- T_step_eq_uptr(${step}, (uintptr_t) p % 128, 0);
- description: |
+ - brief: |
Check that the returned pointer is aligned by 128 bytes.
+ code: |
+ T_step_eq_uptr(${step}, (uintptr_t) p % 128, 0);
links: []
- description: |
- Allocate four bytes with an alignment of 128 bytes with aligned_alloc().
links: []
-- action: |
+- action-brief: |
+ Allocate four bytes with rtems_malloc().
+ action-code: |
void *p;
p = rtems_malloc(4);
checks:
- - check: |
- T_step_not_null(${step}, p);
- description: |
+ - brief: |
Check that the returned pointer is not NULL.
+ code: |
+ T_step_not_null(${step}, p);
links: []
- description: |
- Allocate four bytes with rtems_malloc().
links: []
-- action: |
+- action-brief: |
+ Set an integer variable to one and then to zero with memset().
+ action-code: |
int d;
d = 1;
memset(&d, 0, sizeof(d));
checks:
- - check: |
- T_step_eq_int(${step}, d, 0);
- description: |
+ - brief: |
Check that the integer variable is equal to zero.
+ code: |
+ T_step_eq_int(${step}, d, 0);
links: []
- description: |
- Set an integer variable to one and then to zero with memset().
links: []
-- action: |
+- action-brief: |
+ Set a source integer variable to one, set a destination integer variable to
+ two, and copy the source to the destination variable through memcpy().
+ action-code: |
int s;
int d;
@@ -57,14 +60,11 @@ test-actions:
d = 2;
memcpy(&d, &s, sizeof(d));
checks:
- - check: |
- T_step_eq_int(${step}, d, 1);
- description: |
+ - brief: |
Check that the destination integer variable is equal to one.
+ code: |
+ T_step_eq_int(${step}, d, 1);
links: []
- description: |
- Set a source integer variable to one, set a destination integer variable to
- two, and copy the source to the destination variable through memcpy().
links: []
test-brief: |
This test case calls functions of the C Library which are included in the
diff --git a/spec/testsuites/validation/classic-barrier.yml b/spec/testsuites/validation/classic-barrier.yml
index 1471bdab..6e5f0cf8 100644
--- a/spec/testsuites/validation/classic-barrier.yml
+++ b/spec/testsuites/validation/classic-barrier.yml
@@ -4,7 +4,10 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Set an object identifier to an invalid value and create an automatic
+ release barrier object for one task.
+ action-code: |
rtems_status_code sc;
ctx->id = 0xffffffff;
@@ -15,69 +18,66 @@ test-actions:
&ctx->id
);
checks:
- - check: |
- T_step_rsc_success(${step}, sc);
- description: |
+ - brief: |
Check that the barrier creation was successful.
+ code: |
+ T_step_rsc_success(${step}, sc);
links: []
- description: |
- Set an object identifier to an invalid value and create an automatic
- release barrier object for one task.
links: []
-- action: |
+- action-brief: |
+ Set a second object identifier to an invalid value and identify a barrier
+ object by its name.
+ action-code: |
rtems_status_code sc;
rtems_id id;
id = 0xffffffff;
sc = rtems_barrier_ident(name, &id);
checks:
- - check: |
- T_step_rsc_success(${step}, sc);
- description: |
+ - brief: |
Check that the barrier identification by name was successful.
+ code: |
+ T_step_rsc_success(${step}, sc);
links: []
- - check: |
- T_step_eq_u32(${step}, id, ctx->id);
- description: |
+ - brief: |
Check that the second identifier is equal to the one returned by the
barrier creation.
+ code: |
+ T_step_eq_u32(${step}, id, ctx->id);
links: []
- description: |
- Set a second object identifier to an invalid value and identify a barrier
- object by its name.
links: []
-- action: |
+- action-brief: |
+ Set the count of released tasks to one and release the barrier.
+ action-code: |
rtems_status_code sc;
uint32_t released;
released = 1;
sc = rtems_barrier_release(ctx->id, &released);
checks:
- - check: |
- T_step_rsc_success(${step}, sc);
- description: |
+ - brief: |
Check that the barrier release was successful.
+ code: |
+ T_step_rsc_success(${step}, sc);
links: []
- - check: |
- T_step_eq_u32(${step}, released, 0);
- description: |
+ - brief: |
Check that the count of released tasks is zero.
+ code: |
+ T_step_eq_u32(${step}, released, 0);
links: []
- description: |
- Set the count of released tasks to one and release the barrier.
links: []
-- action: |
+- action-brief: |
+ Wait with an infinite timeout for the barrier.
+ action-code: |
rtems_status_code sc;
sc = rtems_barrier_wait(ctx->id, RTEMS_NO_TIMEOUT);
checks:
- - check: |
- T_step_rsc_success(${step}, sc);
- description: |
+ - brief: |
Check that the barrier wait was successful.
+ code: |
+ T_step_rsc_success(${step}, sc);
links: []
- description: |
- Wait with an infinite timeout for the barrier.
links: []
test-brief: |
This test case calls functions of the Barrier Manager which are included in