[rtems-central commit] spec: Use common wording

Sebastian Huber sebh at rtems.org
Fri Mar 5 20:18:35 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Mar  5 21:17:54 2021 +0100

spec: Use common wording

---

 spec/rtems/barrier/req/create.yml           |  2 +-
 spec/rtems/barrier/req/release.yml          |  3 ++-
 spec/rtems/message/req/construct-errors.yml |  6 ++++--
 spec/rtems/part/req/create.yml              |  6 ++++--
 spec/rtems/part/req/delete.yml              | 19 ++++++++++---------
 spec/rtems/part/req/get-buffer.yml          | 25 ++++++++++++++-----------
 spec/rtems/part/req/return-buffer.yml       |  2 +-
 spec/rtems/task/req/construct-errors.yml    |  6 ++++--
 spec/rtems/task/req/create-errors.yml       |  6 ++++--
 9 files changed, 44 insertions(+), 31 deletions(-)

diff --git a/spec/rtems/barrier/req/create.yml b/spec/rtems/barrier/req/create.yml
index fde14f4..c793688 100644
--- a/spec/rtems/barrier/req/create.yml
+++ b/spec/rtems/barrier/req/create.yml
@@ -164,7 +164,7 @@ pre-conditions:
       ctx->id = &ctx->id_value;
     text: |
       The ${../if/create:/params[3]/name} parameter shall reference an object
-      identifier value.
+      of type ${../../type/if/id:/name}.
   - name: 'Null'
     test-code: |
       ctx->id = NULL;
diff --git a/spec/rtems/barrier/req/release.yml b/spec/rtems/barrier/req/release.yml
index bb0736d..3954958 100644
--- a/spec/rtems/barrier/req/release.yml
+++ b/spec/rtems/barrier/req/release.yml
@@ -73,7 +73,8 @@ pre-conditions:
     test-code: |
       ctx->released = &ctx->released_value;
     text: |
-      The ${../if/release:/params[1]/name} parameter shall reference an integer variable.
+      The ${../if/release:/params[1]/name} parameter shall reference an object
+      of type ${/c/if/uint32_t:/name}.
   - name: 'Null'
     test-code: |
       ctx->released = NULL;
diff --git a/spec/rtems/message/req/construct-errors.yml b/spec/rtems/message/req/construct-errors.yml
index 19e7b40..435792a 100644
--- a/spec/rtems/message/req/construct-errors.yml
+++ b/spec/rtems/message/req/construct-errors.yml
@@ -99,12 +99,14 @@ pre-conditions:
     test-code: |
       ctx->id = &ctx->id_value;
     text: |
-      The id parameter shall reference an object identifier value.
+      The ${../if/construct:/params[1]/name} parameter shall reference an
+      object of type ${../../type/if/id:/name}.
   - name: 'Null'
     test-code: |
       ctx->id = NULL;
     text: |
-      The id parameter shall be NULL.
+      The ${../if/construct:/params[1]/name} parameter shall be
+      ${/c/if/null:/name}.
   test-epilogue: null
   test-prologue: null
 - name: Name
diff --git a/spec/rtems/part/req/create.yml b/spec/rtems/part/req/create.yml
index d79f634..0df8405 100644
--- a/spec/rtems/part/req/create.yml
+++ b/spec/rtems/part/req/create.yml
@@ -109,12 +109,14 @@ pre-conditions:
     test-code: |
       ctx->id = &ctx->id_value;
     text: |
-      The id parameter shall reference an object identifier value.
+      The ${../if/create:/params[5]/name} parameter shall reference an object
+      of type ${../../type/if/id:/name}.
   - name: 'Null'
     test-code: |
       ctx->id = NULL;
     text: |
-      The id parameter shall be NULL.
+      The ${../if/create:/params[5]/name} parameter shall be
+      ${/c/if/null:/name}.
   test-epilogue: null
   test-prologue: null
 - name: Name
diff --git a/spec/rtems/part/req/delete.yml b/spec/rtems/part/req/delete.yml
index d5e3dde..4a24767 100644
--- a/spec/rtems/part/req/delete.yml
+++ b/spec/rtems/part/req/delete.yml
@@ -48,16 +48,17 @@ post-conditions:
 pre-conditions:
 - name: Id
   states:
-  - name: Id
+  - name: NoObj
     test-code: |
-      ctx->id = ctx->id_value;
+      ctx->id = 0xffffffff;
     text: |
-      The id parameter shall reference a partition object.
-  - name: Invalid
+      The ${../if/delete:/params[0]/name} parameter shall be invalid.
+  - name: Part
     test-code: |
-      ctx->id = 0;
+      ctx->id = ctx->id_value;
     text: |
-      The id parameter shall not reference a partition object.
+      The ${../if/delete:/params[0]/name} parameter shall be associated with a
+      partition.
   test-epilogue: null
   test-prologue: null
 - name: InUse
@@ -148,7 +149,7 @@ transition-map:
     Status: Ok
   pre-conditions:
     Id:
-    - Id
+    - Part
     InUse:
     - 'No'
 - enabled-by: true
@@ -156,14 +157,14 @@ transition-map:
     Status: InvId
   pre-conditions:
     Id:
-    - Invalid
+    - NoObj
     InUse: all
 - enabled-by: true
   post-conditions:
     Status: InUse
   pre-conditions:
     Id:
-    - Id
+    - Part
     InUse:
     - 'Yes'
 type: requirement
diff --git a/spec/rtems/part/req/get-buffer.yml b/spec/rtems/part/req/get-buffer.yml
index dc38e89..999d7cf 100644
--- a/spec/rtems/part/req/get-buffer.yml
+++ b/spec/rtems/part/req/get-buffer.yml
@@ -42,16 +42,17 @@ post-conditions:
 pre-conditions:
 - name: Id
   states:
-  - name: Id
+  - name: NoObj
     test-code: |
-      ctx->id = ctx->id_value;
+      ctx->id = 0xffffffff;
     text: |
-      The id parameter shall reference a partition object.
-  - name: Invalid
+      The ${../if/get-buffer:/params[0]/name} parameter shall be invalid.
+  - name: Part
     test-code: |
-      ctx->id = 0;
+      ctx->id = ctx->id_value;
     text: |
-      The id parameter shall not reference a partition object.
+      The ${../if/get-buffer:/params[0]/name} parameter shall be associated with a
+      partition.
   test-epilogue: null
   test-prologue: null
 - name: Buf
@@ -60,12 +61,14 @@ pre-conditions:
     test-code: |
       ctx->buffer = &ctx->buffer_pointer;
     text: |
-      The buffer parameter shall reference a buffer pointer variable.
+      The ${../if/get-buffer:/params[1]/name} parameter shall reference an
+      object of type ``void *``.
   - name: 'Null'
     test-code: |
       ctx->buffer = NULL;
     text: |
-      The buffer parameter shall be NULL.
+      The ${../if/get-buffer:/params[1]/name} parameter shall be
+      ${/c/if/null:/name}.
   test-epilogue: null
   test-prologue: null
 - name: Avail
@@ -177,7 +180,7 @@ transition-map:
     Buf:
     - Valid
     Id:
-    - Id
+    - Part
 - enabled-by: true
   post-conditions:
     Status: InvAddr
@@ -194,7 +197,7 @@ transition-map:
     Buf:
     - Valid
     Id:
-    - Invalid
+    - NoObj
 - enabled-by: true
   post-conditions:
     Status: Unsatisfied
@@ -204,5 +207,5 @@ transition-map:
     Buf:
     - Valid
     Id:
-    - Id
+    - Part
 type: requirement
diff --git a/spec/rtems/part/req/return-buffer.yml b/spec/rtems/part/req/return-buffer.yml
index b5a432f..aef7454 100644
--- a/spec/rtems/part/req/return-buffer.yml
+++ b/spec/rtems/part/req/return-buffer.yml
@@ -72,7 +72,7 @@ pre-conditions:
     test-code: |
       ctx->buffer = ctx->buffer_in_use;
     text: |
-      The ${../if/return-buffer:/params[1]/name} parameter  shall reference a
+      The ${../if/return-buffer:/params[1]/name} parameter shall reference a
       buffer previously returned by ${../if/get-buffer:/name}.
   - name: BadAlign
     test-code: |
diff --git a/spec/rtems/task/req/construct-errors.yml b/spec/rtems/task/req/construct-errors.yml
index c76061b..ba47811 100644
--- a/spec/rtems/task/req/construct-errors.yml
+++ b/spec/rtems/task/req/construct-errors.yml
@@ -146,12 +146,14 @@ pre-conditions:
     test-code: |
       ctx->id = &ctx->id_value;
     text: |
-      The id parameter shall reference an object identifier value.
+      The ${../if/construct:/params[1]/name} parameter shall reference an
+      object of type ${../../type/if/id:/name}.
   - name: 'Null'
     test-code: |
       ctx->id = NULL;
     text: |
-      The id parameter shall be NULL.
+      The ${../if/construct:/params[1]/name} parameter shall be
+      ${/c/if/null:/name}.
   test-epilogue: null
   test-prologue: null
 - name: Name
diff --git a/spec/rtems/task/req/create-errors.yml b/spec/rtems/task/req/create-errors.yml
index c9d1bde..65c648b 100644
--- a/spec/rtems/task/req/create-errors.yml
+++ b/spec/rtems/task/req/create-errors.yml
@@ -124,12 +124,14 @@ pre-conditions:
     test-code: |
       ctx->id = &ctx->id_value;
     text: |
-      The id parameter shall reference an object identifier value.
+      The ${../if/create:/params[5]/name} parameter shall reference an object
+      of type ${../../type/if/id:/name}.
   - name: 'Null'
     test-code: |
       ctx->id = NULL;
     text: |
-      The id parameter shall be NULL.
+      The ${../if/create:/params[5]/name} parameter shall be
+      ${/c/if/null:/name}.
   test-epilogue: null
   test-prologue: null
 - name: Name



More information about the vc mailing list