]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix kasp system test bugs
authorMatthijs Mekking <matthijs@isc.org>
Mon, 11 Jul 2022 08:18:56 +0000 (10:18 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 12 Jul 2022 10:48:08 +0000 (12:48 +0200)
Fix a comment, ensuring the right parameters are used (zone is
parameter $3, not $2) and add view and policy parameters to the comment.

Fix the view tests and test the correct view (example3 instead of
example2).

Fix placement of "n=$((n+1)" for two test cases.

(cherry picked from commit ff65f077790228ff7c5d9de9d46fbd7f7efafbc6)

bin/tests/system/kasp.sh
bin/tests/system/kasp/tests.sh

index 785b69c770d03116517f83c7282d039e87675778..f4058f6400556945e798e758a5d698be34644328 100644 (file)
@@ -823,9 +823,9 @@ check_keys() {
        status=$((status+ret))
 }
 
-# Call rndc dnssec -status on server $1 for zone $2 and check output.
-# This is a loose verification, it just tests if the right policy
-# name is returned, and if all expected keys are listed.  The rndc
+# Call rndc dnssec -status on server $1 for zone $3 in view $4 with policy $2
+# and check output. This is a loose verification, it just tests if the right
+# policy name is returned, and if all expected keys are listed.  The rndc
 # dnssec -status output also lists whether a key is published,
 # used for signing, is retired, or is removed, and if not when
 # it is scheduled to do so, and it shows the states for the various
index 0db45f7544230dbcb8ec75c9cb1eb69cd501dc75..891b34576907962b5dc511d57bacbe1fe43f0f46 100644 (file)
@@ -1912,12 +1912,12 @@ status=$((status+ret))
 TSIG="hmac-sha1:keyforview3:$VIEW3"
 wait_for_nsec
 check_keys
-check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "example2"
+check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "example3"
 check_apex
 dnssec_verify
 n=$((n+1))
 # check subdomain
-echo_i "check TXT example.net (in-view example2) rrset is signed correctly ($n)"
+echo_i "check TXT example.net (view example3) rrset is signed correctly ($n)"
 ret=0
 dig_with_opts "view.${ZONE}" "@${SERVER}" TXT > "dig.out.$DIR.test$n.txt" || log_error "dig view.${ZONE} TXT failed"
 grep "status: NOERROR" "dig.out.$DIR.test$n.txt" > /dev/null || log_error "mismatch status in DNS response"
@@ -4672,6 +4672,7 @@ _check_soa_ttl() {
        test ${ttl2:-0} -eq $2 || return 1
 }
 
+n=$((n+1))
 echo_i "Check that 'rndc reload' of just the serial updates the signed instance ($n)"
 TSIG=
 ret=0
@@ -4685,8 +4686,8 @@ wait_for_log 3 "all zones loaded" ns6/named.run
 retry_quiet 10 _check_soa_ttl 300 300 || ret=1
 test "$ret" -eq 0 || echo_i "failed"
 status=$((status+ret))
-n=$((n+1))
 
+n=$((n+1))
 echo_i "Check that restart with zone changes and deleted journal works ($n)"
 TSIG=
 ret=0
@@ -4703,7 +4704,6 @@ wait_for_log 3 "all zones loaded" ns6/named.run
 retry_quiet 10 _check_soa_ttl 300 400 || ret=1
 test "$ret" -eq 0 || echo_i "failed"
 status=$((status+ret))
-n=$((n+1))
 
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1