[rtems-central commit] spec: timer: Unset clock after test

Sebastian Huber sebh at rtems.org
Mon May 17 06:10:56 UTC 2021


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

Author:    Frank Kühndel <frank.kuehndel at embedded-brains.de>
Date:      Fri May  7 15:46:26 2021 +0200

spec: timer: Unset clock after test

This patch changes rtems_timer_cancel(), rtems_timer_reset() and
rtems_timer_fire_after() validation tests. It adds a call
to UnsetClock() in teardown to set the state of the system back
to where is was before the test.

In addition, in rtems_timer_fire_after() it fixes a typo in
pre-condition requirements.

---

 spec/rtems/timer/req/cancel.yml     | 4 +++-
 spec/rtems/timer/req/fire-after.yml | 8 +++++---
 spec/rtems/timer/req/reset.yml      | 4 +++-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/spec/rtems/timer/req/cancel.yml b/spec/rtems/timer/req/cancel.yml
index c57a02c..2d6a3aa 100644
--- a/spec/rtems/timer/req/cancel.yml
+++ b/spec/rtems/timer/req/cancel.yml
@@ -354,9 +354,11 @@ test-support: |
   }
 test-target: testsuites/validation/tc-timer-cancel.c
 test-teardown:
-  brief: null
+  brief: Make sure the timer server is not running and the realtime clock
+    is not set after this test.
   code: |
     DeleteTimerServer();
+    UnsetClock();
   description: null
 text: ${.:text-template}
 transition-map:
diff --git a/spec/rtems/timer/req/fire-after.yml b/spec/rtems/timer/req/fire-after.yml
index 964e39b..cb14adc 100644
--- a/spec/rtems/timer/req/fire-after.yml
+++ b/spec/rtems/timer/req/fire-after.yml
@@ -199,7 +199,7 @@ pre-conditions:
     test-code: |
       ctx->ticks_param = 0;
     text: |
-      While the ${../if/fire-after:/params[0]/name} parameter is 0.
+      While the ${../if/fire-after:/params[1]/name} parameter is 0.
   test-epilogue: null
   test-prologue: null
 - name: Routine
@@ -214,7 +214,7 @@ pre-conditions:
     test-code: |
       ctx->routine_param = NULL;
     text: |
-      While the ${../if/fire-after:/params[0]/name} parameter is
+      While the ${../if/fire-after:/params[2]/name} parameter is
       ${/c/if/null:/name}..
   test-epilogue: null
   test-prologue: null
@@ -535,9 +535,11 @@ test-support: |
   }
 test-target: testsuites/validation/tc-timer-fire-after.c
 test-teardown:
-  brief: null
+  brief: Make sure the timer server is not running and the realtime clock
+    is not set after this test.
   code: |
     DeleteTimerServer();
+    UnsetClock();
   description: null
 text: ${.:text-template}
 transition-map:
diff --git a/spec/rtems/timer/req/reset.yml b/spec/rtems/timer/req/reset.yml
index 6df3b4f..6dd514a 100644
--- a/spec/rtems/timer/req/reset.yml
+++ b/spec/rtems/timer/req/reset.yml
@@ -544,9 +544,11 @@ test-support: |
   }
 test-target: testsuites/validation/tc-timer-reset.c
 test-teardown:
-  brief: null
+  brief: Make sure the timer server is not running and the realtime clock
+    is not set after this test.
   code: |
     DeleteTimerServer();
+    UnsetClock();
   description: null
 text: ${.:text-template}
 transition-map:



More information about the vc mailing list