diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh index 31508e5049..8aeeb3bf31 100644 --- a/bin/tests/system/upforwd/tests.sh +++ b/bin/tests/system/upforwd/tests.sh @@ -20,6 +20,19 @@ DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" RNDCCMD="$RNDC -p ${CONTROLPORT} -c ../common/rndc.conf" +nextpart_thrice() { + nextpart ns1/named.run >/dev/null + nextpart ns2/named.run >/dev/null + nextpart ns3/named.run >/dev/null +} + +wait_for_log_thrice() { + echo_i "waiting for servers to incorporate changes" + wait_for_log 10 "committing update transaction" ns1/named.run + wait_for_log 10 "zone transfer finished" ns2/named.run + wait_for_log 10 "zone transfer finished" ns3/named.run +} + status=0 n=1 capture_dnstap() { @@ -79,6 +92,7 @@ digcomp knowngood.before dig.out.ns3.example.before || ret=1 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi echo_i "checking update forwarding of a zone (signed) (Do53 -> DoT) ($n)" +nextpart_thrice ret=0 $NSUPDATE -y "${DEFAULT_HMAC}:update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K" -- - < DoT) ($n)" +nextpart_thrice ret=0 $NSUPDATE -y "${DEFAULT_HMAC}:update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K" -S -O -- - < DoT) ($n)" +nextpart_thrice ret=0 $NSUPDATE -y "${DEFAULT_HMAC}:update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K" -- - < /dev/null 2>&1 & - $DIG -p ${PORT} +noadd +notcp +noauth noprimary. @10.53.0.3 soa > dig.out.ns3 || ret=1 - grep "status: NOERROR" dig.out.ns3 > /dev/null || ret=1 + $DIG -p ${PORT} +noadd +notcp +noauth noprimary. @10.53.0.3 soa > dig.out.ns3.test$n.$count || ret=1 + grep "status: NOERROR" dig.out.ns3.test$n.$count > /dev/null || ret=1 count=`expr $count + 1` done if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi n=`expr $n + 1` +echo_i "waiting for nsupdate to finish ($n)" +wait +n=`expr $n + 1` + if $FEATURETEST --enable-dnstap then echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)" @@ -338,9 +351,10 @@ fi if test -f keyname then echo_i "checking update forwarding with sig0 (Do53 -> Do53) ($n)" + nextpart_thrice ret=0 keyname=`cat keyname` - $NSUPDATE -k $keyname.private -- - < dig.out.ns1.test$n grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1 if [ $ret != 0 ] ; then echo_i "failed"; fi @@ -366,9 +384,10 @@ EOF fi echo_i "checking update forwarding with sig0 (DoT -> Do53) ($n)" + nextpart_thrice ret=0 keyname=`cat keyname` - $NSUPDATE -k $keyname.private -S -O -- - < dig.out.ns1.test$n grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1 if [ $ret != 0 ] ; then echo_i "failed"; fi