From: Mark Andrews Date: Tue, 14 Jun 2016 03:48:39 +0000 (+1000) Subject: do not overflow exit status. [RT #42643] X-Git-Tag: v9.11.0b1~59 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3635d8f9104e70e141a8f191a0e6c1502ceed2f3;p=thirdparty%2Fbind9.git do not overflow exit status. [RT #42643] --- diff --git a/bin/tests/system/acl/tests.sh b/bin/tests/system/acl/tests.sh index 27efd5cde8d..7db3e3eb715 100644 --- a/bin/tests/system/acl/tests.sh +++ b/bin/tests/system/acl/tests.sh @@ -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 diff --git a/bin/tests/system/additional/tests.sh b/bin/tests/system/additional/tests.sh index 02210805962..65ea9bc4971 100644 --- a/bin/tests/system/additional/tests.sh +++ b/bin/tests/system/additional/tests.sh @@ -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 diff --git a/bin/tests/system/addzone/tests.sh b/bin/tests/system/addzone/tests.sh index 528cf333759..1a2a8ee3ddd 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -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 diff --git a/bin/tests/system/allow_query/tests.sh b/bin/tests/system/allow_query/tests.sh index 0592c342d46..afb630f37c6 100644 --- a/bin/tests/system/allow_query/tests.sh +++ b/bin/tests/system/allow_query/tests.sh @@ -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 diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index 6a3a50a769f..15e26b3e1ca 100644 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -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 diff --git a/bin/tests/system/builtin/tests.sh b/bin/tests/system/builtin/tests.sh index b51cf450f26..8c1aea39901 100644 --- a/bin/tests/system/builtin/tests.sh +++ b/bin/tests/system/builtin/tests.sh @@ -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 diff --git a/bin/tests/system/cacheclean/tests.sh b/bin/tests/system/cacheclean/tests.sh index 539550fd996..7c0dbe0b7c4 100644 --- a/bin/tests/system/cacheclean/tests.sh +++ b/bin/tests/system/cacheclean/tests.sh @@ -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 diff --git a/bin/tests/system/case/tests.sh b/bin/tests/system/case/tests.sh index 54ffd9e124c..6cd3d7f8791 100644 --- a/bin/tests/system/case/tests.sh +++ b/bin/tests/system/case/tests.sh @@ -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 diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index 3ea927c52ff..54a86342714 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -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 diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index a04601a689b..dcc57a5c936 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -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 diff --git a/bin/tests/system/checkds/tests.sh b/bin/tests/system/checkds/tests.sh index 5fb1f65b459..f6ab8fbc34b 100644 --- a/bin/tests/system/checkds/tests.sh +++ b/bin/tests/system/checkds/tests.sh @@ -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 diff --git a/bin/tests/system/checknames/tests.sh b/bin/tests/system/checknames/tests.sh index 1480442f6ea..0abea09fc03 100644 --- a/bin/tests/system/checknames/tests.sh +++ b/bin/tests/system/checknames/tests.sh @@ -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 diff --git a/bin/tests/system/checkzone/tests.sh b/bin/tests/system/checkzone/tests.sh index d5a04d2c4ae..f391aff631a 100644 --- a/bin/tests/system/checkzone/tests.sh +++ b/bin/tests/system/checkzone/tests.sh @@ -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 diff --git a/bin/tests/system/cookie/tests.sh b/bin/tests/system/cookie/tests.sh index 10f4198fd7c..f28f3775e48 100755 --- a/bin/tests/system/cookie/tests.sh +++ b/bin/tests/system/cookie/tests.sh @@ -137,4 +137,4 @@ status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/coverage/tests.sh b/bin/tests/system/coverage/tests.sh index 099bdefabd0..228ab8aacb6 100644 --- a/bin/tests/system/coverage/tests.sh +++ b/bin/tests/system/coverage/tests.sh @@ -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 diff --git a/bin/tests/system/database/tests.sh b/bin/tests/system/database/tests.sh index 85406172604..bec9112c5ea 100644 --- a/bin/tests/system/database/tests.sh +++ b/bin/tests/system/database/tests.sh @@ -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 diff --git a/bin/tests/system/dialup/tests.sh b/bin/tests/system/dialup/tests.sh index 40da0542271..bcbc71873a4 100644 --- a/bin/tests/system/dialup/tests.sh +++ b/bin/tests/system/dialup/tests.sh @@ -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 diff --git a/bin/tests/system/digdelv/clean.sh b/bin/tests/system/digdelv/clean.sh index 0f442fb59e6..115fb0b4c65 100644 --- a/bin/tests/system/digdelv/clean.sh +++ b/bin/tests/system/digdelv/clean.sh @@ -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 diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index c22e621b01e..700617b61f6 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -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 diff --git a/bin/tests/system/dlv/tests.sh b/bin/tests/system/dlv/tests.sh index e3ba63713f8..0155ccf6838 100644 --- a/bin/tests/system/dlv/tests.sh +++ b/bin/tests/system/dlv/tests.sh @@ -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 diff --git a/bin/tests/system/dlvauto/tests.sh b/bin/tests/system/dlvauto/tests.sh index 6e238e6c23f..9959cf2bdce 100644 --- a/bin/tests/system/dlvauto/tests.sh +++ b/bin/tests/system/dlvauto/tests.sh @@ -62,4 +62,5 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/dlz/tests.sh b/bin/tests/system/dlz/tests.sh index c4df4fab490..101e4ce46e4 100644 --- a/bin/tests/system/dlz/tests.sh +++ b/bin/tests/system/dlz/tests.sh @@ -79,4 +79,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 diff --git a/bin/tests/system/dlzexternal/tests.sh b/bin/tests/system/dlzexternal/tests.sh index 1b8313cdd8d..285ea20b00e 100644 --- a/bin/tests/system/dlzexternal/tests.sh +++ b/bin/tests/system/dlzexternal/tests.sh @@ -202,4 +202,5 @@ lookups=`grep "lookup #.*\.not\.there" ns1/named.run | wc -l` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/dname/tests.sh b/bin/tests/system/dname/tests.sh index d22f54b63d8..a451e0fd985 100644 --- a/bin/tests/system/dname/tests.sh +++ b/bin/tests/system/dname/tests.sh @@ -65,4 +65,4 @@ status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/dns64/tests.sh b/bin/tests/system/dns64/tests.sh index 26808d9b737..fc4bb59a744 100644 --- a/bin/tests/system/dns64/tests.sh +++ b/bin/tests/system/dns64/tests.sh @@ -1370,4 +1370,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 diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 5e9a079a2d7..4da4adb4d77 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -3295,4 +3295,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 diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index 2f811e4239f..b5adfe9bd87 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -174,4 +174,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 diff --git a/bin/tests/system/dscp/tests.sh b/bin/tests/system/dscp/tests.sh index 22d1ab2b1e5..56ac8896820 100644 --- a/bin/tests/system/dscp/tests.sh +++ b/bin/tests/system/dscp/tests.sh @@ -38,4 +38,6 @@ do done test $ret = 0 || { echo "I:failed"; status=`expr $status + $ret`; } done -exit $status + +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/dsdigest/tests.sh b/bin/tests/system/dsdigest/tests.sh index 67b0b2f11b0..7d8877a2fac 100644 --- a/bin/tests/system/dsdigest/tests.sh +++ b/bin/tests/system/dsdigest/tests.sh @@ -56,4 +56,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 diff --git a/bin/tests/system/dyndb/tests.sh b/bin/tests/system/dyndb/tests.sh index 335e5cea939..995d5b2a236 100644 --- a/bin/tests/system/dyndb/tests.sh +++ b/bin/tests/system/dyndb/tests.sh @@ -147,4 +147,5 @@ status=`expr $status + $ret` test_del test6.ipv6.example.nil. AAAA || ret=1 status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/ecdsa/tests.sh b/bin/tests/system/ecdsa/tests.sh index 349e0f30a22..8834d9fce36 100644 --- a/bin/tests/system/ecdsa/tests.sh +++ b/bin/tests/system/ecdsa/tests.sh @@ -39,4 +39,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 diff --git a/bin/tests/system/ednscompliance/tests.sh b/bin/tests/system/ednscompliance/tests.sh index 2c474fae4cf..d5ff96dbf07 100644 --- a/bin/tests/system/ednscompliance/tests.sh +++ b/bin/tests/system/ednscompliance/tests.sh @@ -111,4 +111,4 @@ status=`expr $status + $ret` n=`expr $n + 1` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/emptyzones/tests.sh b/bin/tests/system/emptyzones/tests.sh index 98183d3aa62..9ded980448e 100644 --- a/bin/tests/system/emptyzones/tests.sh +++ b/bin/tests/system/emptyzones/tests.sh @@ -40,4 +40,5 @@ grep "status: REFUSED" dig.out.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/fetchlimit/tests.sh b/bin/tests/system/fetchlimit/tests.sh index bf3c63c44b3..fa8f5dc9fb7 100644 --- a/bin/tests/system/fetchlimit/tests.sh +++ b/bin/tests/system/fetchlimit/tests.sh @@ -183,4 +183,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 diff --git a/bin/tests/system/filter-aaaa/tests.sh b/bin/tests/system/filter-aaaa/tests.sh index c1c866fd9f3..b229fff35cb 100644 --- a/bin/tests/system/filter-aaaa/tests.sh +++ b/bin/tests/system/filter-aaaa/tests.sh @@ -1381,4 +1381,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 diff --git a/bin/tests/system/formerr/tests.sh b/bin/tests/system/formerr/tests.sh index 27f209f240e..47774759ef9 100644 --- a/bin/tests/system/formerr/tests.sh +++ b/bin/tests/system/formerr/tests.sh @@ -46,4 +46,4 @@ fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh index 37878da79ef..bec8a1f9834 100644 --- a/bin/tests/system/forward/tests.sh +++ b/bin/tests/system/forward/tests.sh @@ -138,4 +138,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 diff --git a/bin/tests/system/geoip/tests.sh b/bin/tests/system/geoip/tests.sh index ffe4284a14d..629c39dce8d 100644 --- a/bin/tests/system/geoip/tests.sh +++ b/bin/tests/system/geoip/tests.sh @@ -485,4 +485,4 @@ $CHECKCONF options.conf || ret=1 status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/glue/tests.sh b/bin/tests/system/glue/tests.sh index e9d465fdb61..1b4ec6ffe77 100644 --- a/bin/tests/system/glue/tests.sh +++ b/bin/tests/system/glue/tests.sh @@ -43,4 +43,4 @@ $DIG +norec @10.53.0.1 -p 5300 example.net. a > dig.out || status=1 $PERL ../digcomp.pl noglue.good dig.out || status=1 echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/gost/tests.sh b/bin/tests/system/gost/tests.sh index 80093ca050b..a554752eda8 100644 --- a/bin/tests/system/gost/tests.sh +++ b/bin/tests/system/gost/tests.sh @@ -39,4 +39,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 diff --git a/bin/tests/system/inline/tests.sh b/bin/tests/system/inline/tests.sh index b277f06f414..c08cc4e5d1e 100755 --- a/bin/tests/system/inline/tests.sh +++ b/bin/tests/system/inline/tests.sh @@ -979,4 +979,5 @@ serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index 4ba85a90fbe..d4cc78935e0 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -266,4 +266,4 @@ if [ ${ret} != 0 ]; then fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/keymgr/tests.sh b/bin/tests/system/keymgr/tests.sh index 52ff16027cf..a34bb46e20b 100644 --- a/bin/tests/system/keymgr/tests.sh +++ b/bin/tests/system/keymgr/tests.sh @@ -103,4 +103,4 @@ status=`expr $status + $ret` n=`expr $n + 1` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh index b9e2ccdb928..fab543f2f01 100755 --- a/bin/tests/system/legacy/tests.sh +++ b/bin/tests/system/legacy/tests.sh @@ -169,4 +169,4 @@ fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/limits/tests.sh b/bin/tests/system/limits/tests.sh index d5296ecf2de..f521c584cc6 100644 --- a/bin/tests/system/limits/tests.sh +++ b/bin/tests/system/limits/tests.sh @@ -57,4 +57,4 @@ grep 'flags: .*tc.*;' dig.out.exceed > /dev/null || { } echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/logfileconfig/tests.sh b/bin/tests/system/logfileconfig/tests.sh index 7ed1627031d..d2c4369368d 100644 --- a/bin/tests/system/logfileconfig/tests.sh +++ b/bin/tests/system/logfileconfig/tests.sh @@ -268,4 +268,4 @@ else fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/lwresd/tests.sh b/bin/tests/system/lwresd/tests.sh index af59c9027b7..1ce6612e9ee 100644 --- a/bin/tests/system/lwresd/tests.sh +++ b/bin/tests/system/lwresd/tests.sh @@ -71,4 +71,4 @@ fi status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/masterfile/tests.sh b/bin/tests/system/masterfile/tests.sh index d7f393423bd..3f221b692c4 100644 --- a/bin/tests/system/masterfile/tests.sh +++ b/bin/tests/system/masterfile/tests.sh @@ -63,4 +63,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 diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index cb9cbbef100..00eaf2f19e3 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -290,4 +290,4 @@ grep 'next resign' rndc.out > /dev/null 2>&1 || ret=1 status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/metadata/tests.sh b/bin/tests/system/metadata/tests.sh index 28d5ac5740f..4e5ce61d7a1 100644 --- a/bin/tests/system/metadata/tests.sh +++ b/bin/tests/system/metadata/tests.sh @@ -192,4 +192,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 diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index 20c53d9e989..92d63d07a72 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -543,4 +543,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 diff --git a/bin/tests/system/names/tests.sh b/bin/tests/system/names/tests.sh index 9fe49ece257..e5fe98d4d9b 100644 --- a/bin/tests/system/names/tests.sh +++ b/bin/tests/system/names/tests.sh @@ -48,4 +48,4 @@ if [ $val -le 1 ]; then fi; echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh index c98ef261adf..6893fc0f6f3 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -213,4 +213,4 @@ grep "test string" dig.out.c.ns5.test$n > /dev/null || ret=1 status=`expr $ret + $status` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/nslookup/tests.sh b/bin/tests/system/nslookup/tests.sh index d77afd9fec2..426053f6e6d 100644 --- a/bin/tests/system/nslookup/tests.sh +++ b/bin/tests/system/nslookup/tests.sh @@ -32,5 +32,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 diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 2a088dae089..502531b8b65 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -657,4 +657,4 @@ grep "bad name" nsupdate.out4-$n > /dev/null && ret=1 [ $ret = 0 ] || { echo I:failed; status=1; } echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/pending/tests.sh b/bin/tests/system/pending/tests.sh index 3b70f833510..9962bc10c6f 100644 --- a/bin/tests/system/pending/tests.sh +++ b/bin/tests/system/pending/tests.sh @@ -201,4 +201,4 @@ test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'" status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/pipelined/tests.sh b/bin/tests/system/pipelined/tests.sh index d3cbfa6d9f7..6af9a87daa2 100644 --- a/bin/tests/system/pipelined/tests.sh +++ b/bin/tests/system/pipelined/tests.sh @@ -60,4 +60,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 diff --git a/bin/tests/system/pkcs11/tests.sh b/bin/tests/system/pkcs11/tests.sh index 047c79b8b49..8eb72e1bfb8 100644 --- a/bin/tests/system/pkcs11/tests.sh +++ b/bin/tests/system/pkcs11/tests.sh @@ -79,4 +79,4 @@ END done echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/pkcs11ssl/tests.sh b/bin/tests/system/pkcs11ssl/tests.sh index c22dc4fe1a6..9c45f092494 100644 --- a/bin/tests/system/pkcs11ssl/tests.sh +++ b/bin/tests/system/pkcs11ssl/tests.sh @@ -66,4 +66,4 @@ if [ $count != 0 ]; then echo "I:failed"; fi status=`expr $status + $count` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/reclimit/tests.sh b/bin/tests/system/reclimit/tests.sh index a9f7776cb62..ada810367a9 100644 --- a/bin/tests/system/reclimit/tests.sh +++ b/bin/tests/system/reclimit/tests.sh @@ -190,4 +190,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 diff --git a/bin/tests/system/redirect/tests.sh b/bin/tests/system/redirect/tests.sh index 38c47f95d3b..569d0cc8f6b 100644 --- a/bin/tests/system/redirect/tests.sh +++ b/bin/tests/system/redirect/tests.sh @@ -525,4 +525,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 diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 8c1fcdebcf8..f48308efe2f 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -688,5 +688,6 @@ ttl=`awk '/"A" "zero" "ttl"/ { print $2 }' dig.out.1.${n}` test ${ttl:-1} -eq 0 || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` + echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh index e71780f81da..232dde7d590 100644 --- a/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh @@ -557,4 +557,5 @@ EOF status=`expr $status + $ret` fi -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index fe22153d2eb..597b2c89048 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -647,4 +647,4 @@ $DIG -p 5300 @$ns3 ns example.com > dig.out.delegation grep "status: SERVFAIL" dig.out.delegation > /dev/null || setret "I:failed" echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index ca4841c4eca..ee0f08fe963 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -335,5 +335,5 @@ if test $p1 -le $p2; then ret=1; fi if test $ret != 0; then echo "I:failed"; fi status=`expr $status + $ret` - -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rrchecker/tests.sh b/bin/tests/system/rrchecker/tests.sh index fd79c7e2f35..3ed7dc4ab65 100644 --- a/bin/tests/system/rrchecker/tests.sh +++ b/bin/tests/system/rrchecker/tests.sh @@ -79,4 +79,4 @@ done test $ret -eq 0 || { echo "I:failed"; status=`expr $status + 1`; } echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rrl/tests.sh b/bin/tests/system/rrl/tests.sh index 73f1b828478..8a246c9b5cc 100644 --- a/bin/tests/system/rrl/tests.sh +++ b/bin/tests/system/rrl/tests.sh @@ -284,6 +284,6 @@ if [ -f named.pid ]; then fi echo "I:exit status: $ret" -exit $ret +[ $ret -eq 0 ] || exit 1 #[ $ret -ne 0 ] && echo "I:test failure overridden" -#exit 0 +#[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/rrsetorder/tests.sh b/bin/tests/system/rrsetorder/tests.sh index 0ca76dd724e..78db9342917 100644 --- a/bin/tests/system/rrsetorder/tests.sh +++ b/bin/tests/system/rrsetorder/tests.sh @@ -475,4 +475,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 diff --git a/bin/tests/system/rsabigexponent/tests.sh b/bin/tests/system/rsabigexponent/tests.sh index ef7d18c789e..9bd02c59d1a 100644 --- a/bin/tests/system/rsabigexponent/tests.sh +++ b/bin/tests/system/rsabigexponent/tests.sh @@ -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 diff --git a/bin/tests/system/runtime/tests.sh b/bin/tests/system/runtime/tests.sh index 7672b835abc..9d17f2b2bb2 100644 --- a/bin/tests/system/runtime/tests.sh +++ b/bin/tests/system/runtime/tests.sh @@ -58,4 +58,5 @@ if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/sfcache/tests.sh b/bin/tests/system/sfcache/tests.sh index 2692585fcc9..033c52562a1 100644 --- a/bin/tests/system/sfcache/tests.sh +++ b/bin/tests/system/sfcache/tests.sh @@ -97,4 +97,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 diff --git a/bin/tests/system/smartsign/tests.sh b/bin/tests/system/smartsign/tests.sh index 041bb411bf3..0dcf32eb0db 100644 --- a/bin/tests/system/smartsign/tests.sh +++ b/bin/tests/system/smartsign/tests.sh @@ -343,4 +343,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 diff --git a/bin/tests/system/sortlist/tests.sh b/bin/tests/system/sortlist/tests.sh index c878dcafc74..668042f7491 100644 --- a/bin/tests/system/sortlist/tests.sh +++ b/bin/tests/system/sortlist/tests.sh @@ -57,4 +57,4 @@ $DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd \ egrep '10.53.0.5$' >> test2.out || status=1 echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/spf/tests.sh b/bin/tests/system/spf/tests.sh index ba8ddd42391..ba71a7d95b0 100644 --- a/bin/tests/system/spf/tests.sh +++ b/bin/tests/system/spf/tests.sh @@ -39,4 +39,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 diff --git a/bin/tests/system/staticstub/tests.sh b/bin/tests/system/staticstub/tests.sh index edb2aa5f48a..d2595f2deb8 100755 --- a/bin/tests/system/staticstub/tests.sh +++ b/bin/tests/system/staticstub/tests.sh @@ -214,4 +214,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 diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index 49524fa9f61..6e4c772da64 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -143,4 +143,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 diff --git a/bin/tests/system/statschannel/tests.sh b/bin/tests/system/statschannel/tests.sh index df4e25aff0c..f4933f9a252 100644 --- a/bin/tests/system/statschannel/tests.sh +++ b/bin/tests/system/statschannel/tests.sh @@ -210,4 +210,4 @@ status=`expr $status + $ret` n=`expr $n + 1` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/stress/tests.sh b/bin/tests/system/stress/tests.sh index 3e61ff9300c..343154ff40a 100644 --- a/bin/tests/system/stress/tests.sh +++ b/bin/tests/system/stress/tests.sh @@ -40,4 +40,4 @@ echo "I:killing reload loop" kill `cat reload.pid` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/stub/tests.sh b/bin/tests/system/stub/tests.sh index 071a5e8b650..c689fc0ccc8 100644 --- a/bin/tests/system/stub/tests.sh +++ b/bin/tests/system/stub/tests.sh @@ -67,4 +67,4 @@ $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || ret=1 done echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/tcp/tests.sh b/bin/tests/system/tcp/tests.sh index 91f0b61f2cf..7aac35dfb34 100644 --- a/bin/tests/system/tcp/tests.sh +++ b/bin/tests/system/tcp/tests.sh @@ -58,4 +58,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 diff --git a/bin/tests/system/tkey/tests.sh b/bin/tests/system/tkey/tests.sh index 94af6f2b08f..3884a5bf431 100644 --- a/bin/tests/system/tkey/tests.sh +++ b/bin/tests/system/tkey/tests.sh @@ -150,4 +150,4 @@ fi status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/tsig/tests.sh b/bin/tests/system/tsig/tests.sh index 156416f9be2..9055ae19c76 100644 --- a/bin/tests/system/tsig/tests.sh +++ b/bin/tests/system/tsig/tests.sh @@ -244,4 +244,5 @@ if [ $ret -eq 1 ] ; then echo "I: failed"; status=1 fi -exit $status +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/tsiggss/tests.sh b/bin/tests/system/tsiggss/tests.sh index 578d17bbac4..fd94eb9b47d 100644 --- a/bin/tests/system/tsiggss/tests.sh +++ b/bin/tests/system/tsiggss/tests.sh @@ -92,4 +92,6 @@ status=`expr $status + $ret` [ $status -eq 0 ] && echo "I:tsiggss tests all OK" kill `cat authsock.pid` -exit $status + +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/unknown/tests.sh b/bin/tests/system/unknown/tests.sh index 55c7ca6db57..4cf669d0ce4 100644 --- a/bin/tests/system/unknown/tests.sh +++ b/bin/tests/system/unknown/tests.sh @@ -196,4 +196,4 @@ status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh index 3d283570f22..f0d0ef03b83 100644 --- a/bin/tests/system/upforwd/tests.sh +++ b/bin/tests/system/upforwd/tests.sh @@ -202,4 +202,4 @@ EOF fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/v6synth/tests.sh b/bin/tests/system/v6synth/tests.sh index c5731e197cd..40fe54e5ebb 100644 --- a/bin/tests/system/v6synth/tests.sh +++ b/bin/tests/system/v6synth/tests.sh @@ -68,4 +68,4 @@ EOF diff good.out dig.out || status=1 echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/verify/tests.sh b/bin/tests/system/verify/tests.sh index 66b705c0566..1581e2f6391 100644 --- a/bin/tests/system/verify/tests.sh +++ b/bin/tests/system/verify/tests.sh @@ -93,4 +93,6 @@ do [ $ret = 0 ] || failed [ $dumpit = 1 ] && cat verify.out.$n done -exit $status + +echo "I:exit status: $status" +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/views/tests.sh b/bin/tests/system/views/tests.sh index b90d7f5edf9..fcdbd092789 100644 --- a/bin/tests/system/views/tests.sh +++ b/bin/tests/system/views/tests.sh @@ -139,4 +139,4 @@ then fi echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/wildcard/tests.sh b/bin/tests/system/wildcard/tests.sh index ac55b843845..c2e71f94035 100644 --- a/bin/tests/system/wildcard/tests.sh +++ b/bin/tests/system/wildcard/tests.sh @@ -151,4 +151,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 diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index 7928d7d9bad..a0bcabdb531 100644 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -422,4 +422,4 @@ if test $tmp != 0 ; then echo "I:failed"; fi status=`expr $status + $tmp` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/xferquota/tests.sh b/bin/tests/system/xferquota/tests.sh index b5e03368f99..ffb90b97021 100644 --- a/bin/tests/system/xferquota/tests.sh +++ b/bin/tests/system/xferquota/tests.sh @@ -68,4 +68,4 @@ grep ";" dig.out.ns2 $PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1 echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/zero/tests.sh b/bin/tests/system/zero/tests.sh index 7dd3d78cb2d..b11f7de8539 100644 --- a/bin/tests/system/zero/tests.sh +++ b/bin/tests/system/zero/tests.sh @@ -58,4 +58,4 @@ if [ $count -ne 7 ] ; then echo "I:failed (count=$count)"; ret=1; fi status=`expr $status + $ret` echo "I:exit status: $status" -exit $status +[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/zonechecks/tests.sh b/bin/tests/system/zonechecks/tests.sh index 9ec7c741cac..7b4c4cecf9e 100644 --- a/bin/tests/system/zonechecks/tests.sh +++ b/bin/tests/system/zonechecks/tests.sh @@ -254,4 +254,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