]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Retry multiple times in doth test when checking if the zone file exists
authorAram Sargsyan <aram@isc.org>
Tue, 7 Mar 2023 14:12:10 +0000 (14:12 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 9 Mar 2023 10:40:43 +0000 (10:40 +0000)
Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

(cherry picked from commit 5d5d4b523be029b4781fc53c3c95143d783db39f)

bin/tests/system/doth/tests.sh

index 08c51869559a5d2cab52ab1eced0f2692fed79b7..eb631319c95f54c6d58f1d9cfc46f26eab158b15 100644 (file)
@@ -122,7 +122,7 @@ n=$((n + 1))
 echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via implicit IP) ($n)"
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example4; then
-       test -f "ns2/example4.db" || ret=1
+       retry_quiet 5 test -f "ns2/example4.db" || ret=1
 else
        echo_i "timed out waiting for zone transfer"
        grep "^;" "dig.out.ns2.example4.test$n" | cat_i
@@ -135,7 +135,7 @@ n=$((n + 1))
 echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via specified IPv4) ($n)"
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example5; then
-       test -f "ns2/example5.db" || ret=1
+       retry_quiet 5 test -f "ns2/example5.db" || ret=1
 else
        echo_i "timed out waiting for zone transfer"
        grep "^;" "dig.out.ns2.example5.test$n" | cat_i
@@ -148,7 +148,7 @@ n=$((n + 1))
 echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via specified IPv6) ($n)"
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example6; then
-       test -f "ns2/example6.db" || ret=1
+       retry_quiet 5 test -f "ns2/example6.db" || ret=1
 else
        echo_i "timed out waiting for zone transfer"
        grep "^;" "dig.out.ns2.example6.test$n" | cat_i
@@ -183,7 +183,7 @@ n=$((n + 1))
 echo_i "testing incoming XoT functionality (from the first secondary, MutualTLS) ($n)"
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example9; then
-       test -f "ns2/example9.db" || ret=1
+       retry_quiet 5 test -f "ns2/example9.db" || ret=1
 else
        echo_i "timed out waiting for zone transfer"
        grep "^;" "dig.out.ns2.example9.test$n" | cat_i