3667. [func] dig: add support to keep the TCP socket open between

successive queries (+[no]keepopen).  [RT #34918]
This commit is contained in:
Mark Andrews
2013-11-07 10:50:01 +11:00
parent 49c1e0d18d
commit 2048955015
8 changed files with 285 additions and 201 deletions

View File

@@ -85,11 +85,16 @@ in_cache () {
}
echo "I:check correctness of routine cache cleaning"
$DIG $DIGOPTS -f dig.batch > dig.out.ns2 || status=1
$DIG $DIGOPTS +tcp +keepopen -b 10.53.0.7 -f dig.batch > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$PERL ../digcomp.pl --lc dig.out.ns2 knowngood.dig.out || status=1
echo "I:only one tcp socket was used"
tcpclients=`grep "client 10.53.0.7#[0-9]*:" ns2/named.run | awk '{print $4}' | sort | uniq -c | wc -l`
test $tcpclients -eq 1 || { status=1; echo "I:failed"; }
echo "I:reset and check that records are correctly cached initially"
ret=0
load_cache