From 5a46ade68c7599aa8de7ea5bad4e33e226f284cc Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 30 Oct 2024 13:18:49 +1100 Subject: [PATCH] Check EDNS CLIENT-TAG and EDNS SERVER-TAG emitted YAML Check that when a EDNS CLIENT-TAG or EDNS SERVER-TAG option is present in the message that the emitted YAML is valid. --- bin/tests/system/digdelv/tests.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 084e3e4e63..974a1dd326 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -727,6 +727,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