]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix inline test with missing $INCLUDE
authorMatthijs Mekking <matthijs@isc.org>
Fri, 19 Mar 2021 14:23:01 +0000 (15:23 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 14 Apr 2021 09:48:54 +0000 (11:48 +0200)
The test case for a zone with a missing include file was wrong for two
reasons:
1. It was loading the wrong file (master5 instead of master6)
2. It did actually not set the $ret variable to 1 if the test failed
   (it should default to ret=1 and clear the variable if the
   appropriate log is found).

(cherry picked from commit 96583e7c40bf25605385c8a71500fcfeaaa1833e)

bin/tests/system/inline/setup.sh
bin/tests/system/inline/tests.sh

index 2fe27f5581c2ea14ec4e638ed1a1506d4ba6d154..27b8a5b55e9d41c39e8512a47ebad1823a3eeb14 100644 (file)
@@ -31,6 +31,7 @@ cp ns3/master.db.in ns3/nsec3.db
 cp ns3/master.db.in ns3/externalkey.db
 cp ns3/master.db.in ns3/delayedkeys.db
 cp ns3/master.db.in ns3/removedkeys-primary.db
+cp ns3/include.db.in ns3/include.db
 
 mkdir ns3/removedkeys
 
index d60f530894c91d63b0decebb441fccbf234b8854..9c75cd7dc4cc1b3ead8d59c2657858ba9b7b810b 100755 (executable)
@@ -941,17 +941,17 @@ status=`expr $status + $ret`
 
 n=`expr $n + 1`
 echo_i "check that reloading errors prevent synchronization ($n)"
-ret=0
+ret=1
 $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
+cp ns3/master6.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
+       if nextpart ns3/named.run | grep "not loaded due to errors" > /dev/null
         then
+               ret=0
                break
        fi
        sleep 1