[rtems-central commit] spec: Specify rtems_object_get_local_node()
Sebastian Huber
sebh at rtems.org
Mon Jul 26 11:12:45 UTC 2021
Module: rtems-central
Branch: master
Commit: 1d0351c33470bd9a8ccaf379e86b7b2186b12863
Changeset: http://git.rtems.org/rtems-central/commit/?id=1d0351c33470bd9a8ccaf379e86b7b2186b12863
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jul 26 12:13:24 2021 +0200
spec: Specify rtems_object_get_local_node()
---
spec/rtems/object/req/get-local-node.yml | 15 +++++++++++++++
spec/rtems/object/val/object.yml | 17 ++++++++++++++++-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/spec/rtems/object/req/get-local-node.yml b/spec/rtems/object/req/get-local-node.yml
new file mode 100644
index 0000000..d7a124b
--- /dev/null
+++ b/spec/rtems/object/req/get-local-node.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: interface-function
+ uid: ../if/get-local-node
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The result of ${../if/get-local-node:/name} shall be equal to the local
+ ${/glossary/node:/term} number.
+type: requirement
diff --git a/spec/rtems/object/val/object.yml b/spec/rtems/object/val/object.yml
index 792206b..880c686 100644
--- a/spec/rtems/object/val/object.yml
+++ b/spec/rtems/object/val/object.yml
@@ -75,8 +75,23 @@ test-actions:
links:
- role: validation
uid: ../req/build-name-macro
+- action-brief: |
+ Validate the result of ${../if/get-local-node:/name}.
+ action-code: |
+ uint32_t node;
+
+ node = rtems_object_get_local_node();
+ checks:
+ - brief: |
+ Check that the returned value is zero.
+ code: |
+ T_step_eq_u32( ${step}, node, 0 );
+ links: []
+ links:
+ - role: validation
+ uid: ../req/get-local-node
test-brief: |
- Tests the rtems_build_name() macro.
+ Tests the ${../if/group:/name} directives.
test-context: []
test-context-support: null
test-description: null
More information about the vc
mailing list