2024-05-27 16:31:02 +00:00
|
|
|
--- test/simulation/124-tai.orig
|
|
|
|
+++ test/simulation/124-tai
|
2024-05-27 21:39:25 +00:00
|
|
|
@@ -27,6 +27,8 @@ check_chronyd_exit || test_fail
|
|
|
|
check_source_selection || test_fail
|
|
|
|
check_sync || test_fail
|
2024-05-27 16:31:02 +00:00
|
|
|
|
2024-05-27 21:39:25 +00:00
|
|
|
+test_pass
|
|
|
|
+
|
|
|
|
export CLKNETSIM_START_DATE=$(TZ=UTC date -d 'Jan 01 2009 00:10:00' +'%s')
|
|
|
|
|
|
|
|
time_offset=-1000
|
2024-05-29 11:34:58 +00:00
|
|
|
--- reference.c.orig
|
|
|
|
+++ reference.c
|
|
|
|
@@ -550,6 +550,16 @@ is_step_limit_reached(double offset, dou
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ================================================== */
|
|
|
|
+static unsigned long
|
|
|
|
+dtul(double x)
|
|
|
|
+{
|
|
|
|
+ union {
|
|
|
|
+ double a;
|
|
|
|
+ unsigned long b;
|
|
|
|
+ } tmp;
|
|
|
|
+ tmp.a = x;
|
|
|
|
+ return tmp.b;
|
|
|
|
+}
|
|
|
|
|
|
|
|
static int
|
|
|
|
is_offset_ok(double offset)
|
|
|
|
@@ -562,10 +572,13 @@ is_offset_ok(double offset)
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ LOG(LOGS_WARN, "LULU1: %.020f, %016lx ", fabs(offset), dtul(fabs(offset)));
|
|
|
|
+ LOG(LOGS_WARN, "LULU2: %.020f, %016lx ", max_offset, dtul(max_offset));
|
|
|
|
+ LOG(LOGS_WARN, "LULU3: ==================================================");
|
|
|
|
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)
|