[rtems-central commit] spec: Ratemon test: Adapt to reset postponed jobs

Sebastian Huber sebh at rtems.org
Fri Oct 8 14:17:35 UTC 2021


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

Author:    Frank Kühndel <frank.kuehndel at embedded-brains.de>
Date:      Wed Oct  6 15:15:54 2021 +0200

spec: Ratemon test: Adapt to reset postponed jobs

There was a change by which rtems_rate_monotonic_cancel() sets
the postponed jobs counter 0. This patch adapts the tests to
this new behavior.

https://git.rtems.org/rtems/commit/?id=38c2147759d1b687a7330419a04a6c84d80b784a

---

 spec/rtems/ratemon/req/cancel.yml | 18 +-----------------
 spec/rtems/ratemon/req/period.yml |  3 ++-
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/spec/rtems/ratemon/req/cancel.yml b/spec/rtems/ratemon/req/cancel.yml
index 26aafd2..ecfaef3 100644
--- a/spec/rtems/ratemon/req/cancel.yml
+++ b/spec/rtems/ratemon/req/cancel.yml
@@ -56,21 +56,6 @@ post-conditions:
     text: |
       There shall be no ${../glossary/postponedjob:/plural}
       after the return of the ${../if/cancel:/name} call.
-  - name: One
-    test-code: |
-      T_eq_u32( ctx->period_status.postponed_jobs_count, 1 );
-    text: |
-      The number of ${../glossary/postponedjob:/plural} shall not be
-      changed by the past call to ${../if/cancel:/name}.
-  - name: Several
-    test-code: |
-      T_eq_u32(
-        ctx->period_status.postponed_jobs_count,
-        ctx->postponed_jobs_count
-      );
-    text: |
-      The number of ${../glossary/postponedjob:/plural} shall not be
-      changed by the past call to ${../if/cancel:/name}.
   - name: Nop
     test-code: |
       T_eq_u32( ctx->period_status.postponed_jobs_count,
@@ -447,8 +432,7 @@ transition-map:
   post-conditions:
     Status: Ok
     State: Inactive
-    Postponed:
-      - specified-by: Postponed
+    Postponed: Zero
     Scheduler: Called
   pre-conditions:
     Id:
diff --git a/spec/rtems/ratemon/req/period.yml b/spec/rtems/ratemon/req/period.yml
index 7d5674f..e5f1276 100644
--- a/spec/rtems/ratemon/req/period.yml
+++ b/spec/rtems/ratemon/req/period.yml
@@ -259,6 +259,7 @@ pre-conditions:
   - name: New
     test-code:  |
       /* Nothing to do here as the period is newly created. */
+      ctx->postponed_jobs_count = 0;
     text: |
       While ${../if/period:/name} has never been invoked with result
       ${../../status/if/successful:/name} on the period object referenced
@@ -271,6 +272,7 @@ pre-conditions:
         TickTheClock( ctx, ctx->postponed_jobs_count * period_length );
       }
       OwnerDoWork( ctx, CancelPeriod );
+      ctx->postponed_jobs_count = 0;
     text: |
       While ${../if/period:/name} has never been invoked with result
       ${../../status/if/successful:/name} on the period object referenced
@@ -425,7 +427,6 @@ test-prepare: |
     &period_status
   );
   T_rsc_success( status );
-  ctx->postponed_jobs_count = period_status.postponed_jobs_count;
 test-setup:
   brief: null
   code: |



More information about the vc mailing list