From: Juergen Perlinger Date: Sun, 7 Jun 2015 09:25:17 +0000 (+0200) Subject: [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey X-Git-Tag: NTP_4_3_37~3^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6cbfc78a9eb7c86b37299425530d02bc944718f;p=thirdparty%2Fntp.git [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey - fix test case that got damaged by changes to TAI table limit logic bk: 55740dfdiFG-t0PXwyaNKY0HXSUfAA --- diff --git a/tests/ntpd/leapsec.cpp b/tests/ntpd/leapsec.cpp index ac5f153e4..ed15ce6b9 100644 --- a/tests/ntpd/leapsec.cpp +++ b/tests/ntpd/leapsec.cpp @@ -558,10 +558,14 @@ TEST_F(leapsecTest, ls2009limdata) { rc = setup_load_table(leap1, TRUE); EXPECT_EQ(1, rc); - // test on-spot with limited table - does not work if build before 2013! + // test on-spot with limited table - this is tricky. + // The table used ends 2012; depending on the build date, the 2009 entry + // might be included or culled. The resulting TAI offset must be either + // 34 or 35 seconds, depending on the build date of the test. rc = leapsec_query(&qr, lsec2009, NULL); EXPECT_EQ(FALSE, rc); - EXPECT_EQ(35, qr.tai_offs); + EXPECT_LE(34, qr.tai_offs); + EXPECT_GE(35, qr.tai_offs); EXPECT_EQ(0, qr.tai_diff); EXPECT_EQ(LSPROX_NOWARN, qr.proximity); }