]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] test pipelining with mdig
authorEvan Hunt <each@isc.org>
Wed, 23 Mar 2016 00:26:38 +0000 (17:26 -0700)
committerEvan Hunt <each@isc.org>
Wed, 23 Mar 2016 00:26:38 +0000 (17:26 -0700)
4339. [test] Use "mdig" to test pipelined queries. [RT #41929]

CHANGES
bin/tests/system/conf.sh.in
bin/tests/system/pipelined/tests.sh

diff --git a/CHANGES b/CHANGES
index 322ac635032181e82aff1724074e20a52b967034..81a037d3cc7c0b3e8fa22ca680987d3cadcdee47 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+4339.  [test]          Use "mdig" to test pipelined queries. [RT #41929]
+
 4338.  [bug]           Reimplement change 4324 as it wasn't properly doing
                        all the required book keeping. [RT #41941]
 
index 1b7b7b088f2cabfe510eb26b58d0da7af17c6256..cac8c29ac6e8dcc041bc1214467e3ffe9412bde2 100644 (file)
@@ -59,6 +59,7 @@ RRCHECKER=$TOP/bin/tools/named-rrchecker
 GENRANDOM=$TOP/bin/tools/genrandom
 NSLOOKUP=$TOP/bin/dig/nslookup
 DNSTAPREAD="$TOP/bin/tools/dnstap-read"
+MDIG="$TOP/bin/tools/mdig"
 
 RANDFILE=$TOP/bin/tests/system/random.data
 
@@ -122,4 +123,6 @@ ZLIB=@ZLIB@
 
 export NAMED LWRESD DIG NSUPDATE KEYGEN KEYFRLAB SIGNER KEYSIGNER KEYSETTOOL \
        PERL SUBDIRS RNDC CHECKZONE PK11GEN PK11LIST PK11DEL TESTSOCK6 \
-       JOURNALPRINT ARPANAME RESOLVE RRCHECKER NSLOOKUP DESCRIPTION PYTHON
+       JOURNALPRINT ARPANAME RESOLVE RRCHECKER NSLOOKUP DESCRIPTION PYTHON \
+       MDIG
+
index 2561235e067344d43afcbcbdec0cf670ec48e17f..9ca583efe4c90dd55f88fd77bf729af6c730b670 100644 (file)
@@ -29,7 +29,21 @@ diff ref output > /dev/null && { ret=1 ; echo "I: diff out of order failed"; }
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check keep response order"
+# flush resolver so queries will be from others again
+$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
+sleep 1
+
+echo "I:check pipelined TCP queries using mdig"
+ret=0
+$MDIG +noall +answer +vc -f input -p 5300 -b 10.53.0.4 @10.53.0.4 > raw.mdig
+awk '{ print $1 " " $5 }' < raw.mdig > output.mdig
+sort < output.mdig > output-sorted.mdig
+diff ref output-sorted.mdig || { ret=1 ; echo "I: diff sorted failed"; }
+diff ref output.mdig > /dev/null && { ret=1 ; echo "I: diff out of order failed"; }
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+echo "I:check keep-response-order"
 ret=0
 ./pipequeries ++ < inputb > rawb || ret=1
 awk '{ print $1 " " $5 }' < rawb > outputb
@@ -37,5 +51,13 @@ diff refb outputb || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
+echo "I:check keep-response-order using mdig"
+ret=0
+$MDIG +noall +answer +vc -f inputb -p 5300 -b 10.53.0.7 @10.53.0.4 > rawb.mdig
+awk '{ print $1 " " $5 }' < rawb.mdig > outputb.mdig
+diff refb outputb.mdig || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
 echo "I:exit status: $status"
 exit $status