From 7a3fcfe34ccdd7d7bf17c022256da771cc1f23c6 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 13 Jan 2018 13:14:42 +1100 Subject: [PATCH] ret was not being set to 1 on dig error. [RT #46990] (cherry picked from commit 69c4c987f685c27f0fc7018a0b7b5f560d8276ce) --- bin/tests/system/rndc/tests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh index 112adf1132..e53e22cd61 100644 --- a/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh @@ -450,22 +450,22 @@ ret=0 $RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf querylog on >/dev/null 2>&1 || ret=1 grep "query logging is now on" ns4/named.run > /dev/null || ret=1 # query for builtin and check if query was logged (without +subnet) -$DIG @10.53.0.4 -p 5300 -c ch -t txt foo12345.bind > /dev/null || ret 1 +$DIG @10.53.0.4 -p 5300 -c ch -t txt foo12345.bind > /dev/null || ret=1 grep "query: foo12345.bind CH TXT.*(.*)$" ns4/named.run > /dev/null || ret=1 # query for another builtin zone and check if query was logged (with +subnet=127.0.0.1) -$DIG +subnet=127.0.0.1 @10.53.0.4 -p 5300 -c ch -t txt foo12346.bind > /dev/null || ret 1 +$DIG +subnet=127.0.0.1 @10.53.0.4 -p 5300 -c ch -t txt foo12346.bind > /dev/null || ret=1 grep "query: foo12346.bind CH TXT.*\[ECS 127\.0\.0\.1\/32\/0]" ns4/named.run > /dev/null || ret=1 # query for another builtin zone and check if query was logged (with +subnet=127.0.0.1/24) -$DIG +subnet=127.0.0.1/24 @10.53.0.4 -p 5300 -c ch -t txt foo12347.bind > /dev/null || ret 1 +$DIG +subnet=127.0.0.1/24 @10.53.0.4 -p 5300 -c ch -t txt foo12347.bind > /dev/null || ret=1 grep "query: foo12347.bind CH TXT.*\[ECS 127\.0\.0\.0\/24\/0]" ns4/named.run > /dev/null || ret=1 # query for another builtin zone and check if query was logged (with +subnet=::1) -$DIG +subnet=::1 @10.53.0.4 -p 5300 -c ch -t txt foo12348.bind > /dev/null || ret 1 +$DIG +subnet=::1 @10.53.0.4 -p 5300 -c ch -t txt foo12348.bind > /dev/null || ret=1 grep "query: foo12348.bind CH TXT.*\[ECS \:\:1\/128\/0]" ns4/named.run > /dev/null || ret=1 # toggle query logging and check again $RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf querylog > /dev/null 2>&1 || ret=1 grep "query logging is now off" ns4/named.run > /dev/null || ret=1 # query for another builtin zone and check if query was logged (without +subnet) -$DIG @10.53.0.4 -p 5300 -c ch -t txt foo9876.bind > /dev/null || ret 1 +$DIG @10.53.0.4 -p 5300 -c ch -t txt foo9876.bind > /dev/null || ret=1 grep "query: foo9876.bind CH TXT.*(.*)$" ns4/named.run > /dev/null && ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret`