Commit 3635d8f9 authored by Mark Andrews's avatar Mark Andrews
Browse files

do not overflow exit status. [RT #42643]

parent ecff557e
......@@ -181,4 +181,4 @@ $DIG example. soa @10.53.0.2 +subnet="192.0.2.128/32" -p 5300 > dig.out.${t}
grep "CLIENT-SUBNET.*192.0.2.128/32/24" dig.out.${t} > /dev/null || { echo "I:test $t failed" ; status=1; }
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -139,4 +139,5 @@ if [ $ret -eq 1 ] ; then
echo "I: failed"; status=1
fi
exit $status
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1
......@@ -381,4 +381,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -630,5 +630,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -1217,4 +1217,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -123,4 +123,5 @@ $DIG +norec +nsid foo @10.53.0.3 -p 5300 > dig.out.ns3.$n
grep "^; NSID: .* (\"this.is.a.test.of.server-id\")$" dig.out.ns3.$n > /dev/null || ret=1
if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
exit $status
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1
......@@ -225,4 +225,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -137,5 +137,7 @@ echo "I:check A owner case is transfered to slave ($n)"
ret=0
$DIG axfr dynamic @10.53.0.2 -p 5300 > dig.ns2.test$n
$PERL ../digcomp.pl dig.ns2.test$n postns1.good || ret=1
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -373,4 +373,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -293,4 +293,4 @@ if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -176,4 +176,4 @@ status=`expr $status + $ret`
if [ $status = 0 ]; then $SHELL clean.sh; fi
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -151,4 +151,5 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
exit $status
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1
......@@ -171,4 +171,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -137,4 +137,4 @@ status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -81,4 +81,4 @@ for dir in [0-9][0-9]-*; do
done
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -57,4 +57,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -68,4 +68,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
......@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
rm -f dig.out.test*
rm -f dig.out.*test*
rm -f delv.out.test*
rm -f */named.memstats
rm -f */named.run
......
......@@ -263,7 +263,7 @@ if [ -x ${DIG} ] ; then
echo "I:checking dig +subnet with various prefix lengths ($n)"
ret=0
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24; do
$DIG $DIGOPTS +tcp @10.53.0.2 +subnet=255.255.255.255/$i A a.example > dig.out.test$n 2>&1 || ret=1
$DIG $DIGOPTS +tcp @10.53.0.2 +subnet=255.255.255.255/$i A a.example > dig.out.$i.test$n 2>&1 || ret=1
case $i in
1|9|17) octet=128 ;;
2|10|18) octet=192 ;;
......@@ -279,8 +279,8 @@ if [ -x ${DIG} ] ; then
9|10|11|12|13|14|15|16) addr="255.${octet}.0.0";;
17|18|19|20|21|22|23|24) addr="255.255.${octet}.0" ;;
esac
grep "FORMERR" < dig.out.test.$p.$n > /dev/null && ret=1
grep "CLIENT-SUBNET: $addr/$i/0" < dig.out.test$n > /dev/null || ret=1
grep "FORMERR" < dig.out.$i.test$n > /dev/null && ret=1
grep "CLIENT-SUBNET: $addr/$i/0" < dig.out.$i.test$n > /dev/null || ret=1
done
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
......@@ -510,7 +510,8 @@ if [ -x ${DELV} ] ; then
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
exit $status
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1
else
echo "$DELV is needed, so skipping these delv tests"
fi
......@@ -59,4 +59,4 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
[ $status -eq 0 ] || exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment