mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-07 09:25:08 -05:00
reference: make local reference timestamp consistent
In the local reference mode, instead of returning the adjusted current time as the reference time, return the same timestamp updated only once per about 62.5 seconds. This will enable chronyd to detect polling of itself even when the local reference mode is active.
This commit is contained in:
@@ -15,11 +15,10 @@ chronyc_start="1.5"
|
||||
chronyc_conf="tracking"
|
||||
|
||||
for year in `seq 1850 100 2300`; do
|
||||
date="Jan 01 00:00:00 $year"
|
||||
export CLKNETSIM_START_DATE=$(date -d "$date UTC" +'%s')
|
||||
export CLKNETSIM_START_DATE=$(date -d "Jan 01 00:00:05 $year UTC" +'%s')
|
||||
run_test || test_fail
|
||||
check_chronyd_exit || test_fail
|
||||
check_chronyc_output "^.*Ref time \(UTC\).*$date.*$" || test_fail
|
||||
check_chronyc_output "^.*Ref time \(UTC\).*Jan 01 00:00:0. $year.*$" || test_fail
|
||||
done
|
||||
|
||||
test_pass
|
||||
|
||||
Reference in New Issue
Block a user