[rtems-central commit] spec: Adjust clock_nanosleep() test case

Sebastian Huber sebh at rtems.org
Thu Jun 23 07:38:38 UTC 2022


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jun 23 09:41:21 2022 +0200

spec: Adjust clock_nanosleep() test case

Update #4669.

---

 spec/c/req/clock-nanosleep.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/spec/c/req/clock-nanosleep.yml b/spec/c/req/clock-nanosleep.yml
index 5e57eaa2..e2c62514 100644
--- a/spec/c/req/clock-nanosleep.yml
+++ b/spec/c/req/clock-nanosleep.yml
@@ -377,14 +377,20 @@ test-support: |
 
     while ( true ) {
       T_scheduler_log *log;
+      uint32_t         counter;
 
       SuspendSelf();
 
       log = T_scheduler_record_4( &ctx->scheduler_log );
       T_null( log );
 
-      _Timecounter_Getnanotime( &ctx->now_realtime );
-      _Timecounter_Getnanouptime( &ctx->now_monotonic );
+      counter = GetTimecountCounter();
+      _Timecounter_Nanotime( &ctx->now_realtime );
+      SetTimecountCounter( counter );
+
+      counter = GetTimecountCounter();
+      _Timecounter_Nanouptime( &ctx->now_monotonic );
+      SetTimecountCounter( counter );
 
       ctx->status = clock_nanosleep(
         ctx->clock_id,



More information about the vc mailing list