From: Mark Andrews Date: Mon, 28 Aug 2023 01:40:46 +0000 (+1000) Subject: Check that removal of nonexistent PTR and SRV records work X-Git-Tag: v9.19.17~28^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2b7192c5be69486fea8dd45b07edae39658eecde;p=thirdparty%2Fbind9.git Check that removal of nonexistent PTR and SRV records work There was a bug in rr_exists that caused it to fail when the name didn't exist in the zone. --- diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 8c2c7174370..c92e2b0a465 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -462,6 +462,28 @@ fi echo_i "end RT #482 regression test" +n=$((n + 1)) +ret=0 +echo_i "remove nonexistent PTR record ($n)" +$NSUPDATE -k ns1/ddns.key -d << EOF > nsupdate.out.test$n 2>&1 || ret=1 +server 10.53.0.1 ${PORT} +zone example.nil. +update delete nonexistent.example.nil. 0 IN PTR foo. +send +EOF +[ $ret = 0 ] || { echo_i "failed"; status=1; } + +n=$((n + 1)) +ret=0 +echo_i "remove nonexistent SRV record ($n)" +$NSUPDATE -k ns1/ddns.key -d << EOF > nsupdate.out.test$n 2>&1 || ret=1 +server 10.53.0.1 ${PORT} +zone example.nil. +update delete nonexistent.example.nil. 0 IN SRV 0 0 0 foo. +send +EOF +[ $ret = 0 ] || { echo_i "failed"; status=1; } + n=$((n + 1)) ret=0 echo_i "start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"