]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Minor kasp test fixes
authorMatthijs Mekking <matthijs@isc.org>
Tue, 9 Feb 2021 13:35:46 +0000 (14:35 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 23 Feb 2021 08:19:23 +0000 (09:19 +0100)
Two minor fixes in the kasp system test:

1. A wrong comment in ns3/setup.sh (we are subtracting 2 hours, not
   adding them).
2. 'get_keyids' used bad parameters "$1" "$2" when 'check_numkeys'
   failed. Also, 'check_numkeys' can use $DIR, $ZONE, and $NUMKEYS
   directly, no need to pass them.

(cherry picked from commit 5be26898c0333dd8a0dbee0613f7fe8f5cfe70a3)

bin/tests/system/kasp/ns3/setup.sh
bin/tests/system/kasp/tests.sh

index 6fbb59f0dd4520b7e6b97e4bc5d6e1f139903d58..13c14839ab9e571f4bbfd63b51c3e251064e42b5 100644 (file)
@@ -748,7 +748,7 @@ setup step5.ksk-doubleksk.autosign
 # Tsbm(N+1) = now - 50h - 2h = now - 52h
 # Tact(N+1) = Tret(N)
 # Tret(N+1) = now + 1390h - 2h = now + 1388h
-# Trem(N+1) = now + 60d + 2h = now + 1442h
+# Trem(N+1) = now + 60d - 2h = now + 1442h
 TactN="now-1492h"
 TretN="now-52h"
 TremN="now-2h"
index e9cd9185d029fda647cfe6458e294d8dda8daf14..5e30d4aec8716090a61f20f8c417377a02a041f4 100644 (file)
@@ -856,7 +856,7 @@ status=$((status+ret))
 next_key_event_threshold=$((next_key_event_threshold+i))
 
 check_numkeys() {
-       _numkeys=$(get_keyids "$1" "$2" | wc -l)
+       _numkeys=$(get_keyids "$DIR" "$ZONE" | wc -l)
        test "$_numkeys" -eq "$NUM_KEYS" || return 1
        return 0
 }
@@ -873,9 +873,9 @@ check_keys() {
        ret=0
 
        echo_i "check number of keys for zone ${ZONE} in dir ${DIR} ($n)"
-       retry_quiet 10 check_numkeys "$DIR" "$ZONE" "$NUM_KEYS" || ret=1
+       retry_quiet 10 check_numkeys || ret=1
        if [ $ret -ne 0 ]; then
-               _numkeys=$(get_keyids "$1" "$2" | wc -l)
+               _numkeys=$(get_keyids "$DIR" "$ZONE" | wc -l)
                log_error "bad number of key files ($_numkeys) for zone $ZONE (expected $NUM_KEYS)"
                status=$((status+ret))
        fi