From a48b16af3a78dd06081320fa5e031cf2f9ac527e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20K=C3=BChndel?= Date: Fri, 7 May 2021 15:46:26 +0200 Subject: 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 c57a02ce..2d6a3aad 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 964e39bb..cb14adc5 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 6df3b4f8..6dd514ac 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: -- cgit v1.2.3