From: Michal Nowak Date: Tue, 28 Jul 2020 10:45:31 +0000 (+0200) Subject: Ensure test fails if packet.pl does not work as expected X-Git-Tag: v9.17.4~27^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ee08e21a60fdca71c6e4dd8867ab516ece57c1;p=thirdparty%2Fbind9.git Ensure test fails if packet.pl does not work as expected --- diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index ceb5782b6b8..2cc2a4ec307 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -244,7 +244,7 @@ n=`expr $n + 1` ret=0 echo_i "check that TYPE=0 update is handled ($n)" echo "a0e4280000010000000100000000060001c00c000000fe000000000000" | -$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null +$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null || ret=1 $DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1 [ $ret = 0 ] || { echo_i "failed"; status=1; } @@ -253,7 +253,7 @@ n=`expr $n + 1` ret=0 echo_i "check that TYPE=0 additional data is handled ($n)" echo "a0e4280000010000000000010000060001c00c000000fe000000000000" | -$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null +$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null || ret=1 $DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1 [ $ret = 0 ] || { echo_i "failed"; status=1; } @@ -262,7 +262,7 @@ n=`expr $n + 1` ret=0 echo_i "check that update to undefined class is handled ($n)" echo "a0e4280000010001000000000000060101c00c000000fe000000000000" | -$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null +$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null || ret=1 $DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1 [ $ret = 0 ] || { echo_i "failed"; status=1; } diff --git a/bin/tests/system/tsig/tests.sh b/bin/tests/system/tsig/tests.sh index 9f23667a6ee..132fd7a24da 100644 --- a/bin/tests/system/tsig/tests.sh +++ b/bin/tests/system/tsig/tests.sh @@ -214,7 +214,7 @@ grep "unknown algorithm" keygen.out3 > /dev/null || ret=1 echo_i "check that a 'BADTIME' response with 'QR=0' is handled as a request" ret=0 -$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp < badtime > /dev/null +$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp < badtime > /dev/null || ret=1 $DIG -p ${PORT} @10.53.0.1 version.bind txt ch > dig.out.verify || ret=1 grep "status: NOERROR" dig.out.verify > /dev/null || ret=1 if [ $ret -eq 1 ] ; then