From 87720a656c58594d1c33ca53fb122204c40a84a9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 29 Oct 2021 07:12:20 +0200 Subject: spec: Check that NTP update second is not called --- spec/score/timecounter/val/install.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/score/timecounter/val/install.yml b/spec/score/timecounter/val/install.yml index 261c985a..6ed290db 100644 --- a/spec/score/timecounter/val/install.yml +++ b/spec/score/timecounter/val/install.yml @@ -842,6 +842,23 @@ test-actions: T_eq_i64( bt.sec, 567993603 ); T_eq_u64( bt.frac, 1219770712064 ); checks: + - brief: | + Let the seconds value of ${/glossary/clock-realtime:/term} not change. + Check that the NTP update second handler is not called. + code: | + _Timecounter_Set_NTP_update_second( NtpUpdateCounter ); + SetCounter( tc, tc->base.tc_frequency / 2 ); + CallTimecounterTick(); + _Timecounter_Set_NTP_update_second( NULL ); + + T_eq_u32( ntp_counter, 0 ); + + rtems_clock_get_realtime_bintime( &bt ); + T_eq_i64( bt.sec, 567993603 ); + T_eq_u64( bt.frac, 9223373256625487872 ); + links: + - role: validation + uid: ../req/ntp-step - brief: | Let the seconds value of ${/glossary/clock-realtime:/term} change by one. Check that the NTP update second handler is called exactly once. -- cgit v1.2.3