c88997
From 148bbbd1c1463c9b9626d7d9668d8768179d596b Mon Sep 17 00:00:00 2001
c88997
From: Mark Andrews <marka@isc.org>
c88997
Date: Fri, 11 Dec 2015 14:52:12 +1100
c88997
Subject: [PATCH 1/2] add digdelv
c88997
c88997
(cherry picked from commit 51aed1827453f40ee56b165d45c5d58d96838d94)
c88997
c88997
Deleted failing tests
c88997
---
c88997
 bin/tests/system/conf.sh.in             |   2 +-
c88997
 bin/tests/system/digdelv/clean.sh       |  21 +++++
c88997
 bin/tests/system/digdelv/ns1/named.conf |  37 +++++++++
c88997
 bin/tests/system/digdelv/ns1/root.db    |  29 +++++++
c88997
 bin/tests/system/digdelv/ns2/example.db |  50 ++++++++++++
c88997
 bin/tests/system/digdelv/ns2/named.conf |  40 ++++++++++
c88997
 bin/tests/system/digdelv/ns3/named.conf |  36 +++++++++
c88997
 bin/tests/system/digdelv/tests.sh       | 137 ++++++++++++++++++++++++++++++++
c88997
 8 files changed, 351 insertions(+), 1 deletion(-)
c88997
 create mode 100644 bin/tests/system/digdelv/clean.sh
c88997
 create mode 100644 bin/tests/system/digdelv/ns1/named.conf
c88997
 create mode 100644 bin/tests/system/digdelv/ns1/root.db
c88997
 create mode 100644 bin/tests/system/digdelv/ns2/example.db
c88997
 create mode 100644 bin/tests/system/digdelv/ns2/named.conf
c88997
 create mode 100644 bin/tests/system/digdelv/ns3/named.conf
c88997
 create mode 100644 bin/tests/system/digdelv/tests.sh
c88997
c88997
diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in
c88997
index 6df4734..49c5686 100644
c88997
--- a/bin/tests/system/conf.sh.in
c88997
+++ b/bin/tests/system/conf.sh.in
c88997
@@ -60,7 +60,7 @@ SAMPLE=$TOP/lib/export/samples/sample
c88997
 # v6synth
c88997
 SUBDIRS="acl additional allow_query addzone autosign builtin
c88997
 	 cacheclean checkconf @CHECKDS@ checknames checkzone @COVERAGE@
c88997
-         database dlv dlvauto dlz dlzexternal dname dns64 dnssec dyndb
c88997
+         database digdelv dlv dlvauto dlz dlzexternal dname dns64 dnssec dyndb
c88997
          ecdsa formerr forward glue gost ixfr inline limits logfileconfig
c88997
          lwresd masterfile masterformat metadata notify nsupdate pending
c88997
 	 @PKCS11_TEST@ redirect resolver rndc rpz rrl rrsetorder rsabigexponent
