chrony/test/simulation
Miroslav Lichvar 2d2642bb82 ntp: fix presend in interleaved mode
The presend option in interleaved mode uses two presend requests instead
of one to get an interleaved response from servers like chrony which
delay the first interleaved response due to an optimization saving
timestamps only for clients actually using the interleaved mode.

After commit 0ae6f2485b ("ntp: don't use first response in interleaved
mode") the first interleaved response following the two presend
responses in basic mode is dropped as the preferred set of timestamps
minimizing error in delay was already used by the second sample in
basic mode. There are only three responses in the burst and no sample is
accumulated.

Increasing the number of presend requests to three to get a fourth
sample would be wasteful. Instead, allow reusing timestamps of the
second presend sample in basic mode, which is never accumulated.

Reported-by: Aaron Thompson
Fixes: 0ae6f2485b ("ntp: don't use first response in interleaved mode")
2023-11-21 12:38:41 +01:00
..
001-defaults test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
002-largenetwork test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
003-largefreqoffset test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
004-largetimeoffset test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
005-externalstep test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
006-largejitter test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
007-largewander test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
008-ntpera test: ensure awk commands in 008-ntpera return an integer 2022-01-13 09:40:12 +01:00
009-sourceselection test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
010-multrecv test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
011-asymjitter test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
012-daemonts test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
013-nameserv test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
101-poll test: extend 101-poll and 127-filter tests 2022-07-21 15:33:35 +02:00
102-iburst test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
103-initstepslew test: extend 103-initstepslew test 2021-04-07 16:55:38 +02:00
104-driftfile test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
105-ntpauth test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
106-refclock test: update description of 106-refclock 2023-03-02 15:34:03 +01:00
107-allowdeny test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
108-peer test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
109-makestep test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
110-chronyc ntp: add client support for network correction 2023-09-26 15:14:13 +02:00
111-knownclient test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
112-port test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
113-leapsecond test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
114-presend ntp: fix presend in interleaved mode 2023-11-21 12:38:41 +01:00
115-cmdmontime test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
116-minsources test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
117-fallbackdrift test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
118-maxdelay ntp: add maxdelayquant option 2022-07-21 16:05:48 +02:00
119-smoothtime test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
120-selectoptions test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
121-orphan test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
122-xleave ntp: don't use first response in interleaved mode 2022-06-30 10:18:48 +02:00
123-mindelay test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
124-tai test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
125-packetloss test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
126-burst test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
127-filter test: extend 101-poll and 127-filter tests 2022-07-21 15:33:35 +02:00
128-nocontrol test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
129-reload test: extend 129-reload test 2021-04-22 10:20:31 +02:00
130-quit test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
131-maxchange test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
132-logchange test: make 132-logchange more reliable 2023-07-18 15:16:03 +02:00
133-hwtimestamp ntp: add maximum PHC poll interval 2023-03-22 09:13:53 +01:00
134-log sources: add selection log 2022-05-19 08:23:05 +02:00
135-ratelimit test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
136-broadcast test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
137-pool sources: delay source replacement 2023-06-15 14:23:47 +02:00
138-syncloop test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
139-nts test: make 139-nts more reliable 2023-08-08 17:11:46 +02:00
140-noclientlog test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
141-copy ntp: add copy option 2021-04-15 15:17:13 +02:00
142-ntpoverptp ntp: add client support for network correction 2023-09-26 15:14:13 +02:00
143-manual test: add 143-manual test 2021-09-23 14:48:59 +02:00
144-monoroot ntp: rename exp1 extension field 2023-09-26 15:01:24 +02:00
145-rtc test: add 145-rtc test 2023-04-13 16:22:50 +02:00
146-offline test: add 146-offline test 2023-04-18 11:39:27 +02:00
147-refresh ntp: refresh IP addresses periodically 2023-06-21 11:28:42 +02:00
148-replacement test: make 148-replacement more reliable 2023-07-18 15:15:45 +02:00
201-freqaccumulation test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
202-prefer test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
README test: don't download files in tests 2016-02-05 15:20:40 +01:00
run test: use env shebang in all bash scripts 2021-03-04 12:36:36 +01:00
test.common ntp: add client support for network correction 2023-09-26 15:14:13 +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.