Blame test/simulation/133-hwtimestamp
|
Packit Service |
623930 |
#!/bin/bash
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
. ./test.common
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
test_start "hwtimestamp directive"
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
check_config_h 'HAVE_LINUX_TIMESTAMPING 1' || test_skip
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
export CLKNETSIM_TIMESTAMPING=2
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
refclock_jitter=1e-8
|
|
Packit Service |
623930 |
refclock_offset=10.0
|
|
Packit Service |
623930 |
min_sync_time=4
|
|
Packit Service |
623930 |
max_sync_time=20
|
|
Packit Service |
623930 |
limit=200
|
|
Packit Service |
623930 |
server_conf="hwtimestamp eth0"
|
|
Packit Service |
623930 |
client_server_options="minpoll 0 maxpoll 0 minsamples 32 xleave"
|
|
Packit Service |
623930 |
client_chronyd_options="-d"
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
for client_conf in "hwtimestamp eth0" "hwtimestamp eth0
|
|
Packit Service |
623930 |
acquisitionport 123"; do
|
|
Packit Service |
623930 |
run_test || test_fail
|
|
Packit Service |
623930 |
check_chronyd_exit || test_fail
|
|
Packit Service |
623930 |
check_source_selection || test_fail
|
|
Packit Service |
623930 |
check_sync || test_fail
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
if check_config_h 'FEAT_DEBUG 1'; then
|
|
Packit Service |
623930 |
check_log_messages "HW clock samples" 190 200 || test_fail
|
|
Packit Service |
623930 |
check_log_messages "HW clock reset" 0 0 || test_fail
|
|
Packit Service |
623930 |
check_log_messages "Received.*tss=1" 1 1 || test_fail
|
|
Packit Service |
623930 |
check_log_messages "Received.*tss=2" 390 400 || test_fail
|
|
Packit Service |
623930 |
check_log_messages "update_tx_timestamp.*Updated" 50 140 || test_fail
|
|
Packit Service |
623930 |
check_log_messages "update_tx_timestamp.*Unacceptable" 50 140 || test_fail
|
|
Packit Service |
623930 |
fi
|
|
Packit Service |
623930 |
done
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
test_pass
|