summaryrefslogtreecommitdiffstats
path: root/spec/rtems/barrier/req
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-12 11:39:39 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-19 15:14:25 +0100
commita39bf437db31e037d9e71f10ddb4b70b0db6ece8 (patch)
treed915ab025c6d459cf28c2c4d22ccf1befb09959e /spec/rtems/barrier/req
parentvalidation: Optimize transition map (diff)
downloadrtems-central-a39bf437db31e037d9e71f10ddb4b70b0db6ece8.tar.bz2
spec: Canonicalize directives
Use common wording and the new templates for action requirements.
Diffstat (limited to 'spec/rtems/barrier/req')
-rw-r--r--spec/rtems/barrier/req/create.yml71
-rw-r--r--spec/rtems/barrier/req/delete.yml4
-rw-r--r--spec/rtems/barrier/req/release.yml14
-rw-r--r--spec/rtems/barrier/req/wait.yml18
4 files changed, 52 insertions, 55 deletions
diff --git a/spec/rtems/barrier/req/create.yml b/spec/rtems/barrier/req/create.yml
index b648e54f..815f1eb1 100644
--- a/spec/rtems/barrier/req/create.yml
+++ b/spec/rtems/barrier/req/create.yml
@@ -64,11 +64,6 @@ post-conditions:
rtems_id id;
- name: Class
states:
- - name: NoObj
- test-code: |
- /* Not applicable */
- text: |
- The barrier class is not applicable since there was no barrier created.
- name: Manual
test-code: |
sc = rtems_barrier_wait( ctx->id_value, RTEMS_NO_TIMEOUT );
@@ -77,7 +72,8 @@ post-conditions:
++ctx->release_expected;
T_eq_u32( ctx->release_done, ctx->release_expected );
text: |
- The class of the barrier shall be manual release.
+ The class of the barrier created by the ${../if/create:/name} call shall
+ be manual release.
- name: Auto
test-code: |
sc = rtems_barrier_wait( ctx->id_value, RTEMS_NO_TIMEOUT );
@@ -85,7 +81,8 @@ post-conditions:
T_eq_u32( ctx->release_done, ctx->release_expected );
text: |
- The class of the barrier shall be automatic release.
+ The class of the barrier created by the ${../if/create:/name} call shall
+ be automatic release.
test-epilogue: null
test-prologue: |
rtems_status_code sc;
@@ -115,12 +112,28 @@ pre-conditions:
test-code: |
ctx->name = NAME;
text: |
- The ${../if/create:/params[0]/name} parameter shall be valid.
+ While the ${../if/create:/params[0]/name} parameter is valid.
- name: Invalid
test-code: |
ctx->name = 0;
text: |
- The ${../if/create:/params[0]/name} parameter shall be invalid.
+ While the ${../if/create:/params[0]/name} parameter is invalid.
+ test-epilogue: null
+ test-prologue: null
+- name: Id
+ states:
+ - name: Valid
+ test-code: |
+ ctx->id = &ctx->id_value;
+ text: |
+ While the ${../if/create:/params[3]/name} parameter references an object
+ of type ${../../type/if/id:/name}.
+ - name: 'Null'
+ test-code: |
+ ctx->id = NULL;
+ text: |
+ While the ${../if/create:/params[3]/name} parameter is
+ ${/c/if/null:/name}.
test-epilogue: null
test-prologue: null
- name: Class
@@ -129,19 +142,19 @@ pre-conditions:
test-code: |
/* Nothing to do */
text: |
- The ${../if/create:/params[1]/name} parameter shall specify the default
+ While the ${../if/create:/params[1]/name} parameter specifies the default
class.
- name: Manual
test-code: |
ctx->attribute_set |= RTEMS_BARRIER_MANUAL_RELEASE;
text: |
- The ${../if/create:/params[1]/name} parameter shall specify the manual
+ While the ${../if/create:/params[1]/name} parameter specifies the manual
release class.
- name: Auto
test-code: |
ctx->attribute_set |= RTEMS_BARRIER_AUTOMATIC_RELEASE;
text: |
- The ${../if/create:/params[1]/name} parameter shall specify the
+ While the ${../if/create:/params[1]/name} parameter specifies the
automatic release class.
test-epilogue: null
test-prologue: null
@@ -151,28 +164,12 @@ pre-conditions:
test-code: |
ctx->maximum_waiters = 0;
text: |
- The ${../if/create:/params[2]/name} parameter shall be zero.
+ While the ${../if/create:/params[2]/name} parameter is zero.
- name: Positive
test-code: |
ctx->maximum_waiters = 1;
text: |
- The ${../if/create:/params[2]/name} parameter shall be positive.
- test-epilogue: null
- test-prologue: null
-- name: Id
- states:
- - name: Valid
- test-code: |
- ctx->id = &ctx->id_value;
- text: |
- The ${../if/create:/params[3]/name} parameter shall reference an object
- of type ${../../type/if/id:/name}.
- - name: 'Null'
- test-code: |
- ctx->id = NULL;
- text: |
- The ${../if/create:/params[3]/name} parameter shall be
- ${/c/if/null:/name}.
+ While the ${../if/create:/params[2]/name} parameter is positive.
test-epilogue: null
test-prologue: null
- name: Free
@@ -181,12 +178,12 @@ pre-conditions:
test-code: |
/* Nothing to do */
text: |
- The system shall have at least one inactive barrier object available.
+ While the system has at least one inactive barrier object available.
- name: 'No'
test-code: |
ctx->seized_objects = T_seize_objects( Create, NULL );
text: |
- The system shall not have an inactive barrier object available.
+ While the system has no inactive barrier object available.
test-epilogue: null
test-prologue: null
rationale: null
@@ -340,7 +337,7 @@ transition-map:
post-conditions:
Status: InvName
Name: Invalid
- Class: NoObj
+ Class: N/A
IdVar: Nop
pre-conditions:
Name:
@@ -353,7 +350,7 @@ transition-map:
post-conditions:
Status: InvAddr
Name: Invalid
- Class: NoObj
+ Class: N/A
IdVar: Nop
pre-conditions:
Name:
@@ -384,7 +381,7 @@ transition-map:
post-conditions:
Status: InvNum
Name: Invalid
- Class: NoObj
+ Class: N/A
IdVar: Nop
pre-conditions:
Name:
@@ -417,7 +414,7 @@ transition-map:
post-conditions:
Status: TooMany
Name: Invalid
- Class: NoObj
+ Class: N/A
IdVar: Nop
pre-conditions:
Name:
@@ -434,7 +431,7 @@ transition-map:
post-conditions:
Status: TooMany
Name: Invalid
- Class: NoObj
+ Class: N/A
IdVar: Nop
pre-conditions:
Name:
diff --git a/spec/rtems/barrier/req/delete.yml b/spec/rtems/barrier/req/delete.yml
index 9ea47284..f961d8e1 100644
--- a/spec/rtems/barrier/req/delete.yml
+++ b/spec/rtems/barrier/req/delete.yml
@@ -66,13 +66,13 @@ pre-conditions:
test-code: |
ctx->id = 0;
text: |
- The ${../if/delete:/params[0]/name} parameter shall not be associated
+ While the ${../if/delete:/params[0]/name} parameter is not associated
with a barrier.
- name: Barrier
test-code: |
ctx->id = ctx->barrier_id;
text: |
- The ${../if/delete:/params[0]/name} parameter shall be associated with
+ While the ${../if/delete:/params[0]/name} parameter is associated with
a barrier.
test-epilogue: null
test-prologue: null
diff --git a/spec/rtems/barrier/req/release.yml b/spec/rtems/barrier/req/release.yml
index 9b0dffef..7c04606a 100644
--- a/spec/rtems/barrier/req/release.yml
+++ b/spec/rtems/barrier/req/release.yml
@@ -54,19 +54,19 @@ pre-conditions:
test-code: |
ctx->id = 0xffffffff;
text: |
- The ${../if/release:/params[0]/name} parameter shall not be associated
+ While the ${../if/release:/params[0]/name} parameter is not associated
with a barrier.
- name: Manual
test-code: |
ctx->id = ctx->manual_release_id;
text: |
- The ${../if/release:/params[0]/name} parameter shall be associated with a
+ While the ${../if/release:/params[0]/name} parameter is associated with a
manual release barrier.
- name: Auto
test-code: |
ctx->id = ctx->auto_release_id;
text: |
- The ${../if/release:/params[0]/name} parameter shall be associated with an
+ While the ${../if/release:/params[0]/name} parameter is associated with an
automatic release barrier.
test-epilogue: null
test-prologue: null
@@ -76,13 +76,13 @@ pre-conditions:
test-code: |
ctx->released = &ctx->released_value;
text: |
- The ${../if/release:/params[1]/name} parameter shall reference an object
+ While the ${../if/release:/params[1]/name} parameter references an object
of type ${/c/if/uint32_t:/name}.
- name: 'Null'
test-code: |
ctx->released = NULL;
text: |
- The ${../if/release:/params[1]/name} parameter shall be
+ While the ${../if/release:/params[1]/name} parameter is
${/c/if/null:/name}.
test-epilogue: null
test-prologue: |
@@ -93,13 +93,13 @@ pre-conditions:
test-code: |
ctx->waiting_tasks = 0;
text: |
- The number of tasks waiting at the barrier shall be zero.
+ While the number of tasks waiting at the barrier is zero.
- name: Positive
test-code: |
ctx->waiting_tasks = 1;
SendEvents( ctx->worker_id, EVENT_WAIT );
text: |
- The number of tasks waiting at the barrier shall be positive.
+ While the number of tasks waiting at the barrier is positive.
test-epilogue: null
test-prologue: null
rationale: null
diff --git a/spec/rtems/barrier/req/wait.yml b/spec/rtems/barrier/req/wait.yml
index 128ca71c..30827014 100644
--- a/spec/rtems/barrier/req/wait.yml
+++ b/spec/rtems/barrier/req/wait.yml
@@ -47,19 +47,19 @@ pre-conditions:
test-code: |
ctx->id = 0xffffffff;
text: |
- The ${../if/release:/params[0]/name} parameter shall not be associated
+ While the ${../if/release:/params[0]/name} parameter is not associated
with a barrier.
- name: Manual
test-code: |
ctx->id = ctx->manual_release_id;
text: |
- The ${../if/release:/params[0]/name} parameter shall be associated with a
+ While the ${../if/release:/params[0]/name} parameter is associated with a
manual release barrier.
- name: Auto
test-code: |
ctx->id = ctx->auto_release_id;
text: |
- The ${../if/release:/params[0]/name} parameter shall be associated with an
+ While the ${../if/release:/params[0]/name} parameter is associated with an
automatic release barrier.
test-epilogue: null
test-prologue: null
@@ -69,13 +69,13 @@ pre-conditions:
test-code: |
ctx->timeout = 2;
text: |
- The ${../if/release:/params[1]/name} parameter shall be a clock tick
+ While the ${../if/release:/params[1]/name} parameter is a clock tick
interval.
- name: Forever
test-code: |
ctx->timeout = RTEMS_NO_TIMEOUT;
text: |
- The ${../if/release:/params[1]/name} parameter shall be
+ While the ${../if/release:/params[1]/name} parameter is
${../../type/if/no-timeout:/name}.
test-epilogue: null
test-prologue: null
@@ -87,24 +87,24 @@ pre-conditions:
SendEvents( ctx->low_worker_id, EVENT_CHECK_TIMER | EVENT_RELEASE );
}
text: |
- While the calling task waits at the barrier, the barrier shall not be
+ While the calling task waits at the barrier, while the barrier is not
released or deleted.
- name: Wait
test-code: |
SendEvents( ctx->high_worker_id, EVENT_WAIT );
text: |
- Calling the directive shall release the barrier.
+ While calling the directive releases the barrier.
- name: Release
test-code: |
SendEvents( ctx->low_worker_id, EVENT_RELEASE );
text: |
- While the calling task waits at the barrier, the barrier shall be
+ While the calling task waits at the barrier, while the barrier is
released.
- name: Delete
test-code: |
SendEvents( ctx->low_worker_id, EVENT_DELETE );
text: |
- While the calling task waits at the barrier, the barrier shall be
+ While the calling task waits at the barrier, while the barrier is
deleted.
test-epilogue: null
test-prologue: null