From: Mark Andrews Date: Wed, 30 Oct 2024 02:11:06 +0000 (+1100) Subject: Check EDNS EXPIRE option is emitted using valid YAML X-Git-Tag: v9.21.8~16^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e611e2044a5a79308edbe6257166411973210e45;p=thirdparty%2Fbind9.git Check EDNS EXPIRE option is emitted using valid YAML Check that when an EDNS EXPIRE option is present in the message, the emitted YAML is valid. --- diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 0d6bb0c02ce..aed37b6fa58 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -819,6 +819,26 @@ if [ -x "$DIG" ]; then status=$((status + ret)) fi + n=$((n + 1)) + echo_i "check that dig processes +keepalive ($n)" + ret=0 + dig_with_opts @10.53.0.1 +keepalive . soa +tcp >dig.out.test$n 2>&1 || ret=1 + grep '; TCP-KEEPALIVE: 30.0 secs' dig.out.test$n >/dev/null || ret=1 + if [ $ret -ne 0 ]; then echo_i "failed"; fi + status=$((status + ret)) + + if [ $HAS_PYYAML -ne 0 ]; then + n=$((n + 1)) + echo_i "check that dig processes +keepalive +yaml ($n)" + ret=0 + dig_with_opts @10.53.0.1 +yaml +keepalive . soa +tcp >dig.out.test$n 2>&1 || ret=1 + $PYTHON yamlget.py dig.out.test$n 0 message response_message_data OPT_PSEUDOSECTION EDNS TCP-KEEPALIVE >yamlget.out.test$n 2>&1 || ret=1 + read -r value