mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 06:15:06 -05:00
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.
This commit is contained in:
@@ -385,7 +385,7 @@ add_dummy_auth(NTP_AuthMode auth_mode, uint32_t key_id, NTP_Packet *packet, NTP_
|
|||||||
void
|
void
|
||||||
test_unit(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] = {
|
char conf[][100] = {
|
||||||
"allow",
|
"allow",
|
||||||
"port 0",
|
"port 0",
|
||||||
|
|||||||
Reference in New Issue
Block a user