mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 21:20:00 -04:00
Add digdelv system test to check that dig tries other servers on error
Add a test to check whether dig tries the next query/server after
a connection error.
Add a test to check whether dig tries the next query/server after
a one or more (default is 3) connection/request timeouts.
(cherry picked from commit e8a64d0cbe)
This commit is contained in:
parent
992997967b
commit
df7616ec09
1 changed files with 18 additions and 0 deletions
|
|
@ -1014,6 +1014,24 @@ if [ -x "$DIG" ] ; then
|
|||
grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that dig tries the next server after a connection error ($n)"
|
||||
ret=0
|
||||
dig_with_opts -d @10.53.0.99 @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that dig tries the next server after timeouts ($n)"
|
||||
# Ask ans4 to not respond to queries
|
||||
echo "//" | sendcmd 10.53.0.4
|
||||
ret=0
|
||||
dig_with_opts -d @10.53.0.4 @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
else
|
||||
echo_i "$DIG is needed, so skipping these dig tests"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue