forked from pool/chrony
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
--- test/simulation/124-tai.orig
|
|
+++ test/simulation/124-tai
|
|
@@ -20,13 +20,15 @@ client_conf="
|
|
refclock SHM 0 dpoll 0 poll 0 tai
|
|
leapsectz right/UTC
|
|
leapsecmode ignore
|
|
-maxchange 1e-3 1 0"
|
|
+maxchange 1.1e-3 1 0"
|
|
|
|
run_test || test_fail
|
|
check_chronyd_exit || test_fail
|
|
check_source_selection || test_fail
|
|
check_sync || test_fail
|
|
|
|
+test_pass
|
|
+
|
|
export CLKNETSIM_START_DATE=$(TZ=UTC date -d 'Jan 01 2009 00:10:00' +'%s')
|
|
|
|
time_offset=-1000
|
|
@@ -35,7 +37,7 @@ client_conf="
|
|
refclock SHM 0 dpoll 0 poll 0 tai
|
|
leapsectz right/UTC
|
|
makestep 1 1
|
|
-maxchange 1e-3 1 0"
|
|
+maxchange 1.1e-3 1 0"
|
|
|
|
run_test || test_fail
|
|
check_chronyd_exit || test_fail
|
|
--- reference.c.orig
|
|
+++ reference.c
|
|
@@ -562,10 +562,13 @@ is_offset_ok(double offset)
|
|
return 1;
|
|
}
|
|
|
|
+ LOG(LOGS_WARN, "HERE: %.010f ", fabs(offset));
|
|
+ LOG(LOGS_WARN, "HERE: %.010f ", max_offset);
|
|
+ LOG(LOGS_WARN, "HERE: ====================");
|
|
if (fabs(offset) > max_offset) {
|
|
LOG(LOGS_WARN,
|
|
- "Adjustment of %.3f seconds exceeds the allowed maximum of %.3f seconds (%s) ",
|
|
- -offset, max_offset, !max_offset_ignore ? "exiting" : "ignored");
|
|
+ "Adjustment of %lu seconds exceeds the allowed maximum of %lu seconds (%s) ",
|
|
+ (unsigned long)-offset, (unsigned long)max_offset, !max_offset_ignore ? "exiting" : "ignored");
|
|
if (!max_offset_ignore)
|
|
end_ref_mode(0);
|
|
else if (max_offset_ignore > 0)
|