]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
End dupsigs test early if it fails
authorTom Krizek <tkrizek@isc.org>
Mon, 13 Mar 2023 14:16:35 +0000 (15:16 +0100)
committerTom Krizek <tkrizek@isc.org>
Wed, 22 Mar 2023 13:26:10 +0000 (14:26 +0100)
There's no point in continuing the dupsigs test if a failure is
detected. End the test early to avoid wasting time and resources.

(cherry picked from commit ad647dca13216a886be8803c9fd46307ad3aabdf)

bin/tests/system/dupsigs/tests.sh

index dadb2477ac3501a43cbccc91e31dad00a04263d7..cca6734fdd0c368efe2ffe0460184cbb001252c7 100644 (file)
@@ -31,13 +31,14 @@ fully_signed () {
              $4 == "RRSIG" {lines++}
              END { if (lines != 1009) exit(1) }' < "dig.out.ns1.axfr"
 }
-retry_quiet 30 fully_signed || ret=1
+retry_quiet 30 fully_signed || status=1
+if [ $status != 0 ]; then echo_i "failed"; fi
 
 start=`date +%s`
 now=$start
 end=$((start + 140))
 
-while [ $now -lt $end ]; do
+while [ $now -lt $end ] && [ $status -eq 0 ]; do
         et=$((now - start))
        echo_i "............... $et ............"
        $JOURNALPRINT ns1/signing.test.db.signed.jnl | $PERL check_journal.pl | cat_i