From: Mark Andrews Date: Tue, 19 Dec 2023 06:50:17 +0000 (+1100) Subject: The NSEC3 -> NSEC private record may be added later X-Git-Tag: v9.18.24~24^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=38babba214cc87e8c6a60f88461f4884545dc019;p=thirdparty%2Fbind9.git The NSEC3 -> NSEC private record may be added later Check each delta for the NSEC3 -> NSEC private record addition as it may be added in the second delta. (cherry picked from commit 80a4dff986201c6ba158ccd5f41d81196a4b6191) --- diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index 516e1212453..fb50de4a988 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -1796,9 +1796,11 @@ status=$((status + ret)) echo_i "check that the startup change from NSEC3 to NSEC is properly signed ($n)" ret=0 $JOURNALPRINT ns3/nsec3-to-nsec.example.db.jnl \ - | awk 'BEGIN { count=0; ok=0 } -$1 == "del" && $5 == "SOA" { count++; if (count == 2) { if (ok) { exit(0); } else { exit(1); } } } -$1 == "add" && $5 == "RRSIG" && $6 == "TYPE65534" { ok=1 } + | awk 'BEGIN { private=0; rrsig=0; ok=0 } +$1 == "del" && $5 == "SOA" { if (private || rrsig) { if (private == rrsig) { exit(0); } else { exit(1); } } } +$1 == "add" && $5 == "TYPE65534" { private=1 } +$1 == "add" && $5 == "RRSIG" && $6 == "TYPE65534" { rrsig=1 } +END { if (private || rrsig) { if (private == rrsig) { exit(0); } else { exit(1); } } else { exit (1); } } ' || ret=1 n=$((n + 1)) if [ "$ret" -ne 0 ]; then echo_i "failed"; fi