]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix failing grep invocation on OpenBSD
authorMichal Nowak <mnowak@isc.org>
Tue, 18 Mar 2025 15:00:53 +0000 (16:00 +0100)
committerMark Andrews <marka@isc.org>
Tue, 18 Mar 2025 23:29:22 +0000 (23:29 +0000)
Lines starting with A or NSEC are expected but not matched with the
OpenBSD grep. Extended regular expressions with direct use of
parentheses and the pipe symbol is more appropriate.

    I:checking RRSIG query from cache (154)
    I:failed

bin/tests/system/dnssec/tests.sh

index 09c8be1250bdb4c01cfb516c35f19368e0e89807..861673394277000890e922b8d595a6057c3fb698 100644 (file)
@@ -2191,7 +2191,7 @@ echo_i "checking RRSIG query from cache ($n)"
 ret=0
 dig_with_opts normalthenrrsig.secure.example. @10.53.0.4 a >/dev/null || ret=1
 ans=$(dig_with_opts +short normalthenrrsig.secure.example. @10.53.0.4 rrsig) || ret=1
-expect=$(dig_with_opts +short normalthenrrsig.secure.example. @10.53.0.3 rrsig | grep '^\(A\|NSEC\)') || ret=1
+expect=$(dig_with_opts +short normalthenrrsig.secure.example. @10.53.0.3 rrsig | grep -E '^(A|NSEC)') || ret=1
 test "$ans" = "$expect" || ret=1
 # also check that RA is set
 dig_with_opts normalthenrrsig.secure.example. @10.53.0.4 rrsig >dig.out.ns4.test$n || ret=1