c88997
diff --git a/bin/tests/system/digdelv/clean.sh b/bin/tests/system/digdelv/clean.sh
c88997
new file mode 100644
c88997
index 0000000..0f442fb
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/clean.sh
c88997
@@ -0,0 +1,21 @@
c88997
+#!/bin/sh
c88997
+#
c88997
+# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+#
c88997
+# Permission to use, copy, modify, and/or distribute this software for any
c88997
+# purpose with or without fee is hereby granted, provided that the above
c88997
+# copyright notice and this permission notice appear in all copies.
c88997
+#
c88997
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+# PERFORMANCE OF THIS SOFTWARE.
c88997
+
c88997
+rm -f dig.out.test*
c88997
+rm -f delv.out.test*
c88997
+rm -f */named.memstats
c88997
+rm -f */named.run
c88997
+rm -f ns*/named.lock
c88997
diff --git a/bin/tests/system/digdelv/ns1/named.conf b/bin/tests/system/digdelv/ns1/named.conf
c88997
new file mode 100644
c88997
index 0000000..c5f0470
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/ns1/named.conf
c88997
@@ -0,0 +1,37 @@
c88997
+/*
c88997
+ * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+ *
c88997
+ * Permission to use, copy, modify, and/or distribute this software for any
c88997
+ * purpose with or without fee is hereby granted, provided that the above
c88997
+ * copyright notice and this permission notice appear in all copies.
c88997
+ *
c88997
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+ * PERFORMANCE OF THIS SOFTWARE.
c88997
+ */
c88997
+
c88997
+// NS1
c88997
+
c88997
+controls { /* empty */ };
c88997
+
c88997
+options {
c88997
+	query-source address 10.53.0.1;
c88997
+	port 5300;
c88997
+	pid-file "named.pid";
c88997
+	listen-on { 10.53.0.1; };
c88997
+	listen-on-v6 { fd92:7065:b8e:ffff::1; };
c88997
+	recursion no;
c88997
+	notify yes;
c88997
+	dnssec-enable no;
c88997
+	dnssec-validation no;
c88997
+};
c88997
+
c88997
+zone "." {
c88997
+	type master;
c88997
+	file "root.db";
c88997
+};
c88997
+
c88997
diff --git a/bin/tests/system/digdelv/ns1/root.db b/bin/tests/system/digdelv/ns1/root.db
c88997
new file mode 100644
c88997
index 0000000..f4316a5
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/ns1/root.db
c88997
@@ -0,0 +1,29 @@
c88997
+; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+;
c88997
+; Permission to use, copy, modify, and/or distribute this software for any
c88997
+; purpose with or without fee is hereby granted, provided that the above
c88997
+; copyright notice and this permission notice appear in all copies.
c88997
+;
c88997
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+; PERFORMANCE OF THIS SOFTWARE.
c88997
+
c88997
+$TTL 300
c88997
+. 			IN SOA	gson.nominum.com. a.root.servers.nil. (
c88997
+				2000042100   	; serial
c88997
+				600         	; refresh
c88997
+				600         	; retry
c88997
+				1200    	; expire
c88997
+				600       	; minimum
c88997
+				)
c88997
+.			NS	a.root-servers.nil.
c88997
+a.root-servers.nil.	A	10.53.0.1
c88997
+a.root-servers.nil.	AAAA	fd92:7065:b8e:ffff::1
c88997
+
c88997
+example.		NS	ns2.example.
c88997
+ns2.example.		A	10.53.0.2
c88997
+ns2.example.		AAAA	fd92:7065:b8e:ffff::2
c88997
diff --git a/bin/tests/system/digdelv/ns2/example.db b/bin/tests/system/digdelv/ns2/example.db
c88997
new file mode 100644
c88997
index 0000000..0a1aa5d
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/ns2/example.db
c88997
@@ -0,0 +1,50 @@
c88997
+; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+;
c88997
+; Permission to use, copy, modify, and/or distribute this software for any
c88997
+; purpose with or without fee is hereby granted, provided that the above
c88997
+; copyright notice and this permission notice appear in all copies.
c88997
+;
c88997
+; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+; PERFORMANCE OF THIS SOFTWARE.
c88997
+
c88997
+$TTL 300	; 5 minutes
c88997
+@			IN SOA	mname1. . (
c88997
+				2000042407 ; serial
c88997
+				20         ; refresh (20 seconds)
c88997
+				20         ; retry (20 seconds)
c88997
+				1814400    ; expire (3 weeks)
c88997
+				3600       ; minimum (1 hour)
c88997
+				)
c88997
+			NS	ns2
c88997
+			NS	ns3
c88997
+ns2			A	10.53.0.2
c88997
+ns2			AAAA	fd92:7065:b8e:ffff::2
c88997
+ns3			A	10.53.0.3
c88997
+ns3			AAAA	fd92:7065:b8e:ffff::3
c88997
+
c88997
+a			A	10.0.0.1
c88997
+a			AAAA	fd92:7065:b8e:ffff::1
c88997
+b			A	10.0.0.2
c88997
+b			AAAA	fd92:7065:b8e:ffff::2
c88997
+c			A	10.0.0.3
c88997
+c			AAAA	fd92:7065:b8e:ffff::3
c88997
+
c88997
+foo			TXT	"testing"
c88997
+foo			A	10.0.1.0
c88997
+foo			SSHFP	2 1 123456789abcdef67890123456789abcdef67890
c88997
+
c88997
+;;
c88997
+;; we are not testing DNSSEC behavior, so we don't care about the semantics
c88997
+;; of the following records.
c88997
+dnskey                  300     DNSKEY  256 3 1 (
c88997
+                                        AQPTpWyReB/e9Ii6mVGnakS8hX2zkh/iUYAg
c88997
+                                        +Ge4noWROpTWOIBvm76zeJPWs4Zfqa1IsswD
c88997
+                                        Ix5Mqeg0zwclz59uecKsKyx5w9IhtZ8plc4R
c88997
+                                        b9VIE5x7KNHAYTvTO5d4S8M=
c88997
+                                        )
c88997
+
c88997
diff --git a/bin/tests/system/digdelv/ns2/named.conf b/bin/tests/system/digdelv/ns2/named.conf
c88997
new file mode 100644
c88997
index 0000000..266e958
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/ns2/named.conf
c88997
@@ -0,0 +1,40 @@
c88997
+/*
c88997
+ * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+ *
c88997
+ * Permission to use, copy, modify, and/or distribute this software for any
c88997
+ * purpose with or without fee is hereby granted, provided that the above
c88997
+ * copyright notice and this permission notice appear in all copies.
c88997
+ *
c88997
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+ * PERFORMANCE OF THIS SOFTWARE.
c88997
+ */
c88997
+
c88997
+// NS2
c88997
+
c88997
+controls { /* empty */ };
c88997
+
c88997
+options {
c88997
+	query-source address 10.53.0.2;
c88997
+	port 5300;
c88997
+	pid-file "named.pid";
c88997
+	listen-on { 10.53.0.2; };
c88997
+	listen-on-v6 { fd92:7065:b8e:ffff::2; };
c88997
+	recursion no;
c88997
+	dnssec-enable no;
c88997
+	dnssec-validation no;
c88997
+};
c88997
+
c88997
+zone "." {
c88997
+	type hint;
c88997
+	file "../../common/root.hint";
c88997
+};
c88997
+
c88997
+zone "example" {
c88997
+	type master;
c88997
+	file "example.db";
c88997
+};
c88997
diff --git a/bin/tests/system/digdelv/ns3/named.conf b/bin/tests/system/digdelv/ns3/named.conf
c88997
new file mode 100644
c88997
index 0000000..e73c543
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/ns3/named.conf
c88997
@@ -0,0 +1,36 @@
c88997
+/*
c88997
+ * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+ *
c88997
+ * Permission to use, copy, modify, and/or distribute this software for any
c88997
+ * purpose with or without fee is hereby granted, provided that the above
c88997
+ * copyright notice and this permission notice appear in all copies.
c88997
+ *
c88997
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+ * PERFORMANCE OF THIS SOFTWARE.
c88997
+ */
c88997
+
c88997
+// NS4
c88997
+
c88997
+controls { /* empty */ };
c88997
+
c88997
+options {
c88997
+	query-source address 10.53.0.3;
c88997
+	port 5300;
c88997
+	pid-file "named.pid";
c88997
+	listen-on { 10.53.0.3; };
c88997
+	listen-on-v6 { fd92:7065:b8e:ffff::3; };
c88997
+	recursion yes;
c88997
+	acache-enable yes;
c88997
+	dnssec-enable no;
c88997
+	dnssec-validation no;
c88997
+};
c88997
+
c88997
+zone "." {
c88997
+	type hint;
c88997
+	file "../../common/root.hint";
c88997
+};
c88997
diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh
c88997
new file mode 100644
c88997
index 0000000..988bd52
c88997
--- /dev/null
c88997
+++ b/bin/tests/system/digdelv/tests.sh
c88997
@@ -0,0 +1,137 @@
c88997
+# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
c88997
+#
c88997
+# Permission to use, copy, modify, and/or distribute this software for any
c88997
+# purpose with or without fee is hereby granted, provided that the above
c88997
+# copyright notice and this permission notice appear in all copies.
c88997
+#
c88997
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c88997
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c88997
+# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c88997
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c88997
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c88997
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c88997
+# PERFORMANCE OF THIS SOFTWARE.
c88997
+
c88997
+SYSTEMTESTTOP=..
c88997
+. $SYSTEMTESTTOP/conf.sh
c88997
+
c88997
+status=0
c88997
+n=0
c88997
+# using dig insecure mode as not testing dnssec here
c88997
+DIGOPTS="-i -p 5300"
c88997
+
c88997
+if [ -x ${DIG} ] ; then
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking dig short form works ($n)"
c88997
+  ret=0
c88997
+  $DIG $DIGOPTS @10.53.0.3 +short a a.example > dig.out.test$n || ret=1
c88997
+  if test `wc -l < dig.out.test$n` != 1 ; then ret=1 ; fi
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking dig split width works ($n)"
c88997
+  ret=0
c88997
+  $DIG $DIGOPTS @10.53.0.3 +split=4 -t sshfp foo.example > dig.out.test$n || ret=1
c88997
+  grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking dig with reverse lookup works ($n)"
c88997
+  ret=0
c88997
+  $DIG $DIGOPTS @10.53.0.3 -x 127.0.0.1 > dig.out.test$n 2>&1 || ret=1
c88997
+  # doesn't matter if has answer
c88997
+  grep -i "127\.in-addr\.arpa\." < dig.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking dig over TCP works ($n)"
c88997
+  ret=0
c88997
+  $DIG $DIGOPTS +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
c88997
+  grep "10\.0\.0\.1$" < dig.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking dig +rrcomments works for DNSKEY($n)"
c88997
+  ret=0
c88997
+  $DIG $DIGOPTS +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
c88997
+  grep "; ZSK; alg = RSAMD5 *; key id = 30795" < dig.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+else
c88997
+  echo "W:$DIG is needed, so skipping these dig tests"
c88997
+fi
c88997
+
c88997
+# using delv insecure mode as not testing dnssec here
c88997
+DELVOPTS="-i -p 5300"
c88997
+
c88997
+if [ -n "${DELV}" -a -x "${DELV}" ] ; then
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv short form works ($n)"
c88997
+  ret=0
c88997
+  $DELV $DELVOPTS @10.53.0.3 +short a a.example > delv.out.test$n || ret=1
c88997
+  if test `wc -l < delv.out.test$n` != 1 ; then ret=1 ; fi
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv split width works ($n)"
c88997
+  ret=0
c88997
+  $DELV $DELVOPTS @10.53.0.3 +split=4 -t sshfp foo.example > delv.out.test$n || ret=1
c88997
+  grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv with IPv6 on IPv4 does not work ($n)"
c88997
+  if $TESTSOCK6 fd92:7065:b8e:ffff::3
c88997
+  then
c88997
+    ret=0
c88997
+    # following should fail because @IPv4 overrides earlier @IPv6 above
c88997
+    # and -6 forces IPv6 so this should fail, such as:
c88997
+    # ;; getaddrinfo failed: hostname nor servname provided, or not known
c88997
+    # ;; resolution failed: not found
c88997
+    # note that delv returns success even on lookup failure
c88997
+    $DELV $DELVOPTS @fd92:7065:b8e:ffff::3 @10.53.0.3 -6 -t txt foo.example > delv.out.test$n 2>&1 || ret=1
c88997
+    # it should have no results but error output
c88997
+    grep "testing" < delv.out.test$n > /dev/null && ret=1
c88997
+    grep "getaddrinfo failed:" < delv.out.test$n > /dev/null || ret=1
c88997
+    if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+    status=`expr $status + $ret`
c88997
+  else
c88997
+    echo "I:IPv6 unavailable; skipping"
c88997
+  fi
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv with reverse lookup works ($n)"
c88997
+  ret=0
c88997
+  $DELV $DELVOPTS @10.53.0.3 -x 127.0.0.1 > delv.out.test$n 2>&1 || ret=1
c88997
+  # doesn't matter if has answer
c88997
+  grep -i "127\.in-addr\.arpa\." < delv.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi 
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv over TCP works ($n)"
c88997
+  ret=0
c88997
+  $DELV $DELVOPTS @10.53.0.3 a a.example > delv.out.test$n || ret=1
c88997
+  grep "10\.0\.0\.1$" < delv.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  n=`expr $n + 1`
c88997
+  echo "I:checking delv +rrcomments works for DNSKEY($n)"
c88997
+  ret=0
c88997
+  $DELV $DELVOPTS @10.53.0.3 +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
c88997
+  grep "; ZSK; alg = RSAMD5 *; key id = 30795" < delv.out.test$n > /dev/null || ret=1
c88997
+  if [ $ret != 0 ]; then echo "I:failed"; fi
c88997
+  status=`expr $status + $ret`
c88997
+
c88997
+  exit $status
c88997
+else
c88997
+  echo "W:${DELV:-delv} is not available, so skipping these delv tests"
c88997
+fi
c88997
-- 
c88997
2.9.5
c88997