---
-* [Bug 2745] ntpd -x steps clock on leap second
- Do leap second stepping only of the step adjustment is beyond the
- proper jump distance limit and step correction is allowed at all.
* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
* CID 1269537: Clean up a line of dead code in getShmTime().
* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
of 'limited'.
* [Bug 2650] fix includefile processing.
+* [Bug 2745] ntpd -x steps clock on leap second
+ Do leap second stepping only of the step adjustment is beyond the
+ proper jump distance limit and step correction is allowed at all.
* [Bug 2776] Improve ntpq's 'help keytype'.
* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
* [Bug 2794] Clean up kernel clock status reports.
EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
}
+// ----------------------------------------------------------------------
+// test repeated query on empty table in dumb mode
+TEST_F(leapsecTest, lsEmptyTableDumb) {
+ int rc;
+ leap_result_t qr;
+
+ const time_t pivot(lsec2012);
+ const uint32_t t0 (lsec2012 - 10);
+ const uint32_t tE (lsec2012 + 10);
+
+ leapsec_electric(0);
+ EXPECT_EQ(0, leapsec_electric(-1));
+
+ leapsec_clear(leapsec_get_table(FALSE));
+ for (uint32_t t = t0; t != tE; ++t) {
+ rc = leapsec_query(&qr, t, &pivot);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ }
+}
+
+// ----------------------------------------------------------------------
+// test repeated query on empty table in electric mode
+TEST_F(leapsecTest, lsEmptyTableElectric) {
+ int rc;
+ leap_result_t qr;
+
+ leapsec_electric(1);
+ EXPECT_EQ(1, leapsec_electric(-1));
+
+ const time_t pivot(lsec2012);
+ const uint32_t t0 (lsec2012 - 10);
+ const uint32_t tE (lsec2012 + 10);
+
+ leapsec_clear(leapsec_get_table(FALSE));
+ for (time_t t = t0; t != tE; ++t) {
+ rc = leapsec_query(&qr, t, &pivot);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ }
+}