spin waiting for prototype dig responses

This commit is contained in:
Mark Andrews
2020-02-12 13:54:17 +11:00
parent de16ce0581
commit c38752b07c

View File

@@ -433,6 +433,24 @@ EOF
sleep 2
}
#
# generate prototype NXDOMAIN response to compare against.
#
make_proto_nxdomain() {
digcmd nonexistent @$ns2 >proto.nxdomain || return 1
grep "status: NXDOMAIN" proto.nxdomain >/dev/null || return 1
return 0
}
#
# generate prototype NODATA response to compare against.
#
make_proto_nodata() {
digcmd txt-only.tld2 @$ns2 >proto.nodata || return 1
grep "status: NOERROR" proto.nodata >/dev/null || return 1
return 0
}
for mode in native dnsrps; do
status=0
case ${mode} in
@@ -472,8 +490,8 @@ for mode in native dnsrps; do
esac
# make prototype files to check against rewritten results
digcmd nonexistent @$ns2 >proto.nxdomain
digcmd txt-only.tld2 @$ns2 >proto.nodata
retry_quiet 10 make_proto_nxdomain
retry_quiet 10 make_proto_nodata
start_group "QNAME rewrites" test1
nochange . # 1 do not crash or rewrite root