]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Adjusted dig system tests
authorDiego Fronza <diego@isc.org>
Tue, 16 Feb 2021 15:36:45 +0000 (12:36 -0300)
committerDiego Fronza <diego@isc.org>
Thu, 25 Mar 2021 17:08:40 +0000 (14:08 -0300)
Now that premature EOF on tcp connections take +tries and +retry into
account, the dig system tests handling TCP EOF with +tries=1 were
expecting dig to do a second attempt in handling the tcp query, which
doesn't happen anymore.

To make the test work as expected +tries value was adjusted to 2, to
make it behave as before after the new update on dig.

bin/tests/system/digdelv/tests.sh

index 299d396b208ad43d5086111a75f50e72dc77c505..f0f1f4fa2e31bc89f01f1d53ff25811fe9b4f808 100644 (file)
@@ -801,7 +801,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (immediate -> immediate) ($n)"
   ret=0
   echo "no_response no_response" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 && ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 && ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 2 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
@@ -811,7 +811,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (partial AXFR -> partial AXFR) ($n)"
   ret=0
   echo "partial_axfr partial_axfr" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 && ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 && ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 2 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
@@ -821,7 +821,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (immediate -> partial AXFR) ($n)"
   ret=0
   echo "no_response partial_axfr" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 && ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 && ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 2 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
@@ -831,7 +831,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (partial AXFR -> immediate) ($n)"
   ret=0
   echo "partial_axfr no_response" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 && ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 && ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 2 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
@@ -841,7 +841,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (immediate -> complete AXFR) ($n)"
   ret=0
   echo "no_response complete_axfr" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 || ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 || ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 1 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
@@ -851,7 +851,7 @@ if [ -x "$DIG" ] ; then
   echo_i "checking exit code for a retry upon TCP EOF (partial AXFR -> complete AXFR) ($n)"
   ret=0
   echo "partial_axfr complete_axfr" | sendcmd 10.53.0.5
-  dig_with_opts @10.53.0.5 example AXFR +tries=1 > dig.out.test$n 2>&1 || ret=1
+  dig_with_opts @10.53.0.5 example AXFR +tries=2 > dig.out.test$n 2>&1 || ret=1
   # Sanity check: ensure ans5 behaves as expected.
   [ `grep "communications error.*end of file" dig.out.test$n | wc -l` -eq 1 ] || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi