From: Matthijs Mekking Date: Tue, 31 Mar 2026 12:46:19 +0000 (+0200) Subject: Test restart works after rndc modzone X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8e16cf1cb52beae157acee98d92273b8c01b485;p=thirdparty%2Fbind9.git Test restart works after rndc modzone When a zone that is configured in named.conf is modified with 'rndc modzone', the new zone configuration is now also stored in the NZD. Add a test to ensure that after a restart, the old zone configuration is used. --- diff --git a/bin/tests/system/addzone/tests.sh b/bin/tests/system/addzone/tests.sh index 9634bd5777f..a26368828df 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -474,6 +474,18 @@ n=$((n + 1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) +echo_i "check that named restarts with previously deleted normal.example zone ($n)" +ret=0 +stop_server ns2 +start_server --noclean --restart --port ${PORT} ns2 || ret=1 +ret=0 +$RNDCCMD 10.53.0.2 showzone normal.example >rndc.out.ns2.$n +expected='zone "normal.example" { type primary; file "normal.db"; };' +[ "$(cat rndc.out.ns2.$n)" = "$expected" ] || ret=1 +n=$((n + 1)) +if [ $ret != 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + echo_i "reconfiguring server with multiple views" cp ns2/named2.conf ns2/named.conf rndc_reconfig ns2 10.53.0.2