From: Miroslav Lichvar Date: Tue, 28 Jun 2022 12:41:28 +0000 (+0200) Subject: test: fix server interleaved mode in ntp_core unit test X-Git-Tag: 4.3-pre1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52ec694d2b96eadf5e01489f819b3f9343f9944f;p=thirdparty%2Fchrony.git test: fix server interleaved mode in ntp_core unit test --- diff --git a/test/unit/ntp_core.c b/test/unit/ntp_core.c index 74145b96..0d9c3a7d 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();