]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] add +nocookie and use perl for query burst
authorEvan Hunt <each@isc.org>
Tue, 15 Dec 2015 05:27:49 +0000 (21:27 -0800)
committerEvan Hunt <each@isc.org>
Tue, 15 Dec 2015 05:27:49 +0000 (21:27 -0800)
bin/tests/system/rrl/tests.sh

index 8d414d6cea830f108078e57468d9300f0b714231..d62dce5a4c5c7a41b45f758c12634c570ff02124 100644 (file)
@@ -70,7 +70,7 @@ HOME=/dev/null; export HOME
 digcmd () {
     OFILE=$1; shift
     DIG_DOM=$1; shift
-    ARGS="+nosearch +time=1 +tries=1 +ignore -p 5300 $* $DIG_DOM @$ns2"
+    ARGS="+nosearch +nocookie +time=1 +tries=1 +ignore -p 5300 $* $DIG_DOM @$ns2"
     #echo I:dig $ARGS 1>&2
     START=`date +%y%m%d%H%M.%S`
     RESULT=`$DIG $ARGS 2>&1 | tee $OFILE=TEMP                          \
@@ -93,14 +93,14 @@ QNUM=1
 burst () {
     BURST_LIMIT=$1; shift
     BURST_DOM_BASE="$1"; shift
-    while test "$BURST_LIMIT" -ge 1; do
-       CNT=`expr "00$QNUM" : '.*\(...\)'`
+    CNTS=`$PERL -e 'for ( $i = 0; $i < '$BURST_LIMIT'; $i++) { printf "%03d\n", '$QNUM' + $i; }'`
+    for CNT in $CNTS
+    do
        eval BURST_DOM="$BURST_DOM_BASE"
        FILE="dig.out-$BURST_DOM-$CNT"
        digcmd $FILE $BURST_DOM $* &
-       QNUM=`expr $QNUM + 1`
-       BURST_LIMIT=`expr "$BURST_LIMIT" - 1`
     done
+    QNUM=`expr $QNUM + $BURST_LIMIT`
 }