Miroslav Lichvar
2de24cfd82
ntp: convert to new socket API
...
Rework the NTP I/O code to use the new socket support. There are
differences in debug messages and handling of some errors.
2019-07-18 17:29:35 +02:00
Miroslav Lichvar
62d6aed6a6
test: update processing of packet log
...
Two new fields have been added to the packet log, which broke some
of the simulation tests.
2019-06-18 15:42:11 +02:00
Miroslav Lichvar
5c9e1e0b69
test: extend 133-hwtimestamp test
2019-05-10 11:01:27 +02:00
Miroslav Lichvar
e8bc41e862
test: fix tests to skip when missing required feature
2018-09-27 11:42:38 +02:00
Miroslav Lichvar
3e876d4218
test: add function for checking config.h in tests
2018-09-27 11:42:38 +02:00
Miroslav Lichvar
add932501f
test: add 136-broadcast test
2018-09-17 18:36:22 +02:00
Miroslav Lichvar
89390a738f
test: add 012-daemonts test
2018-09-17 18:36:22 +02:00
Miroslav Lichvar
fb78e60d26
test: add 135-ratelimit test
2018-09-12 19:27:48 +02:00
Miroslav Lichvar
b822c7164f
test: add 134-log test
2018-09-12 19:04:11 +02:00
Miroslav Lichvar
aa295730a0
test: extend 110-chronyc test
2018-09-12 18:17:35 +02:00
Miroslav Lichvar
49d52b547f
test: make 129-reload more reliable
2018-08-31 12:48:36 +02:00
Miroslav Lichvar
cf7b5363cd
test: extend 110-chronyc test
2018-08-31 09:55:43 +02:00
Miroslav Lichvar
7f3183cc72
test: extend 106-refclock test
2018-08-31 09:55:43 +02:00
Miroslav Lichvar
018977044a
test: add 133-hwtimestamp test
2018-08-30 08:08:19 +02:00
Miroslav Lichvar
cc49d8e6e6
test: add 132-logchange test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
933bd017b4
test: add 131-maxchange test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
d558b33d85
test: extend 108-peer test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
9268bf2cff
test: don't override user settings with default values
...
This fixes commit 671daf06b8
.
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
6e10e6740c
test: add 130-quit test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
bfaa10f2b0
test: add 129-reload test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
9f167a7997
test: add 128-nocontrol test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
6908163464
test: separate client/server chronyd options
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
671daf06b8
test: avoid using eval in shell scripts
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
8d5b86efe7
test: make 121-orphan more reliable
2018-08-21 15:52:35 +02:00
Miroslav Lichvar
c5bdc52a59
test: don't require exit message to be on last line
...
This is useful with enabled debug output.
2018-08-17 17:39:50 +02:00
Miroslav Lichvar
05492d1d23
test: improve 101-poll test
2018-08-10 16:46:38 +02:00
Miroslav Lichvar
159bd73f76
test: add 127-filter test
2018-08-09 14:52:08 +02:00
Miroslav Lichvar
a94f5fe007
test: extend 126-burst
2018-03-28 16:57:48 +02:00
Miroslav Lichvar
8e4c776900
test: add 126-burst test
2018-02-28 10:09:47 +01:00
Miroslav Lichvar
a4bd7f1800
test: make 119-smoothtime more reliable
2018-02-26 17:24:08 +01:00
Miroslav Lichvar
bfc2fa645c
test: add 125-packetloss test
2018-02-16 11:09:54 +01:00
Miroslav Lichvar
11111804fd
test: extend 106-refclock
2018-02-16 11:09:54 +01:00
Miroslav Lichvar
87ec67247e
test: extend 110-chronyc
2018-02-16 11:09:54 +01:00
Miroslav Lichvar
77a1f27a1d
test: add 124-tai test
2017-10-11 17:49:30 +02:00
Miroslav Lichvar
b45d864f73
test: check for maxchange message in check_chronyd_exit()
2017-10-11 17:49:21 +02:00
Miroslav Lichvar
b711873f45
test: add 123-mindelay test
2017-08-28 14:27:14 +02:00
Miroslav Lichvar
c68ca40ce4
ntp: improve maxdelayratio test
...
Similarly to the maxdelaydevratio test, include in the maximum delay
dispersion which accumulated in the interval since the last sample.
Also, enable the test for symmetric associations.
2017-08-28 14:27:14 +02:00
Miroslav Lichvar
64c2fd9888
ntp: limit number of interleaved responses in symmetric mode
...
In symmetric mode, don't send a packet in interleaved mode unless it is
the first response to the last valid request received from the peer and
there was just one response to the previous valid request. This prevents
the peer from matching the transmit timestamp with an older response if
it can't detect missed responses.
2017-08-09 09:57:13 +02:00
Miroslav Lichvar
6de7b98e76
test: improve run script
...
Add options to allow running the tests in multiple iterations while
allowing a small number of failures per test. Some tests are expected to
fail occasionally as they are basically statistical tests. Improving
their reliability is possible, but it's always a compromise between
sensitivity, reliability, and execution time.
2017-03-31 14:53:27 +02:00
Miroslav Lichvar
c390351c65
test: make 118-maxdelay more reliable
2017-03-31 14:53:27 +02:00
Miroslav Lichvar
10078566da
test: make 117-fallbackdrift more reliable
2017-03-10 16:51:03 +01:00
Miroslav Lichvar
e225ac68bc
test: update 110-chronyc
2017-01-27 11:54:12 +01:00
Miroslav Lichvar
8a837f9c2b
test: extend 119-smoothtime
2017-01-23 16:17:39 +01:00
Miroslav Lichvar
e31e7af48f
test: make 119-smoothtime more reliable
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
e72cc9e3da
test: update 119-smoothtime
2016-12-08 16:25:46 +01:00
Miroslav Lichvar
1d5d768545
test: extend 105-ntpauth
2016-12-02 14:53:03 +01:00
Miroslav Lichvar
5fb1107cc7
client: print reference ID in hexadecimal
...
This is an incompatible change in the output of the tracking command,
which may break some scripts, but it's necessary to avoid confusion with
IPv4 addresses when synchronised to an IPv6 server or reference clock.
2016-11-25 17:33:43 +01:00
Miroslav Lichvar
d23c647e34
ntp: shorten presend delay to 2 seconds
2016-11-25 17:33:42 +01:00
Miroslav Lichvar
01e5ea7d31
test: add 122-xleave
2016-11-10 15:26:56 +01:00
Miroslav Lichvar
1a038bfd50
test: add 011-asymjitter
2016-09-06 15:48:59 +02:00
Miroslav Lichvar
dd02d67224
test: add support for testing with asymmetric jitter
2016-09-06 15:48:59 +02:00
Miroslav Lichvar
648bf8bd3e
test: extend 113-leapsecond
2016-09-06 15:48:59 +02:00
Miroslav Lichvar
c619d555f0
test: add 010-multrecv
2016-08-11 10:45:48 +02:00
Miroslav Lichvar
722f038f1f
test: extend 105-ntpauth
2016-05-17 13:03:53 +02:00
Miroslav Lichvar
10719d6d35
reference: report same values in tracking command as in NTP
...
Use REF_GetReferenceParams() in the tracking command to simplify the
code and report the same values as what NTP clients of the server see.
When the local reference mode is active, this changes the leap status to
synchronised and reference time to one second behind current time. When
not synchronised, the root delay and root dispersion are now 1 second.
2016-04-08 16:21:19 +02:00
Miroslav Lichvar
da96d334ab
test: add 121-orphan
2016-03-31 16:12:14 +02:00
Miroslav Lichvar
3f51805e62
client: rework printing of reports
...
Add a new printf-like function to allow printing of all fields at once
and rework all commands which print a report to use it. Add functions
for printing of headers and information fields, and formatting of IP
addresses and reference IDs.
2016-03-17 15:50:39 +01:00
Miroslav Lichvar
9749a1c6fc
test: make 105-ntpauth more reliable
2016-03-14 17:42:49 +01:00
Miroslav Lichvar
a63e18edb8
test: specify files with path in source commands
...
This should prevent sourcing of an unrelated file found in $PATH.
2016-02-05 15:20:40 +01:00
Miroslav Lichvar
8b676502de
test: don't download files in tests
...
Remove automatic download and compilation of clknetsim. If clknetsim is
not found, skip all simulation tests, but don't fail "make check".
Also, respect the CLKNETSIM_PATH environment variable.
2016-02-05 15:20:40 +01:00
Miroslav Lichvar
b80df5152a
Merge branch '2.2-security'
2016-01-20 12:18:42 +01:00
Miroslav Lichvar
86c21a3a85
test: extend 105-ntpauth to test symmetric mode
2016-01-18 17:37:21 +01:00
Miroslav Lichvar
05236a4f23
test: allow setting options for each peer side separately
2016-01-18 17:37:21 +01:00
Miroslav Lichvar
83cd8ae39b
test: don't check packet intervals in 009-sourceselection
...
Since commit 8b235297
, which changed address hashing, the first packet
is not sent to the first server and doesn't have the extra delay. If the
last packet is sent to the first server, the mean outgoing interval will
be significantly longer than the incoming interval and the check will
fail.
2016-01-08 14:30:23 +01:00
Miroslav Lichvar
23b9d80897
test: add 120-selectoptions
2016-01-08 14:30:23 +01:00
Miroslav Lichvar
5039f959e0
sources: add option to limit selection by root distance
...
Add maxdistance directive to set the maximum root distance the sources
are allowed to have to be selected. This is useful to reject NTPv4
sources that are no longer synchronized and report large dispersion.
The default value is 3 seconds.
2015-08-25 17:35:34 +02:00
Miroslav Lichvar
802cdb3230
test: require latest clknetsim
2015-06-19 14:20:58 +02:00
Miroslav Lichvar
08b152d6a2
test: add 202-prefer
2015-06-08 12:33:46 +02:00
Miroslav Lichvar
83c6213c67
test: add option to override generated server directives on client
2015-06-08 12:33:34 +02:00
Miroslav Lichvar
0abdc2a350
smooth: add option to smooth out only leap seconds
...
The leaponly option can be used to enable a mode where only leap seconds
are smoothed out and normal offset/frequency changes are ignored. This
is useful to make the interval in which a leap second is smoothed out
constant and allow an NTP client to use multiple leap smearing servers
safely.
2015-06-02 15:24:01 +02:00
Miroslav Lichvar
857d51ea8e
test: extend 113-leapsecond for leap smear
2015-04-07 10:51:07 +02:00
Miroslav Lichvar
293806d52d
test: add 119-smoothtime
2015-04-07 10:42:32 +02:00
Miroslav Lichvar
78283dd822
test: fix source selection check
...
The chronyd log message changed from "no reachable sources" to "no
selectable sources" in 8f062454
.
2015-04-02 16:43:25 +02:00
Miroslav Lichvar
9ff0dbb7a4
test: make 009-sourceselection more reliable
2015-03-27 10:37:55 +01:00
Miroslav Lichvar
6ba97f9161
test: add 118-maxdelay
2015-03-27 10:37:55 +01:00
Miroslav Lichvar
4eca60e7dc
test: add 117-fallbackdrift
2015-03-27 10:37:55 +01:00
Miroslav Lichvar
80af04040a
ntp: change default maxdelay to 3 seconds
2015-03-27 10:37:54 +01:00
Miroslav Lichvar
ddbbe30b9e
test: extend 113-leapsecond to test new leap modes
2015-03-27 10:37:54 +01:00
Miroslav Lichvar
2f6152a580
test: require latest clknetsim
2015-01-28 09:09:08 +01:00
Miroslav Lichvar
46a0aab6b9
test: require latest clknetsim
2015-01-26 10:40:15 +01:00
Miroslav Lichvar
1d977e021d
test: fix 111-knownclient
...
The new NTPv4 loop synchronization check fails as clknetsim doesn't
support IP_PKTINFO yet. Use the noselect option to prevent the server to
synchronize to the client.
2014-11-21 11:44:15 +01:00
Miroslav Lichvar
1afcb4f29a
test: add 116-minsources
2014-10-20 18:05:20 +02:00
Miroslav Lichvar
bd3cfeae92
test: add 009-sourceselection
2014-10-20 12:26:49 +02:00
Miroslav Lichvar
9ef723eb97
test: add option to create falsetickers
2014-10-20 12:26:29 +02:00
Miroslav Lichvar
bb16c81e7b
test: make 114-presend more tolerant
2014-09-23 15:46:27 +02:00
Miroslav Lichvar
d0fb17d70c
test: add 115-cmdmontime
2014-08-18 16:06:28 +02:00
Miroslav Lichvar
6d8ffeefd6
test: add 114-presend
2014-08-15 16:51:15 +02:00
Miroslav Lichvar
192f74f0a1
test: fix check in run script
2014-08-15 11:18:44 +02:00
Miroslav Lichvar
be203d9af0
test: add 008-ntpera
2014-08-15 11:18:44 +02:00
Miroslav Lichvar
f8af299321
test: allow tests to be skipped
2014-08-15 11:18:44 +02:00
Miroslav Lichvar
7799e14770
test: increase default time rms limit
...
This is improves testing reliability with new default corrtimeratio.
2014-08-06 15:46:32 +02:00
Miroslav Lichvar
20aab86e12
test: require latest clknetsim
2014-08-06 15:26:35 +02:00
Miroslav Lichvar
5762d33e38
test: require latest clknetsim revision
2014-06-25 17:35:59 +02:00
Miroslav Lichvar
64ba5a5b65
test: extend 109-makestep
2014-06-05 14:26:07 +02:00
Miroslav Lichvar
a02d7555c2
test: add 113-leapsecond
2014-06-04 16:58:41 +02:00
Miroslav Lichvar
571669ad6c
test: update packet interval check for new clknetsim
2014-06-03 18:10:27 +02:00
Miroslav Lichvar
855eb09d58
test: check also minimum outgoing packet interval
2014-06-03 18:10:27 +02:00
Miroslav Lichvar
34f12c0864
test: fix packet interval check
2014-06-03 14:59:21 +02:00
Miroslav Lichvar
28876d6afa
test: always write packet log
2014-06-03 11:34:53 +02:00
Miroslav Lichvar
cea68ebc6f
test: extend 005-externalstep
2014-06-02 18:26:01 +02:00