summaryrefslogtreecommitdiffstats
path: root/bin/tests/system/additional
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:29 +0000
commite2fc8e037ea6bb5de92b25ec9c12a624737ac5ca (patch)
tree65e6bbf5e12c3fe09b43e577f8d1786d06bcd559 /bin/tests/system/additional
parentReleasing progress-linux version 1:9.18.19-1~deb12u1progress7u1. (diff)
downloadbind9-e2fc8e037ea6bb5de92b25ec9c12a624737ac5ca.tar.xz
bind9-e2fc8e037ea6bb5de92b25ec9c12a624737ac5ca.zip
Merging upstream version 1:9.18.24.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/tests/system/additional')
-rw-r--r--bin/tests/system/additional/ns1/named1.conf.in2
-rw-r--r--bin/tests/system/additional/ns1/named2.conf.in2
-rw-r--r--bin/tests/system/additional/ns1/named3.conf.in2
-rw-r--r--bin/tests/system/additional/ns1/named4.conf.in2
-rw-r--r--bin/tests/system/additional/tests.sh518
5 files changed, 276 insertions, 250 deletions
diff --git a/bin/tests/system/additional/ns1/named1.conf.in b/bin/tests/system/additional/ns1/named1.conf.in
index d058d1e..0d07e54 100644
--- a/bin/tests/system/additional/ns1/named1.conf.in
+++ b/bin/tests/system/additional/ns1/named1.conf.in
@@ -25,7 +25,7 @@ options {
minimal-responses yes;
};
-include "../../common/rndc.key";
+include "../../_common/rndc.key";
controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
diff --git a/bin/tests/system/additional/ns1/named2.conf.in b/bin/tests/system/additional/ns1/named2.conf.in
index 56c6d4b..efed639 100644
--- a/bin/tests/system/additional/ns1/named2.conf.in
+++ b/bin/tests/system/additional/ns1/named2.conf.in
@@ -25,7 +25,7 @@ options {
minimal-responses no;
};
-include "../../common/rndc.key";
+include "../../_common/rndc.key";
controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
diff --git a/bin/tests/system/additional/ns1/named3.conf.in b/bin/tests/system/additional/ns1/named3.conf.in
index ad453a3..0ff7125 100644
--- a/bin/tests/system/additional/ns1/named3.conf.in
+++ b/bin/tests/system/additional/ns1/named3.conf.in
@@ -26,7 +26,7 @@ options {
minimal-responses no-auth;
};
-include "../../common/rndc.key";
+include "../../_common/rndc.key";
controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
diff --git a/bin/tests/system/additional/ns1/named4.conf.in b/bin/tests/system/additional/ns1/named4.conf.in
index 69479b9..8c53086 100644
--- a/bin/tests/system/additional/ns1/named4.conf.in
+++ b/bin/tests/system/additional/ns1/named4.conf.in
@@ -25,7 +25,7 @@ options {
minimal-responses no-auth-recursive;
};
-include "../../common/rndc.key";
+include "../../_common/rndc.key";
controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
diff --git a/bin/tests/system/additional/tests.sh b/bin/tests/system/additional/tests.sh
index a50004c..193c9f9 100644
--- a/bin/tests/system/additional/tests.sh
+++ b/bin/tests/system/additional/tests.sh
@@ -16,235 +16,251 @@ set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"
-RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
+RNDCCMD="$RNDC -c ../_common/rndc.conf -p ${CONTROLPORT} -s"
status=0
n=0
dotests() {
- n=$((n + 1))
- echo_i "test with RT, single zone (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t RT rt.rt.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with RT, two zones (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t RT rt.rt2.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NAPTR, single zone (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t NAPTR nap.naptr.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NAPTR, two zones (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t NAPTR nap.hang3b.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with LP (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t LP nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
- case $minimal in
+ n=$((n + 1))
+ echo_i "test with RT, single zone (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t RT rt.rt.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with RT, two zones (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t RT rt.rt2.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NAPTR, single zone (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t NAPTR nap.naptr.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NAPTR, two zones (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t NAPTR nap.hang3b.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with LP (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t LP nid2.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ case $minimal in
no)
- grep -w "NS" dig.out.$n > /dev/null || ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null || ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
yes)
- grep -w "NS" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
+ grep -w "NS" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
;;
no-auth)
- grep -w "NS" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
no-auth-recursive)
- grep -w "NS" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
- esac
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NID (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t NID ns1.nid.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $minimal = no ] ; then
- # change && to || when we support NID additional processing
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- else
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- fi
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NID + LP (+rec) ($n)"
- ret=0
- $DIG $DIGOPTS +rec -t NID nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $minimal = no ] ; then
- # change && to || when we support NID additional processing
- grep -w "LP" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- else
- grep -w "LP" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- fi
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with RT, single zone (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t RT rt.rt.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with RT, two zones (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t RT rt.rt2.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NAPTR, single zone (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t NAPTR nap.naptr.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NAPTR, two zones (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t NAPTR nap.hang3b.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with LP (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t LP nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
- case $minimal in
+ esac
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NID (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t NID ns1.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $minimal = no ]; then
+ # change && to || when we support NID additional processing
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ else
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ fi
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NID + LP (+rec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +rec -t NID nid2.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $minimal = no ]; then
+ # change && to || when we support NID additional processing
+ grep -w "LP" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ else
+ grep -w "LP" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ fi
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with RT, single zone (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t RT rt.rt.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with RT, two zones (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t RT rt.rt2.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NAPTR, single zone (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t NAPTR nap.naptr.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NAPTR, two zones (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t NAPTR nap.hang3b.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with LP (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t LP nid2.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ case $minimal in
no)
- grep -w "NS" dig.out.$n > /dev/null || ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null || ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
yes)
- grep -w "NS" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
+ grep -w "NS" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
;;
no-auth)
- grep -w "NS" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
no-auth-recursive)
- grep -w "NS" dig.out.$n > /dev/null || ret=1
- grep -w "L64" dig.out.$n > /dev/null || ret=1
- grep -w "L32" dig.out.$n > /dev/null || ret=1
+ grep -w "NS" dig.out.$n >/dev/null || ret=1
+ grep -w "L64" dig.out.$n >/dev/null || ret=1
+ grep -w "L32" dig.out.$n >/dev/null || ret=1
;;
- esac
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NID (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t NID ns1.nid.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $minimal = no ] ; then
- # change && to || when we support NID additional processing
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- else
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- fi
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NID + LP (+norec) ($n)"
- ret=0
- $DIG $DIGOPTS +norec -t NID nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
- if [ $minimal = no ] ; then
- # change && to || when we support NID additional processing
- grep -w "LP" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- else
- grep -w "LP" dig.out.$n > /dev/null && ret=1
- grep -w "L64" dig.out.$n > /dev/null && ret=1
- grep -w "L32" dig.out.$n > /dev/null && ret=1
- fi
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NS, root zone ($n)"
- ret=0
- $DIG $DIGOPTS -t NS . @10.53.0.1 > dig.out.$n || ret=1
- # Always expect glue for root priming queries, regardless $minimal
- grep 'ADDITIONAL: 3' dig.out.$n > /dev/null || ret=1
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
-
- n=$((n + 1))
- echo_i "test with NS, non-root zone ($n)"
- ret=0
- $DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
- case $minimal in
+ esac
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NID (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t NID ns1.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $minimal = no ]; then
+ # change && to || when we support NID additional processing
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ else
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ fi
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NID + LP (+norec) ($n)"
+ ret=0
+ $DIG $DIGOPTS +norec -t NID nid2.nid.example @10.53.0.1 >dig.out.$n || ret=1
+ if [ $minimal = no ]; then
+ # change && to || when we support NID additional processing
+ grep -w "LP" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ else
+ grep -w "LP" dig.out.$n >/dev/null && ret=1
+ grep -w "L64" dig.out.$n >/dev/null && ret=1
+ grep -w "L32" dig.out.$n >/dev/null && ret=1
+ fi
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NS, root zone ($n)"
+ ret=0
+ $DIG $DIGOPTS -t NS . @10.53.0.1 >dig.out.$n || ret=1
+ # Always expect glue for root priming queries, regardless $minimal
+ grep 'ADDITIONAL: 3' dig.out.$n >/dev/null || ret=1
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
+
+ n=$((n + 1))
+ echo_i "test with NS, non-root zone ($n)"
+ ret=0
+ $DIG $DIGOPTS -t NS rt.example @10.53.0.1 >dig.out.$n || ret=1
+ case $minimal in
yes)
- grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ grep 'ADDITIONAL: 2' dig.out.$n >/dev/null || ret=1
;;
no)
- grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ grep 'ADDITIONAL: 2' dig.out.$n >/dev/null || ret=1
;;
no-auth)
- grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ grep 'ADDITIONAL: 2' dig.out.$n >/dev/null || ret=1
;;
no-auth-recursive)
- grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
+ grep 'ADDITIONAL: 2' dig.out.$n >/dev/null || ret=1
;;
- esac
- if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
- fi
+ esac
+ if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
+ fi
}
echo_i "testing with 'minimal-responses yes;'"
@@ -262,10 +278,11 @@ dotests
n=$((n + 1))
echo_i "testing with 'minimal-any no;' ($n)"
ret=0
-$DIG $DIGOPTS -t ANY www.rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY www.rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
echo_i "reconfiguring server: minimal-any yes"
@@ -275,28 +292,31 @@ rndc_reconfig ns1 10.53.0.1
n=$((n + 1))
echo_i "testing with 'minimal-any yes;' over UDP ($n)"
ret=0
-$DIG $DIGOPTS -t ANY +notcp www.rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY +notcp www.rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing with 'minimal-any yes;' over TCP ($n)"
ret=0
-$DIG $DIGOPTS -t ANY +tcp www.rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY +tcp www.rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing with 'minimal-any yes;' over UDP ($n)"
ret=0
-$DIG $DIGOPTS -t ANY +notcp www.rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY +notcp www.rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
echo_i "testing with 'minimal-responses no-auth;'"
@@ -314,23 +334,25 @@ dotests
n=$((n + 1))
echo_i "testing returning TLSA records with MX query ($n)"
ret=0
-$DIG $DIGOPTS -t mx mx.example @10.53.0.1 > dig.out.$n || ret=1
-grep "mx\.example\..*MX.0 mail\.mx\.example" dig.out.$n > /dev/null || ret=1
-grep "mail\.mx\.example\..*A.1\.2\.3\.4" dig.out.$n > /dev/null || ret=1
-grep "_25\._tcp\.mail\.mx\.example\..*TLSA.3 0 1 5B30F9602297D558EB719162C225088184FAA32CA45E1ED15DE58A21 D9FCE383" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t mx mx.example @10.53.0.1 >dig.out.$n || ret=1
+grep "mx\.example\..*MX.0 mail\.mx\.example" dig.out.$n >/dev/null || ret=1
+grep "mail\.mx\.example\..*A.1\.2\.3\.4" dig.out.$n >/dev/null || ret=1
+grep "_25\._tcp\.mail\.mx\.example\..*TLSA.3 0 1 5B30F9602297D558EB719162C225088184FAA32CA45E1ED15DE58A21 D9FCE383" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing returning TLSA records with SRV query ($n)"
ret=0
-$DIG $DIGOPTS -t srv _xmpp-client._tcp.srv.example @10.53.0.1 > dig.out.$n || ret=1
-grep "_xmpp-client\._tcp\.srv\.example\..*SRV.1 0 5222 server\.srv\.example" dig.out.$n > /dev/null || ret=1
-grep "server\.srv\.example\..*A.1\.2\.3\.4" dig.out.$n > /dev/null || ret=1
-grep "_5222\._tcp\.server\.srv\.example\..*TLSA.3 0 1 5B30F9602297D558EB719162C225088184FAA32CA45E1ED15DE58A21 D9FCE383" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t srv _xmpp-client._tcp.srv.example @10.53.0.1 >dig.out.$n || ret=1
+grep "_xmpp-client\._tcp\.srv\.example\..*SRV.1 0 5222 server\.srv\.example" dig.out.$n >/dev/null || ret=1
+grep "server\.srv\.example\..*A.1\.2\.3\.4" dig.out.$n >/dev/null || ret=1
+grep "_5222\._tcp\.server\.srv\.example\..*TLSA.3 0 1 5B30F9602297D558EB719162C225088184FAA32CA45E1ED15DE58A21 D9FCE383" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
echo_i "reconfiguring server: minimal-responses no"
@@ -340,39 +362,43 @@ rndc_reconfig ns1 10.53.0.1
n=$((n + 1))
echo_i "testing NS handling in ANY responses (authoritative) ($n)"
ret=0
-$DIG $DIGOPTS -t ANY rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "AUTHORITY: 0" dig.out.$n > /dev/null || ret=1
-grep "NS[ ]*ns" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "AUTHORITY: 0" dig.out.$n >/dev/null || ret=1
+grep "NS[ ]*ns" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing NS handling in ANY responses (recursive) ($n)"
ret=0
-$DIG $DIGOPTS -t ANY rt.example @10.53.0.3 > dig.out.$n || ret=1
-grep "AUTHORITY: 0" dig.out.$n > /dev/null || ret=1
-grep "NS[ ]*ns" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t ANY rt.example @10.53.0.3 >dig.out.$n || ret=1
+grep "AUTHORITY: 0" dig.out.$n >/dev/null || ret=1
+grep "NS[ ]*ns" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing out-of-zone additional data from auth zones (authoritative) ($n)"
ret=0
-$DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
-grep "ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t NS rt.example @10.53.0.1 >dig.out.$n || ret=1
+grep "ADDITIONAL: 2" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
n=$((n + 1))
echo_i "testing out-of-zone additional data from auth zones (recursive) ($n)"
ret=0
-$DIG $DIGOPTS -t NS ex @10.53.0.3 > dig.out.$n || ret=1
-grep "ADDITIONAL: 3" dig.out.$n > /dev/null || ret=1
-if [ $ret -eq 1 ] ; then
- echo_i "failed"; status=$((status+1))
+$DIG $DIGOPTS -t NS ex @10.53.0.3 >dig.out.$n || ret=1
+grep "ADDITIONAL: 3" dig.out.$n >/dev/null || ret=1
+if [ $ret -eq 1 ]; then
+ echo_i "failed"
+ status=$((status + 1))
fi
echo_i "exit status: $status"