From: Evan Hunt Date: Wed, 23 Mar 2016 00:26:38 +0000 (-0700) Subject: [master] test pipelining with mdig X-Git-Tag: v9.11.0a1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddf3342cca1a2dbd98c5443cbb9b184c428cdda5;p=thirdparty%2Fbind9.git [master] test pipelining with mdig 4339. [test] Use "mdig" to test pipelined queries. [RT #41929] --- diff --git a/CHANGES b/CHANGES index 322ac635032..81a037d3cc7 100644 --- 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] diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 1b7b7b088f2..cac8c29ac6e 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -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 + diff --git a/bin/tests/system/pipelined/tests.sh b/bin/tests/system/pipelined/tests.sh index 2561235e067..9ca583efe4c 100644 --- a/bin/tests/system/pipelined/tests.sh +++ b/bin/tests/system/pipelined/tests.sh @@ -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