Files
chrony/test/simulation
Miroslav Lichvar 51d161a028 refclock: rework update of reachability again
The recent rework of refclock reachability to better work with
driver-specific filtering (PHC driver dropping samples with unexpected
delay) introduced an issue that a PPS refclock is indicated as reachable
even when its "lock" refclock is permanently unreachable, or its samples
constistently fail in other sample checks, and no actual samples can be
accumulated. This breaks the new maxunreach option.

Rework the refclock code to provide samples from drivers together with
their quality level (all drivers except PHC provide samples with
constant quality of 1) and drop samples with quality 0 after passing
all checks, right before the actual accumulation in the median sample
filter. Increment the reachability counter only for samples that would
be accumulated.

This fixes the problem with refclocks indicated as reachable when their
samples would be dropped for other reasons than the PHC-specific delay
filter, and the maxunreach option can work as expected.

Fixes: b9b338a8df ("refclock: rework update of reachability")
2025-08-14 14:25:38 +02:00
..
2025-04-30 15:00:24 +02:00
2024-06-04 16:25:55 +02:00
2021-04-22 10:20:31 +02:00
2022-05-19 08:23:05 +02:00
2023-06-15 14:23:47 +02:00
2025-05-27 10:56:11 +02:00
2021-04-15 15:17:13 +02:00
2024-06-20 15:10:42 +02:00
2021-09-23 14:48:59 +02:00
2023-04-13 16:22:50 +02:00
2023-04-18 11:39:27 +02:00
2025-06-03 13:28:46 +02:00
2016-02-05 15:20:40 +01:00
2021-03-04 12:36:36 +01:00
2025-06-03 13:28:46 +02:00

This is a collection of simulation tests using the clknetsim simulator
(supported on Linux only).

https://github.com/mlichvar/clknetsim

The CLKNETSIM_PATH environment variable should point to the directory where
clknetsim was downloaded and compiled. If the variable is not set, the tests
will look for clknetsim in ./clknetsim in the current directory.

The tests are written in bash and they can be run directly. The ./run script
runs all tests.