From 012ce6857e612b25ab2c2052eb505a0944c15107 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 4 Mar 2015 17:12:18 +1100 Subject: [PATCH] use unique query names --- bin/tests/system/reclimit/ans2/ans.pl | 11 +++++++++-- bin/tests/system/reclimit/tests.sh | 16 ++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bin/tests/system/reclimit/ans2/ans.pl b/bin/tests/system/reclimit/ans2/ans.pl index 82bb8749f5..d3effdf2c9 100644 --- a/bin/tests/system/reclimit/ans2/ans.pl +++ b/bin/tests/system/reclimit/ans2/ans.pl @@ -81,9 +81,16 @@ sub reply_handler { push @ans, $rr; } $rcode = "NOERROR"; - } elsif ($qname eq "indirect.example.org") { + } elsif ($qname eq "indirect1.example.org" || + $qname eq "indirect2.example.org" || + $qname eq "indirect3.example.org" || + $qname eq "indirect4.example.org" || + $qname eq "indirect5.example.org" || + $qname eq "indirect6.example.org" || + $qname eq "indirect7.example.org" || + $qname eq "indirect8.example.org") { if (! $send_response) { - my $rr = new Net::DNS::RR("indirect.example.org 86400 $qclass NS ns1.1.example.org"); + my $rr = new Net::DNS::RR("$qname 86400 $qclass NS ns1.1.example.org"); push @auth, $rr; } elsif ($qtype eq "A") { my ($ttl, $rdata) = (3600, $localaddr); diff --git a/bin/tests/system/reclimit/tests.sh b/bin/tests/system/reclimit/tests.sh index 158ef5948e..b9aac966f8 100644 --- a/bin/tests/system/reclimit/tests.sh +++ b/bin/tests/system/reclimit/tests.sh @@ -27,7 +27,7 @@ echo "I: attempt excessive-depth lookup ($n)" ret=0 echo "1000" > ans2/ans.limit $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect1.example.org > dig.out.1.test$n || ret=1 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -41,7 +41,7 @@ ret=0 echo "12" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect2.example.org > dig.out.1.test$n || ret=1 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -60,7 +60,7 @@ ret=0 echo "12" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect3.example.org > dig.out.1.test$n || ret=1 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -74,7 +74,7 @@ ret=0 echo "5" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect4.example.org > dig.out.1.test$n || ret=1 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -93,7 +93,7 @@ ret=0 echo "13" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect5.example.org > dig.out.1.test$n || ret=1 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -107,7 +107,7 @@ ret=0 echo "12" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect6.example.org > dig.out.1.test$n || ret=1 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -126,7 +126,7 @@ ret=0 echo "10" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect7.example.org > dig.out.1.test$n || ret=1 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n` @@ -140,7 +140,7 @@ ret=0 echo "9" > ans2/ans.limit $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /' $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1 -$DIG $DIGOPTS @10.53.0.3 indirect.example.org > dig.out.1.test$n || ret=1 +$DIG $DIGOPTS @10.53.0.3 indirect8.example.org > dig.out.1.test$n || ret=1 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1 eval count=`cat dig.out.2.test$n`