]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
move RRL broken-config check to checkconf
authorEvan Hunt <each@isc.org>
Tue, 6 Feb 2024 21:33:21 +0000 (13:33 -0800)
committerEvan Hunt <each@isc.org>
Fri, 1 Mar 2024 22:29:30 +0000 (14:29 -0800)
the RRL test included a test case that tried to start named with
a broken configuration.  the same error could be found with
named-checkconf, so it should have been tested in the checkconf
system test.

bin/tests/system/checkconf/bad-rrl-table-size.conf [moved from bin/tests/system/rrl/broken.conf.in with 59% similarity]
bin/tests/system/rrl/clean.sh
bin/tests/system/rrl/setup.sh
bin/tests/system/rrl/tests.sh

similarity index 59%
rename from bin/tests/system/rrl/broken.conf.in
rename to bin/tests/system/checkconf/bad-rrl-table-size.conf
index 21af240d74e953eafeeaecddd0046180aa14df76..3325406fa88d092a625b20c5703a04c34abdc536 100644 (file)
  * information regarding copyright ownership.
  */
 
-controls { /* empty */ };
-
 options {
-       query-source address 10.53.0.5;
-       notify-source 10.53.0.5;
-       transfer-source 10.53.0.5;
-       port @PORT@;
-       pid-file "named.pid";
-       statistics-file "named.stats";
-       listen-on { 10.53.0.5; };
-       listen-on-v6 { none; };
-       notify no;
-       dnssec-validation no;
-
        rate-limit {
            responses-per-second 2;
            all-per-second 50;
@@ -36,12 +23,3 @@ options {
            max-table-size 0;
        };
 };
-
-key rndc_key {
-       secret "1234abcd8765";
-       algorithm @DEFAULT_HMAC@;
-};
-
-controls {
-       inet 10.53.0.5 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
-};
index 11b876030786309acaea15912d59d58f93f2013f..2d41acadd3bd698b9504eef3fe862755d359b01d 100644 (file)
@@ -14,8 +14,6 @@
 # Clean up after rrl tests.
 
 rm -f */named.memstats */named.run */named.stats */log-* */session.key
-rm -f broken.conf
-rm -f broken.out
 rm -f dig.out* *mdig.out*
 rm -f ns*/managed-keys.bind*
 rm -f ns*/named.conf
index 752b02ceedef1dd4a64a56a3a05638bc420f6ca2..49a642683d482bd6f618d13b43de3715398347e6 100644 (file)
@@ -15,7 +15,6 @@
 
 $SHELL clean.sh
 
-copy_setports broken.conf.in broken.conf
 copy_setports ns1/named.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf
index eb7ad34da5fd71d5f01080ce8b2e7a6378ac8eca..72c12c93a032037ca00d4cb5039770a73bdc0a26 100644 (file)
@@ -274,15 +274,5 @@ fi
 DIGOPTS="+bufsize=4096 +ignore -p ${PORT}"
 $DIG $DIGOPTS @$ns4 TXT big.tld4 >/dev/null 2>&1
 
-# check named doesn't start with a broken config
-$NAMED -D rrl-ns5 -gc broken.conf >broken.out 2>&1 &
-sleep 2
-grep "min-table-size 1" broken.out >/dev/null || setret "min-table-size 0 was not changed to 1"
-
-if [ -f named.pid ]; then
-  kill $(cat named.pid)
-  setret "named should not have started, but did"
-fi
-
 echo_i "exit status: $ret"
 [ $ret -eq 0 ] || exit 1