]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add a test that reloading errors are not ignored
authorEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 01:59:47 +0000 (18:59 -0700)
committerEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 15:56:14 +0000 (08:56 -0700)
(cherry picked from commit e48b3f1a00b183063030910530cf8a10b2d52531)

bin/tests/system/inline/ns3/master6.db.in [new file with mode: 0644]
bin/tests/system/inline/tests.sh
util/copyrights

diff --git a/bin/tests/system/inline/ns3/master6.db.in b/bin/tests/system/inline/ns3/master6.db.in
new file mode 100644 (file)
index 0000000..5cdb504
--- /dev/null
@@ -0,0 +1,24 @@
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 300       ; 5 minutes
+@                      IN SOA  ns3 . (
+                               2000042412 ; serial
+                               20         ; refresh (20 seconds)
+                               20         ; retry (20 seconds)
+                               1814400    ; expire (3 weeks)
+                               3600       ; minimum (1 hour)
+                               )
+                       NS      ns3
+ns3                    A       10.53.0.3
+
+c                      A       10.0.0.3
+e                      A       10.0.0.5
+
+$INCLUDE missingfile.db
index f201ee9550fd1dd4930625b25a6a63947038825a..8ac01f25e073c7222a2eb442bf9cc7d4508454c7 100755 (executable)
@@ -934,6 +934,29 @@ grep "hostmaster" dig.out.ns3.test$n > /dev/null && ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
+n=`expr $n + 1`
+echo_i "check that reloading errors prevent synchronization ($n)"
+ret=0
+$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.1 || ret=1
+sleep 1
+nextpart ns3/named.run > /dev/null
+cp ns3/master5.db.in ns3/master.db
+rndc_reload ns3 10.53.0.3
+for i in 1 2 3 4 5 6 7 8 9 10
+do
+       if nextpart ns3/named.run |
+           grep "not loaded due to errors" > /dev/null
+        then
+               break
+       fi
+       sleep 1
+done
+# Sanity check: the SOA record should be unchanged
+$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.2 || ret=1
+$DIFF dig.out.ns3.test$n.1  dig.out.ns3.test$n.2 > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 n=`expr $n + 1`
 echo_i "test add/del zone combinations ($n)"
 ret=0
index d37990d59e0b15a257390edc45665b0f2afbc4ed..ab830bf96c4f18e918fb08dda9cb93fa0b7dfd24 100644 (file)
 ./bin/tests/system/inline/ns3/master3.db.in    ZONE    2012,2016,2018,2019
 ./bin/tests/system/inline/ns3/master4.db.in    ZONE    2012,2016,2018,2019
 ./bin/tests/system/inline/ns3/master5.db.in    ZONE    2018,2019
+./bin/tests/system/inline/ns3/master6.db.in    ZONE    2019
 ./bin/tests/system/inline/ns3/named.conf.in    CONF-C  2018,2019
 ./bin/tests/system/inline/ns3/sign.sh          SH      2011,2012,2013,2014,2016,2017,2018,2019
 ./bin/tests/system/inline/ns4/named.conf.in    CONF-C  2018,2019