diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:35:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:35:01 +0000 |
commit | 763b5e2c4bed507e0fa34ca2b7cb4f15a136cb82 (patch) | |
tree | 829cb7231c945c8e1e7d8ad62e94c4cb0f902ec6 /test/simulation/133-hwtimestamp | |
parent | Initial commit. (diff) | |
download | chrony-763b5e2c4bed507e0fa34ca2b7cb4f15a136cb82.tar.xz chrony-763b5e2c4bed507e0fa34ca2b7cb4f15a136cb82.zip |
Adding upstream version 4.0.upstream/4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/simulation/133-hwtimestamp')
-rwxr-xr-x | test/simulation/133-hwtimestamp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/simulation/133-hwtimestamp b/test/simulation/133-hwtimestamp new file mode 100755 index 0000000..e4896fc --- /dev/null +++ b/test/simulation/133-hwtimestamp @@ -0,0 +1,39 @@ +#!/bin/bash + +. ./test.common + +test_start "hwtimestamp directive" + +check_config_h 'HAVE_LINUX_TIMESTAMPING 1' || test_skip + +export CLKNETSIM_TIMESTAMPING=2 + +refclock_jitter=1e-8 +refclock_offset=10.0 +min_sync_time=4 +max_sync_time=20 +limit=200 +server_conf="hwtimestamp eth0" +client_server_options="minpoll 0 maxpoll 0 minsamples 32 xleave" +client_chronyd_options="-d" + +for client_conf in "hwtimestamp eth0" "hwtimestamp eth0 +acquisitionport 123"; do + run_test || test_fail + check_chronyd_exit || test_fail + check_source_selection || test_fail + check_sync || test_fail + + if check_config_h 'FEAT_DEBUG 1'; then + check_log_messages "HW clock samples" 190 200 || test_fail + check_log_messages "HW clock reset" 0 0 || test_fail + check_log_messages "Received message.*tss=KH" 195 200 || test_fail + check_log_messages "Received error.*message.*tss=KH" 195 200 || test_fail + check_log_messages "Updated RX timestamp.*tss=1" 1 1 || test_fail + check_log_messages "Updated RX timestamp.*tss=2" 195 200 || test_fail + check_log_messages "update_tx_timestamp.*Updated" 50 140 || test_fail + check_log_messages "update_tx_timestamp.*Unacceptable" 50 140 || test_fail + fi +done + +test_pass |