From: Aram Sargsyan Date: Mon, 4 May 2026 11:40:57 +0000 (+0000) Subject: Add a catz test with a duplicate primaries entry (alternative syntax) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f5f4b77c76eb205a3e270f7c9956289841e8735;p=thirdparty%2Fbind9.git Add a catz test with a duplicate primaries entry (alternative syntax) This new check ads a catalog member zone with both variants of the labeled primaries/masters property. This should not cause any issues. --- diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index 46956a8ed94..d82f7d02de3 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -2973,6 +2973,52 @@ wait_for_soa @10.53.0.2 dom21.example. dig.out.test$n || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) +########################################################################## + +nextpart ns2/named.run >/dev/null + +echo_i "Testing primaries and masters suboptions together" + +n=$((n + 1)) +echo_i "adding domain dom22.example. to primary via RNDC ($n)" +ret=0 +echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" >ns1/dom22.example.db +echo "@ IN NS invalid." >>ns1/dom22.example.db +echo "@ IN A 192.0.2.1" >>ns1/dom22.example.db +rndccmd 10.53.0.1 addzone dom22.example. in default '{type primary; file "dom22.example.db"; allow-transfer { key tsig_key; };};' || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "adding dom22.example. with both primaries and masters suboptions ($n)" +ret=0 +$NSUPDATE -d <>nsupdate.out.test$n 2>&1 || ret=1 + server 10.53.0.1 ${PORT} + update add double.zones.catalog1.example. 3600 IN PTR dom22.example. + update add samelabel.primaries.ext.double.zones.catalog1.example. 3600 IN A 10.53.0.1 + update add samelabel.primaries.ext.double.zones.catalog1.example. 3600 IN TXT "tsig_key" + update add samelabel.masters.ext.double.zones.catalog1.example. 3600 IN A 10.53.0.1 + update add samelabel.masters.ext.double.zones.catalog1.example. 3600 IN TXT "tsig_key" + send +END +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "waiting for secondary to sync up ($n)" +ret=0 +wait_for_message ns2/named.run "catz: adding zone 'dom22.example' from catalog 'catalog1.example'" \ + && wait_for_message ns2/named.run "transfer of 'dom22.example/IN/default' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking that dom22.example. is served by secondary ($n)" +ret=0 +wait_for_soa @10.53.0.2 dom22.example. dig.out.test$n || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + ########################################################################## # GL #5849