From 7e24befc2ab89923b76aa68dcadc2108d4a2d12d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 18 Dec 2023 11:23:21 +1100 Subject: [PATCH] Regression check for NSEC3 to NSEC conversion When transitioning from NSEC3 to NSEC the NSEC3 must be built before the NSEC3PARAM is removed. Check each delta in the conversion to ensure this ordering is met. (cherry picked from commit 7d90c056b039cc943413d82e4c9c748b45c60893) --- bin/tests/system/autosign/tests.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index fb50de4a98..a6283d5054 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -1806,5 +1806,18 @@ n=$((n + 1)) if [ "$ret" -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) +echo_i "check that NSEC3 to NSEC builds the NSEC chain first ($n)" +ret=0 +$JOURNALPRINT ns3/nsec3-to-nsec.example.db.jnl \ + | awk 'BEGIN { nsec3param=0; nsec=0 } +$1 == "del" && $5 == "SOA" { if (nsec3param || nsec) { if (nsec3param && !nsec) { exit(1); } else { exit(0); } } } +$1 == "del" && $5 == "NSEC3PARAM" { nsec3param=1 } +$1 == "add" && $2 == "nsec3-to-nsec.example." && $5 == "NSEC" { nsec=1 } +END { if (nsec3param || nsec) { if (nsec3param && !nsec) { exit(1); } else { exit(0); } } else { exit(1); } } +' || ret=1 +n=$((n + 1)) +if [ "$ret" -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1