From: Miroslav Lichvar Date: Mon, 1 Aug 2022 14:20:13 +0000 (+0200) Subject: test: fix ntp_core unit test to disable source selection X-Git-Tag: 4.3-pre1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c2cdd2fb14652b9274a09291452fd22c54d5116;p=thirdparty%2Fchrony.git test: fix ntp_core unit test to disable source selection If the randomly generated timestamps are close to the current time, the source can be selected for synchronization, which causes a crash when logging the source name due to uninitialized ntp_sources. Specify the source with the noselect option to prevent selection. --- diff --git a/test/unit/ntp_core.c b/test/unit/ntp_core.c index 1d92ebf0..875731e7 100644 --- a/test/unit/ntp_core.c +++ b/test/unit/ntp_core.c @@ -385,7 +385,7 @@ add_dummy_auth(NTP_AuthMode auth_mode, uint32_t key_id, NTP_Packet *packet, NTP_ void test_unit(void) { - char source_line[] = "127.0.0.1 maxdelaydevratio 1e6"; + char source_line[] = "127.0.0.1 maxdelaydevratio 1e6 noselect"; char conf[][100] = { "allow", "port 0",