mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
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.
(cherry picked from commit e611e2044a
)
This commit is contained in:
@@ -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 <yamlget.out.test$n
|
||||
[ "$value" = "30.0 secs" ] || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
|
||||
n=$((n + 1))
|
||||
echo_i "check that Extended DNS Error 0 is printed correctly ($n)"
|
||||
ret=0
|
||||
|
Reference in New Issue
Block a user