From 0d3fba1448ab7bbc51697ad16ca0902f1b825007 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 14 Jun 2016 13:48:39 +1000 Subject: [PATCH] do not overflow exit status. [RT #42643] (cherry picked from commit 3635d8f9104e70e141a8f191a0e6c1502ceed2f3) --- bin/tests/system/acl/tests.sh | 2 +- bin/tests/system/additional/tests.sh | 3 ++- bin/tests/system/addzone/tests.sh | 2 +- bin/tests/system/allow_query/tests.sh | 3 +-- bin/tests/system/autosign/tests.sh | 2 +- bin/tests/system/builtin/tests.sh | 3 ++- bin/tests/system/cacheclean/tests.sh | 2 +- bin/tests/system/case/tests.sh | 2 +- bin/tests/system/checkconf/tests.sh | 2 +- bin/tests/system/checkds/tests.sh | 2 +- bin/tests/system/checknames/tests.sh | 3 ++- bin/tests/system/checkzone/tests.sh | 2 +- bin/tests/system/coverage/tests.sh | 2 +- bin/tests/system/database/tests.sh | 2 +- bin/tests/system/dialup/tests.sh | 2 +- bin/tests/system/digdelv/clean.sh | 2 +- bin/tests/system/digdelv/tests.sh | 3 ++- bin/tests/system/dlv/tests.sh | 2 +- bin/tests/system/dlvauto/tests.sh | 3 ++- bin/tests/system/dlz/tests.sh | 2 +- bin/tests/system/dlzexternal/tests.sh | 3 ++- bin/tests/system/dname/tests.sh | 2 +- bin/tests/system/dns64/tests.sh | 2 +- bin/tests/system/dnssec/tests.sh | 2 +- bin/tests/system/dscp/tests.sh | 4 +++- bin/tests/system/dsdigest/tests.sh | 2 +- bin/tests/system/ecdsa/tests.sh | 2 +- bin/tests/system/ednscompliance/tests.sh | 2 +- bin/tests/system/emptyzones/tests.sh | 3 ++- bin/tests/system/fetchlimit/tests.sh | 2 +- bin/tests/system/filter-aaaa/tests.sh | 2 +- bin/tests/system/formerr/tests.sh | 2 +- bin/tests/system/forward/tests.sh | 2 +- bin/tests/system/geoip/tests.sh | 2 +- bin/tests/system/glue/tests.sh | 2 +- bin/tests/system/gost/tests.sh | 2 +- bin/tests/system/inline/tests.sh | 3 ++- bin/tests/system/ixfr/tests.sh | 2 +- bin/tests/system/legacy/tests.sh | 2 +- bin/tests/system/limits/tests.sh | 2 +- bin/tests/system/logfileconfig/tests.sh | 2 +- bin/tests/system/lwresd/tests.sh | 2 +- bin/tests/system/masterfile/tests.sh | 2 +- bin/tests/system/masterformat/tests.sh | 2 +- bin/tests/system/metadata/tests.sh | 2 +- bin/tests/system/notify/tests.sh | 2 +- bin/tests/system/nslookup/tests.sh | 3 +-- bin/tests/system/nsupdate/tests.sh | 2 +- bin/tests/system/pending/tests.sh | 2 +- bin/tests/system/pkcs11/tests.sh | 2 +- bin/tests/system/pkcs11ssl/tests.sh | 2 +- bin/tests/system/reclimit/tests.sh | 2 +- bin/tests/system/redirect/tests.sh | 2 +- bin/tests/system/resolver/tests.sh | 3 ++- bin/tests/system/rndc/tests.sh | 2 +- bin/tests/system/rpz/tests.sh | 2 +- bin/tests/system/rpzrecurse/tests.sh | 3 ++- bin/tests/system/rrchecker/tests.sh | 2 +- bin/tests/system/rrl/tests.sh | 5 ++--- bin/tests/system/rrsetorder/tests.sh | 2 +- bin/tests/system/rsabigexponent/tests.sh | 2 +- bin/tests/system/sit/tests.sh | 2 +- bin/tests/system/smartsign/tests.sh | 2 +- bin/tests/system/sortlist/tests.sh | 2 +- bin/tests/system/spf/tests.sh | 2 +- bin/tests/system/staticstub/tests.sh | 2 +- bin/tests/system/statistics/tests.sh | 2 +- bin/tests/system/statschannel/tests.sh | 2 +- bin/tests/system/stress/tests.sh | 2 +- bin/tests/system/stub/tests.sh | 2 +- bin/tests/system/tkey/tests.sh | 2 +- bin/tests/system/tsig/tests.sh | 3 ++- bin/tests/system/tsiggss/tests.sh | 4 +++- bin/tests/system/unknown/tests.sh | 2 +- bin/tests/system/upforwd/tests.sh | 2 +- bin/tests/system/v6synth/tests.sh | 2 +- bin/tests/system/verify/tests.sh | 4 +++- bin/tests/system/views/tests.sh | 2 +- bin/tests/system/wildcard/tests.sh | 2 +- bin/tests/system/xfer/tests.sh | 2 +- bin/tests/system/xferquota/tests.sh | 2 +- bin/tests/system/zero/tests.sh | 2 +- bin/tests/system/zonechecks/tests.sh | 2 +- 83 files changed, 101 insertions(+), 87 deletions(-) diff --git a/bin/tests/system/acl/tests.sh b/bin/tests/system/acl/tests.sh index b74c0c9f9f..2c49e890f3 100644 --- a/bin/tests/system/acl/tests.sh +++ b/bin/tests/system/acl/tests.sh @@ -151,4 +151,4 @@ $DIG +tcp soa example. \ grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || { 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 70ebbe5505..882b82be7a 100644 --- a/bin/tests/system/additional/tests.sh +++ b/bin/tests/system/additional/tests.sh @@ -118,4 +118,5 @@ echo "I:testing with 'minimal-responses no;'" minimal=no dotests -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 a516e2a682..155c78e955 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -320,4 +320,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 0592c342d4..afb630f37c 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 6b6ddb7641..6866fc0c06 100644 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -1171,4 +1171,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 b51cf450f2..8c1aea3990 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 539550fd99..7c0dbe0b7c 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 2c08d16878..a80cedd2aa 100644 --- a/bin/tests/system/case/tests.sh +++ b/bin/tests/system/case/tests.sh @@ -58,4 +58,4 @@ test $ret -eq 0 || echo "I:failed" 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 20d6405ed6..91f8401724 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -288,4 +288,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 5fb1f65b45..f6ab8fbc34 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 2b4f07c667..e350d1eee2 100644 --- a/bin/tests/system/checknames/tests.sh +++ b/bin/tests/system/checknames/tests.sh @@ -147,4 +147,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 d5a04d2c4a..f391aff631 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/coverage/tests.sh b/bin/tests/system/coverage/tests.sh index 099bdefabd..228ab8aacb 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 8540617260..bec9112c5e 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 40da054227..bcbc71873a 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 0f442fb59e..115fb0b4c6 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 b3cfeb20b8..9d2017cc46 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -307,7 +307,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 e3ba63713f..0155ccf683 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 cd9030e1fc..258cca3bb4 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 c4df4fab49..101e4ce46e 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 9242baf35f..db6f34b434 100644 --- a/bin/tests/system/dlzexternal/tests.sh +++ b/bin/tests/system/dlzexternal/tests.sh @@ -166,4 +166,5 @@ grep "status: SERVFAIL" dig.out.ns1.7 > /dev/null || ret=1 [ "$ret" -eq 0 ] || echo "I:failed" 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 d22f54b63d..a451e0fd98 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 26808d9b73..fc4bb59a74 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 5475fd3c4b..eb80ba3be6 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -2866,4 +2866,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 22d1ab2b1e..56ac889682 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 67b0b2f11b..7d8877a2fa 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/ecdsa/tests.sh b/bin/tests/system/ecdsa/tests.sh index 349e0f30a2..8834d9fce3 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 37b26d4168..c152262f35 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 98183d3aa6..9ded980448 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 bf3c63c44b..fa8f5dc9fb 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 c1c866fd9f..b229fff35c 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 ea6aca53ed..6a30d00684 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 37878da79e..bec8a1f983 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 654caa94a9..33154b0305 100644 --- a/bin/tests/system/geoip/tests.sh +++ b/bin/tests/system/geoip/tests.sh @@ -325,4 +325,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 e9d465fdb6..1b4ec6ffe7 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 80093ca050..a554752eda 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 f0c96ac955..7d8569da83 100755 --- a/bin/tests/system/inline/tests.sh +++ b/bin/tests/system/inline/tests.sh @@ -889,4 +889,5 @@ $IMPORTKEY -f import.key import.example > /dev/null 2>&1 || 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/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index 4ba85a90fb..d4cc78935e 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/legacy/tests.sh b/bin/tests/system/legacy/tests.sh index b9e2ccdb92..fab543f2f0 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 d5296ecf2d..f521c584cc 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 3c4f52241f..5721987701 100644 --- a/bin/tests/system/logfileconfig/tests.sh +++ b/bin/tests/system/logfileconfig/tests.sh @@ -228,4 +228,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 66cba38e7b..f8647c742d 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 d7f393423b..3f221b692c 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 a39fe57f32..434d1d5844 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -276,4 +276,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 28d5ac5740..4e5ce61d7a 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/notify/tests.sh b/bin/tests/system/notify/tests.sh index 4613345126..1c13a112e7 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -201,4 +201,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 d77afd9fec..426053f6e6 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 78d501e086..3720f8e1ab 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -582,4 +582,4 @@ if [ $ret -ne 0 ]; then fi 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 614db4c84a..d298fcb898 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/pkcs11/tests.sh b/bin/tests/system/pkcs11/tests.sh index 047c79b8b4..8eb72e1bfb 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 c22dc4fe1a..9c45f09249 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 a9f7776cb6..ada810367a 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 dd8dadc850..88ae867911 100644 --- a/bin/tests/system/redirect/tests.sh +++ b/bin/tests/system/redirect/tests.sh @@ -364,4 +364,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 5160615222..fcf789b226 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -661,5 +661,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 889fe0de79..7e07267801 100644 --- a/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh @@ -394,4 +394,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/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index fe22153d2e..597b2c8904 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 e3591cb85f..9c3969e5fc 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -289,4 +289,5 @@ grep "status: NOERROR" dig.out.${t}.2 > /dev/null || { status=1 } -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 9d47c23c8e..e74c673fa5 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 2659ca065f..cc73fd5d97 100644 --- a/bin/tests/system/rrl/tests.sh +++ b/bin/tests/system/rrl/tests.sh @@ -253,6 +253,5 @@ ckstats final truncated 23 echo "I:exit status: $ret" -# exit $ret -[ $ret -ne 0 ] && echo "I:test failure overridden" -exit 0 +#[ $status -eq 0 ] || exit 1 +[ $ret -eq 0 ] || echo "I:test failure overridden" diff --git a/bin/tests/system/rrsetorder/tests.sh b/bin/tests/system/rrsetorder/tests.sh index 80dd5b6564..eb8ad32555 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 ef7d18c789..9bd02c59d1 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/sit/tests.sh b/bin/tests/system/sit/tests.sh index 307e88d7e5..e6c33609e6 100755 --- a/bin/tests/system/sit/tests.sh +++ b/bin/tests/system/sit/tests.sh @@ -114,4 +114,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 041bb411bf..0dcf32eb0d 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 c878dcafc7..668042f749 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 ba8ddd4239..ba71a7d95b 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 edb2aa5f48..d2595f2deb 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 16bb874a00..46e4862ee7 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -117,4 +117,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 6950c17bec..c6e7fa6d48 100644 --- a/bin/tests/system/statschannel/tests.sh +++ b/bin/tests/system/statschannel/tests.sh @@ -85,4 +85,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 3e61ff9300..343154ff40 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 071a5e8b65..c689fc0ccc 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/tkey/tests.sh b/bin/tests/system/tkey/tests.sh index 94af6f2b08..3884a5bf43 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 156416f9be..9055ae19c7 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 578d17bbac..fd94eb9b47 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 55c7ca6db5..4cf669d0ce 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 3d283570f2..f0d0ef03b8 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 c5731e197c..40fe54e5eb 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 66b705c056..1581e2f639 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 b90d7f5edf..fcdbd09278 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 ac55b84384..c2e71f9403 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 52541e141f..dcc52b6a50 100644 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -392,4 +392,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 b5e03368f9..ffb90b9702 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 7dd3d78cb2..b11f7de853 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 9ec7c741ca..7b4c4cecf9 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