From 52ec694d2b96eadf5e01489f819b3f9343f9944f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 28 Jun 2022 14:41:28 +0200 Subject: [PATCH] test: fix server interleaved mode in ntp_core unit test --- test/unit/ntp_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/ntp_core.c b/test/unit/ntp_core.c index 74145b9..0d9c3a7 100644 --- a/test/unit/ntp_core.c +++ b/test/unit/ntp_core.c @@ -411,6 +411,7 @@ test_unit(void) NCR_Initialise(); REF_Initialise(); KEY_Initialise(); + CLG_Initialise(); CNF_SetupAccessRestrictions(); @@ -422,6 +423,9 @@ test_unit(void) source.params.version = random() % 4 + 1; UTI_ZeroTimespec(¤t_time); +#if HAVE_LONG_TIME_T + advance_time(NTP_ERA_SPLIT); +#endif advance_time(TST_GetRandomDouble(1.0, 1e9)); TST_GetRandomAddress(&remote_addr.ip_addr, IPADDR_UNSPEC, -1); @@ -595,6 +599,7 @@ test_unit(void) TEST_CHECK(info.auth.mac.length == 72); TEST_CHECK(info.auth.mac.key_id == 300); + CLG_Finalise(); KEY_Finalise(); REF_Finalise(); NCR_Finalise();