mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 13:35:07 -05:00
sources: update stratum with leap status
Remove stratum from the NTP sample and update it together with the leap status. This enables a faster update when samples are dropped by the NTP filters.
This commit is contained in:
@@ -59,7 +59,6 @@ test_unit(void)
|
||||
sample_in.root_dispersion = TST_GetRandomDouble(1.0e-3, 2.0e-3);
|
||||
sample_in.peer_delay = TST_GetRandomDouble(1.0e-2, 2.0e-2);
|
||||
sample_in.root_delay = TST_GetRandomDouble(1.0e-1, 2.0e-1);
|
||||
sample_in.stratum = random() % 16;
|
||||
|
||||
TEST_CHECK(SPF_AccumulateSample(filter, &sample_in));
|
||||
TEST_CHECK(!SPF_AccumulateSample(filter, &sample_in));
|
||||
@@ -97,7 +96,6 @@ test_unit(void)
|
||||
sample_out.peer_delay <= 2.0e-2);
|
||||
TEST_CHECK(sample_out.root_delay >= 1.0e-1 &&
|
||||
sample_out.root_delay <= 2.0e-1);
|
||||
TEST_CHECK(sample_out.stratum >= 0 && sample_out.stratum <= 15);
|
||||
|
||||
if (max_samples == 1)
|
||||
TEST_CHECK(!memcmp(&sample_in, &sample_out, sizeof (sample_in)));
|
||||
|
||||
Reference in New Issue
Block a user