From: Diego Fronza Date: Tue, 16 Feb 2021 15:36:45 +0000 (-0300) Subject: Adjusted dig system tests X-Git-Tag: v9.17.12~24^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6808960037ba272f385256679623d0d8dea88cb;p=thirdparty%2Fbind9.git Adjusted dig system tests 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. --- diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 299d396b208..f0f1f4fa2e3 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -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