]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix check next key event check in kasp test
authorMatthijs Mekking <matthijs@isc.org>
Mon, 10 Aug 2020 15:09:44 +0000 (17:09 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 13 Aug 2020 08:30:31 +0000 (10:30 +0200)
Prevent intermittent false positives on slow platforms by subtracting
the number of seconds which passed between key creation and invoking
'rndc dnssec -checkds'.

This particularly fails for the step3.csk-roll2.autosign zone because
the closest next key event is when the zone signatures become
omnipresent. Running 'rndc dnssec -checkds' some time later means
that the next key event is in fact closer than the calculated time
and thus we need to adjust the expected time by the time already
passed.

bin/tests/system/kasp/tests.sh

index 335b411f1f986064d9786b9f1759d76026669dec..c635c368491b3959d9e742daeaad30f5bcaee439 100644 (file)
@@ -3681,8 +3681,13 @@ dnssec_verify
 # successor signatures.  This is the retire interval: Dsgn plus the
 # maximum zone TTL plus the zone propagation delay plus retire-safety. For the
 # csk-roll2 policy that means: 12h (because 1d validity and refresh within
-# 12 hours) + 1d + 1h + 1h = 38h = 136800 seconds.
-check_next_key_event 136800
+# 12 hours) + 1d + 1h + 1h = 38h = 136800 seconds.  Prevent intermittent false
+# positives on slow platforms by subtracting the number of seconds which
+# passed between key creation and invoking 'rndc dnssec -checkds'.
+now="$(TZ=UTC date +%s)"
+time_passed=$((now-start_time))
+next_time=$((136800-time_passed))
+check_next_key_event $next_time
 
 #
 # Zone: step4.csk-roll2.autosign.