]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Split the first masterfile test into 3
authorMark Andrews <marka@isc.org>
Tue, 27 Feb 2024 04:42:06 +0000 (15:42 +1100)
committerMark Andrews <marka@isc.org>
Tue, 27 Feb 2024 04:42:06 +0000 (15:42 +1100)
Additionally read the correct zone for BIND 8 ttl checks

.reuse/dep5
bin/tests/system/masterfile/knowngood.dig.out [deleted file]
bin/tests/system/masterfile/knowngood.include [new file with mode: 0644]
bin/tests/system/masterfile/knowngood.ttl1 [new file with mode: 0644]
bin/tests/system/masterfile/knowngood.ttl2 [new file with mode: 0644]
bin/tests/system/masterfile/tests.sh

index 7f78705f45450271f4fd9101b938c4493f596ef5..0de1a85da0630eb99328111a22f4cbfee77275dd 100644 (file)
@@ -54,6 +54,9 @@ Files: **/*.after*
        bin/tests/system/keepalive/expected
        bin/tests/system/legacy/ns6/edns512.db.signed
        bin/tests/system/legacy/ns7/edns512-notcp.db.signed
+       bin/tests/system/masterfile/knowngood.include
+       bin/tests/system/masterfile/knowngood.ttl1
+       bin/tests/system/masterfile/knowngood.ttl2
        bin/tests/system/nsupdate/CA/CA.cfg
        bin/tests/system/nsupdate/CA/README
        bin/tests/system/nsupdate/CA/index.txt
diff --git a/bin/tests/system/masterfile/knowngood.dig.out b/bin/tests/system/masterfile/knowngood.dig.out
deleted file mode 100644 (file)
index d4cbac8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-include.               300     IN      SOA     ns.include. hostmaster.include. 1 3600 1800 1814400 3600
-include.               300     IN      NS      ns.include.
-a.include.             300     IN      A       10.0.0.1
-a.include.             300     IN      A       10.0.0.99
-a.a.include.           300     IN      A       10.0.1.1
-b.foo.a.include.       300     IN      A       10.0.2.2
-b.include.             300     IN      A       10.0.0.2
-a.b.include.           300     IN      A       10.0.1.1
-c.b.include.           300     IN      A       10.0.0.3
-b.foo.b.include.       300     IN      A       10.0.2.2
-ns.include.            300     IN      A       127.0.0.1
-include.               300     IN      SOA     ns.include. hostmaster.include. 1 3600 1800 1814400 3600
-ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
-ttl2.                  1       IN      NS      ns.ttl2.
-a.ttl2.                        1       IN      TXT     "inherited ttl 1"
-b.ttl2.                        2       IN      TXT     "explicit ttl 2"
-c.ttl2.                        2       IN      TXT     "inherited ttl 2"
-d.ttl2.                        3       IN      TXT     "default ttl 3"
-e.ttl2.                        2       IN      TXT     "explicit ttl 2"
-f.ttl2.                        3       IN      TXT     "default ttl 3"
-ns.ttl2.               1       IN      A       10.53.0.1
-ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
-ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
-ttl2.                  1       IN      NS      ns.ttl2.
-a.ttl2.                        1       IN      TXT     "inherited ttl 1"
-b.ttl2.                        2       IN      TXT     "explicit ttl 2"
-c.ttl2.                        2       IN      TXT     "inherited ttl 2"
-d.ttl2.                        3       IN      TXT     "default ttl 3"
-e.ttl2.                        2       IN      TXT     "explicit ttl 2"
-f.ttl2.                        3       IN      TXT     "default ttl 3"
-ns.ttl2.               1       IN      A       10.53.0.1
-ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
diff --git a/bin/tests/system/masterfile/knowngood.include b/bin/tests/system/masterfile/knowngood.include
new file mode 100644 (file)
index 0000000..795cc34
--- /dev/null
@@ -0,0 +1,12 @@
+include.               300     IN      SOA     ns.include. hostmaster.include. 1 3600 1800 1814400 3600
+include.               300     IN      NS      ns.include.
+a.include.             300     IN      A       10.0.0.1
+a.include.             300     IN      A       10.0.0.99
+a.a.include.           300     IN      A       10.0.1.1
+b.foo.a.include.       300     IN      A       10.0.2.2
+b.include.             300     IN      A       10.0.0.2
+a.b.include.           300     IN      A       10.0.1.1
+c.b.include.           300     IN      A       10.0.0.3
+b.foo.b.include.       300     IN      A       10.0.2.2
+ns.include.            300     IN      A       127.0.0.1
+include.               300     IN      SOA     ns.include. hostmaster.include. 1 3600 1800 1814400 3600
diff --git a/bin/tests/system/masterfile/knowngood.ttl1 b/bin/tests/system/masterfile/knowngood.ttl1
new file mode 100644 (file)
index 0000000..86baa95
--- /dev/null
@@ -0,0 +1,10 @@
+ttl1.                  3       IN      SOA     ns.ttl1. hostmaster.ttl1. 1 3600 1800 1814400 3
+ttl1.                  3       IN      NS      ns.ttl1.
+a.ttl1.                        3       IN      TXT     "soa minttl 3"
+b.ttl1.                        2       IN      TXT     "explicit ttl 2"
+c.ttl1.                        3       IN      TXT     "soa minttl 3"
+d.ttl1.                        1       IN      TXT     "default ttl 1"
+e.ttl1.                        4       IN      TXT     "explicit ttl 4"
+f.ttl1.                        1       IN      TXT     "default ttl 1"
+ns.ttl1.               3       IN      A       10.53.0.1
+ttl1.                  3       IN      SOA     ns.ttl1. hostmaster.ttl1. 1 3600 1800 1814400 3
diff --git a/bin/tests/system/masterfile/knowngood.ttl2 b/bin/tests/system/masterfile/knowngood.ttl2
new file mode 100644 (file)
index 0000000..2f2a9f9
--- /dev/null
@@ -0,0 +1,10 @@
+ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
+ttl2.                  1       IN      NS      ns.ttl2.
+a.ttl2.                        1       IN      TXT     "inherited ttl 1"
+b.ttl2.                        2       IN      TXT     "explicit ttl 2"
+c.ttl2.                        2       IN      TXT     "inherited ttl 2"
+d.ttl2.                        3       IN      TXT     "default ttl 3"
+e.ttl2.                        2       IN      TXT     "explicit ttl 2"
+f.ttl2.                        3       IN      TXT     "default ttl 3"
+ns.ttl2.               1       IN      A       10.53.0.1
+ttl2.                  1       IN      SOA     ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
index d15599d36a89559a9921028089855ab3fb86609c..dbe04ae93c6308a37e4627814e124426edf68caf 100644 (file)
@@ -25,13 +25,25 @@ n=$((n + 1))
 echo_i "test master file \$INCLUDE semantics ($n)"
 $DIG $DIGOPTS +nostats +nocmd include. axfr @10.53.0.1 >dig.out.$n || ret=1
 
+diff dig.out.$n knowngood.include || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+ret=0
+n=$((n + 1))
 echo_i "test master file BIND 8 compatibility TTL and \$TTL semantics ($n)"
-$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n || ret=1
+$DIG $DIGOPTS +nostats +nocmd ttl1. axfr @10.53.0.1 >dig.out.$n || ret=1
 
+diff dig.out.$n knowngood.ttl1 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+ret=0
+n=$((n + 1))
 echo_i "test of master file RFC1035 TTL and \$TTL semantics ($n)"
-$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n || ret=1
+$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >dig.out.$n || ret=1
 
-diff dig.out.$n knowngood.dig.out || status=1
+diff dig.out.$n knowngood.ttl2 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))