From: Tom Krizek Date: Mon, 26 Jun 2023 14:46:27 +0000 (+0200) Subject: Only use delv if available in mkeys test X-Git-Tag: v9.16.43~16^2~2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bd9dabc0c34f1ea1162cc1d6922960a16fe54719;p=thirdparty%2Fbind9.git Only use delv if available in mkeys test Check that $DELV is an executable before using it in a test. (cherry picked from commit 384339dbba6e262e734095f7ea2c39ab7771fedb) --- diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index b11ded3bd9e..c81058ff849 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -112,15 +112,17 @@ grep "example..*.RRSIG..*TXT" dig.out.ns2.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) -n=$((n+1)) -ret=0 -echo_i "check positive validation using delv ($n)" -delv_with_opts @10.53.0.1 txt example > delv.out$n || ret=1 -grep "; fully validated" delv.out$n > /dev/null || ret=1 # redundant -grep "example..*TXT.*This is a test" delv.out$n > /dev/null || ret=1 -grep "example..*.RRSIG..*TXT" delv.out$n > /dev/null || ret=1 -if [ $ret != 0 ]; then echo_i "failed"; fi -status=$((status+ret)) +if [ -x "$DELV" ]; then + n=$((n+1)) + ret=0 + echo_i "check positive validation using delv ($n)" + delv_with_opts @10.53.0.1 txt example > delv.out$n || ret=1 + grep "; fully validated" delv.out$n > /dev/null || ret=1 # redundant + grep "example..*TXT.*This is a test" delv.out$n > /dev/null || ret=1 + grep "example..*.RRSIG..*TXT" delv.out$n > /dev/null || ret=1 + if [ $ret != 0 ]; then echo_i "failed"; fi + status=$((status+ret)) +fi n=$((n+1)) echo_i "check for failed validation due to wrong key in managed-keys ($n)"