[rtems-central commit] spec: Specify status constants

Sebastian Huber sebh at rtems.org
Fri Nov 19 07:51:57 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    bdc208f960b0a583d6adb1b5af86d13546a487ce
Changeset: http://git.rtems.org/rtems-central/commit/?id=bdc208f960b0a583d6adb1b5af86d13546a487ce

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Nov 16 23:09:31 2021 +0100

spec: Specify status constants

---

 spec/rtems/status/req/first.yml  | 15 ++++++++++++++
 spec/rtems/status/req/last.yml   | 15 ++++++++++++++
 spec/rtems/status/val/status.yml | 43 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/spec/rtems/status/req/first.yml b/spec/rtems/status/req/first.yml
new file mode 100644
index 0000000..1c0190f
--- /dev/null
+++ b/spec/rtems/status/req/first.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/first
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/first:/name} constant shall be equal to the minimum value of all
+  ${../if/code:/name} enumerators.
+type: requirement
diff --git a/spec/rtems/status/req/last.yml b/spec/rtems/status/req/last.yml
new file mode 100644
index 0000000..cfc5830
--- /dev/null
+++ b/spec/rtems/status/req/last.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/last
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/last:/name} constant shall be equal to the maximum value of all
+  ${../if/code:/name} enumerators.
+type: requirement
diff --git a/spec/rtems/status/val/status.yml b/spec/rtems/status/val/status.yml
new file mode 100644
index 0000000..312a3aa
--- /dev/null
+++ b/spec/rtems/status/val/status.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+    Validate the status code constants.
+  action-code: |
+    /* Nothing to do */
+  checks:
+  - brief: |
+      Check that ${../if/first:/name} has the expected value and is a constant
+      expression.
+    code: |
+      RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_FIRST == 0, FIRST );
+    links:
+    - role: validation
+      uid: ../req/first
+  - brief: |
+      Check that ${../if/last:/name} has the expected value and is a constant
+      expression.
+    code: |
+      RTEMS_STATIC_ASSERT( RTEMS_STATUS_CODES_LAST == 29, LAST );
+    links:
+    - role: validation
+      uid: ../req/last
+  links: []
+test-brief: |
+  Tests some ${../if/group:/name} interfaces.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems.h
+test-local-includes: []
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/validation/tc-status.c
+test-teardown: null
+type: test-case



More information about the vc mailing list