From: Mark Andrews Date: Tue, 7 Feb 2023 01:08:31 +0000 (+1100) Subject: Allow some time to the root trust anchor to appear X-Git-Tag: v9.19.11~88^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71dbd09796026cad03daf7652ccfd8735fdc1513;p=thirdparty%2Fbind9.git Allow some time to the root trust anchor to appear Following deleting the root trust anchor and reconfiguring the server it takes some time to for trust anchor to appear in 'rndc managed-keys status' output. Retry several times. --- diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index eb181bed405..295034d2ab6 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -679,8 +679,12 @@ rndccmd 10.53.0.2 managed-keys destroy | sed 's/^/ns2 /' | cat_i mkeys_status_on 2 > rndc.out.1.$n 2>&1 || ret=1 grep "no views with managed keys" rndc.out.1.$n > /dev/null || ret=1 mkeys_reconfig_on 2 || ret=1 -mkeys_status_on 2 > rndc.out.2.$n 2>&1 || ret=1 -grep "name: \." rndc.out.2.$n > /dev/null || ret=1 +check_root_trust_anchor_is_present_in_status() { + mkeys_status_on 2 > rndc.out.2.$n 2>&1 || return 1 + grep "name: \." rndc.out.2.$n > /dev/null || return 1 + return 0 +} +retry_quiet 5 check_root_trust_anchor_is_present_in_status || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret))