From: Mark Andrews Date: Wed, 30 Oct 2024 02:18:49 +0000 (+1100) Subject: Check EDNS CLIENT-TAG and SERVER-TAG are emitted using valid YAML X-Git-Tag: v9.21.8~16^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2efb15b54ad483ec2d7c4206d462730e38718e4b;p=thirdparty%2Fbind9.git Check EDNS CLIENT-TAG and SERVER-TAG are emitted using valid YAML Check that when an EDNS CLIENT-TAG or EDNS SERVER-TAG 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 aed37b6fa58..bd0afa93015 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -733,6 +733,18 @@ if [ -x "$DIG" ]; then 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 +ednsopt=client-tag:value +yaml ($n)" + ret=0 + dig_with_opts @10.53.0.3 +yaml +ednsopt=client-tag:0001 a.example +qr >dig.out.test$n 2>&1 || ret=1 + $PYTHON yamlget.py dig.out.test$n 0 message query_message_data OPT_PSEUDOSECTION EDNS CLIENT-TAG >yamlget.out.test$n 2>&1 || ret=1 + read -r value dig.out.test$n 2>&1 || ret=1 + $PYTHON yamlget.py dig.out.test$n 0 message query_message_data OPT_PSEUDOSECTION EDNS SERVER-TAG >yamlget.out.test$n 2>&1 || ret=1 + read -r value