From: Matthijs Mekking Date: Mon, 10 Aug 2020 15:09:44 +0000 (+0200) Subject: Fix check next key event check in kasp test X-Git-Tag: v9.17.5~51^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262b52a15473c398339a25b63e0a250dd10bb2f6;p=thirdparty%2Fbind9.git Fix check next key event check in kasp test 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. --- diff --git a/bin/tests/system/kasp/tests.sh b/bin/tests/system/kasp/tests.sh index 335b411f1f9..c635c368491 100644 --- a/bin/tests/system/kasp/tests.sh +++ b/bin/tests/system/kasp/tests.sh @@ -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.