mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.20] fix: test: digdelv system test can report more errors than there actually are
Closes #4770 Backport of MR !9104 Merge branch 'backport-4770-digdelv-system-test-can-report-more-errors-than-they-actually-are-9.20' into 'bind-9.20' See merge request isc-projects/bind9!9221
This commit is contained in:
commit
6d06e7e7e5
1 changed files with 10 additions and 0 deletions
|
|
@ -681,6 +681,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that Extended DNS Error 0 is printed correctly ($n)"
|
||||
ret=0
|
||||
# First defined EDE code, additional text "foo".
|
||||
dig_with_opts @10.53.0.3 +ednsopt=ede:0000666f6f a.example +qr >dig.out.test$n 2>&1 || ret=1
|
||||
pat='^; EDE: 0 (Other): (foo)$'
|
||||
|
|
@ -690,6 +691,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that Extended DNS Error 24 is printed correctly ($n)"
|
||||
ret=0
|
||||
# Last defined EDE code, no additional text.
|
||||
dig_with_opts @10.53.0.3 +ednsopt=ede:0018 a.example +qr >dig.out.test$n 2>&1 || ret=1
|
||||
pat='^; EDE: 24 (Invalid Data)$'
|
||||
|
|
@ -699,6 +701,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that Extended DNS Error 25 is printed correctly ($n)"
|
||||
ret=0
|
||||
# First undefined EDE code, additional text "foo".
|
||||
dig_with_opts @10.53.0.3 +ednsopt=ede:0019666f6f a.example +qr >dig.out.test$n 2>&1 || ret=1
|
||||
pat='^; EDE: 25: (foo)$'
|
||||
|
|
@ -708,6 +711,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that invalid Extended DNS Error (length 0) is printed ($n)"
|
||||
ret=0
|
||||
# EDE payload is too short
|
||||
dig_with_opts @10.53.0.3 +ednsopt=ede a.example +qr >dig.out.test$n 2>&1 || ret=1
|
||||
pat='^; EDE:$'
|
||||
|
|
@ -717,6 +721,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that invalid Extended DNS Error (length 1) is printed ($n)"
|
||||
ret=0
|
||||
# EDE payload is too short
|
||||
dig_with_opts @10.53.0.3 +ednsopt=ede:00 a.example +qr >dig.out.test$n 2>&1 || ret=1
|
||||
pat='^; EDE: 00 (".")$'
|
||||
|
|
@ -727,6 +732,7 @@ if [ -x "$DIG" ]; then
|
|||
if [ $HAS_PYYAML -ne 0 ]; then
|
||||
n=$((n + 1))
|
||||
echo_i "check that +yaml Extended DNS Error 0 is printed correctly ($n)"
|
||||
ret=0
|
||||
# First defined EDE code, additional text "foo".
|
||||
dig_with_opts @10.53.0.3 +yaml +ednsopt=ede:0000666f6f 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 EDE INFO-CODE >yamlget.out.test$n 2>&1 || ret=1
|
||||
|
|
@ -740,6 +746,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that +yaml Extended DNS Error 24 is printed correctly ($n)"
|
||||
ret=0
|
||||
# Last defined EDE code, no additional text.
|
||||
dig_with_opts @10.53.0.3 +yaml +ednsopt=ede:0018 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 EDE INFO-CODE >yamlget.out.test$n 2>&1 || ret=1
|
||||
|
|
@ -751,6 +758,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that +yaml Extended DNS Error 25 is printed correctly ($n)"
|
||||
ret=0
|
||||
# First undefined EDE code, additional text "foo".
|
||||
dig_with_opts @10.53.0.3 +yaml +ednsopt=ede:0019666f6f 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 EDE INFO-CODE >yamlget.out.test$n 2>&1 || ret=1
|
||||
|
|
@ -764,6 +772,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that invalid Extended DNS Error (length 0) is printed ($n)"
|
||||
ret=0
|
||||
# EDE payload is too short
|
||||
dig_with_opts @10.53.0.3 +yaml +ednsopt=ede 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 EDE >yamlget.out.test$n 2>&1 || ret=1
|
||||
|
|
@ -774,6 +783,7 @@ if [ -x "$DIG" ]; then
|
|||
|
||||
n=$((n + 1))
|
||||
echo_i "check that invalid +yaml Extended DNS Error (length 1) is printed ($n)"
|
||||
ret=0
|
||||
# EDE payload is too short
|
||||
dig_with_opts @10.53.0.3 +yaml +ednsopt=ede:00 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 EDE >yamlget.out.test$n 2>&1 || ret=1
|
||||
|
|
|
|||
Loading…
Reference in a new issue