mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
Add simulation tests
Use clknetsim to run multiple chronyd instances with simulated clocks and network. It allows fast and reproducible testing, without real network. Included are several tests of performance in different clock/network conditions, chronyd options, NTP authentication, chronyc, and past bug fixes.
This commit is contained in:
37
test/simulation/110-chronyc
Executable file
37
test/simulation/110-chronyc
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
. test.common
|
||||
|
||||
test_start "chronyc"
|
||||
|
||||
chronyc_conf="tracking
|
||||
sources
|
||||
sourcestats"
|
||||
|
||||
run_test || test_fail
|
||||
check_chronyd_exit || test_fail
|
||||
|
||||
check_chronyc_output "^Reference ID : 192\.168\.123\.1 \(192\.168\.123\.1\)
|
||||
Stratum : 2
|
||||
Ref time \(UTC\) : Fri Jan 1 00:1.:.. 2010
|
||||
System time : 0\.0000..... seconds (slow|fast) of NTP time
|
||||
Last offset : -?0\.0000..... seconds
|
||||
RMS offset : 0\.000...... seconds
|
||||
Frequency : (99|100)\.... ppm fast
|
||||
Residual freq : -?0.00. ppm
|
||||
Skew : 0\.... ppm
|
||||
Root delay : 0\.000... seconds
|
||||
Root dispersion : 0.000... seconds
|
||||
Update interval : 6.\.. seconds
|
||||
Leap status : Normal
|
||||
210 Number of sources = 1
|
||||
MS Name/IP address Stratum Poll Reach LastRx Last sample
|
||||
===============================================================================
|
||||
\^\* 192\.168\.123\.1 1 [67] 377 [0-9]+ [0-9 +-]+[un]s\[[0-9 +-]+[un]s\] \+/-[ 0-9]+[un]s
|
||||
210 Number of sources = 1
|
||||
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
|
||||
==============================================================================
|
||||
192\.168\.123\.1 [0-9 ]+ [0-9 ]+ [0-9 ]+ [ +-]0\.0.. 0\.... [0-9 +-]+[un]s [0-9 ]+[un]s$" \
|
||||
|| test_fail
|
||||
|
||||
test_pass
|
||||
Reference in New Issue
Block a user