]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure test fails if packet.pl does not work as expected
authorMichal Nowak <mnowak@isc.org>
Tue, 28 Jul 2020 10:45:31 +0000 (12:45 +0200)
committerMichal Nowak <mnowak@isc.org>
Fri, 31 Jul 2020 07:26:51 +0000 (09:26 +0200)
bin/tests/system/nsupdate/tests.sh
bin/tests/system/tsig/tests.sh

index b4be43779646e60cb982c8d629e2e3294a87a7b1..44436dbce88786d2767aba2b3f1f263075209c68 100755 (executable)
@@ -243,7 +243,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; }
@@ -252,7 +252,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; }
@@ -261,7 +261,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; }
index c54391f0658b30b9c4a20d49d07da2b4ff62b61c..fdce9155b293db97f6ae4b0ab8ba6b0981c4f7a9 100644 (file)
@@ -220,7 +220,7 @@ fi
 
 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