From: Mark Andrews Date: Sat, 14 Jun 2025 02:38:59 +0000 (+1000) Subject: Fix "sending packet from" test X-Git-Tag: v9.21.10~50^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4367106d2fcd30346ba57360f34f8be238b8af68;p=thirdparty%2Fbind9.git Fix "sending packet from" test The specific address is not always available. --- diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 190561e6102..99cd26b6408 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -1832,8 +1832,8 @@ if [ -x "$DELV" ]; then echo_i "checking delv +ns uses both address families ($n)" ret=0 delv_with_opts -a ns1/anchor.dnskey +root +ns +hint=root.hint a a.example >delv.out.test$n || ret=1 - grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null || ret=1 - grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null || ret=1 + grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1 + grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -1841,8 +1841,8 @@ if [ -x "$DELV" ]; then echo_i "checking delv -4 +ns uses only IPv4 ($n)" ret=0 delv_with_opts -a ns1/anchor.dnskey +root -4 +ns +hint=root.hint a a.example >delv.out.test$n || ret=1 - grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null || ret=1 - grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null && ret=1 + grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1 + grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null && ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -1850,8 +1850,8 @@ if [ -x "$DELV" ]; then echo_i "checking delv -6 +ns uses only IPv6 ($n)" ret=0 delv_with_opts -a ns1/anchor.dnskey +root -6 +ns +hint=root.hint a a.example >delv.out.test$n || ret=1 - grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null && ret=1 - grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null || ret=1 + grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null && ret=1 + grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) fi