From: Mark Andrews Date: Mon, 21 Mar 2011 20:31:22 +0000 (+0000) Subject: adjust rt23702 test to take less time X-Git-Tag: v9.9.0a1~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2265bd34179d31f5c27d8ac4d0cf7f64abfed26;p=thirdparty%2Fbind9.git adjust rt23702 test to take less time --- diff --git a/bin/tests/system/dnssec/ns2/sign.sh b/bin/tests/system/dnssec/ns2/sign.sh index e42d5f000eb..4ccb53eb1ca 100644 --- a/bin/tests/system/dnssec/ns2/sign.sh +++ b/bin/tests/system/dnssec/ns2/sign.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: sign.sh,v 1.48 2011/03/21 01:02:39 marka Exp $ +# $Id: sign.sh,v 1.49 2011/03/21 20:31:22 marka Exp $ SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh @@ -164,19 +164,22 @@ cat $infile $keynew1.key $keynew2.key >$zonefile $SIGNER -P -r $RANDFILE -o $zone -k $keyold1 -k $keynew1 $zonefile $keyold1 $keyold2 $keynew1 $keynew2 > /dev/null # -# +# Make a zone big enough that it takes several seconds to generate a new +# nsec3 chain. # zone=nsec3chain-test -zonefile=nsec3chain-test.db.signed - -cat > $zonefile << EOF +zonefile=nsec3chain-test.db +cat > $zonefile << 'EOF' +$TTL 10 @ 10 SOA ns2 hostmaster 0 3600 1200 864000 1200 @ 10 NS ns2 @ 10 NS ns3 ns2 10 A 10.53.0.2 ns3 10 A 10.53.0.3 EOF -awk 'END { for (i = 0; i < 1000; i++) +awk 'END { for (i = 0; i < 300; i++) print "host" i, 10, "NS", "ns.elsewhere"; }' < /dev/null >> $zonefile -k=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone -fk $zone` -k=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone` +key1=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone -fk $zone` +key2=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone` +cat $key1.key $key2.key >> $zonefile +$SIGNER -P -3 - -A -H 1 -g -r $RANDFILE -o $zone -k $key1 $zonefile $key2 > /dev/null diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 0e2e520f709..ebc804ddcf2 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.85 2011/03/21 07:26:47 each Exp $ +# $Id: tests.sh,v 1.86 2011/03/21 20:31:22 marka Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -1292,22 +1292,20 @@ ret=0 ( echo zone nsec3chain-test echo server 10.53.0.2 5300 -grep DNSKEY ns2/Knsec3chain-test.*.key | -sed -e 's/.*://' -e 's/^/update add /' -e 's/IN/300 IN/' -echo update add nsec3chain-test. 0 nsec3param 1 0 1 - +echo update add nsec3chain-test. 0 nsec3param 1 0 1 123456 echo send ) | $NSUPDATE for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 do $DIG $DIGOPTS nsec3param nsec3chain-test @10.53.0.2 > dig.out.ns2.test$n || ret=1 - if grep "ANSWER: 2," dig.out.ns2.test$n >/dev/null + if grep "ANSWER: 3," dig.out.ns2.test$n >/dev/null then break; fi echo "I:sleeping ...." sleep 3 done; -grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1 +grep "ANSWER: 3," dig.out.ns2.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:nsec3 chain generation not complete"; fi sleep 3 $DIG $DIGOPTS +noauth +nodnssec soa nsec3chain-test @10.53.0.2 > dig.out.ns2.test$n || ret=1