mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
test: add 133-hwtimestamp test
This commit is contained in:
32
test/simulation/133-hwtimestamp
Executable file
32
test/simulation/133-hwtimestamp
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./test.common
|
||||
|
||||
test_start "hwtimestamp directive"
|
||||
|
||||
export CLKNETSIM_TIMESTAMPING=2
|
||||
|
||||
refclock_jitter=1e-8
|
||||
refclock_offset=10.0
|
||||
min_sync_time=4
|
||||
max_sync_time=20
|
||||
limit=200
|
||||
client_conf="hwtimestamp eth0"
|
||||
client_server_options="minpoll 0 maxpoll 0 minsamples 32"
|
||||
client_chronyd_options="-d"
|
||||
|
||||
run_test || test_fail
|
||||
check_chronyd_exit || test_fail
|
||||
check_source_selection || test_fail
|
||||
check_sync || test_fail
|
||||
|
||||
if grep -q 'FEAT_DEBUG 1' ../../config.h; 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.*tss=1" 1 1 || test_fail
|
||||
check_log_messages "Received.*tss=2" 390 400 || 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
|
||||
|
||||
test_pass
|
||||
Reference in New Issue
Block a user