diff --git a/bin/tests/system/resolver/ns4/tld2.db b/bin/tests/system/resolver/ns4/tld2.db index 2d8f428cb9..45dc6943a5 100644 --- a/bin/tests/system/resolver/ns4/tld2.db +++ b/bin/tests/system/resolver/ns4/tld2.db @@ -21,9 +21,9 @@ $TTL 300 ns A 10.53.0.4 fetch.tld. NS ns.fetch.tld. ns.fetch.tld. A 10.53.0.6 -fetchall 10 TXT A short ttl fetchall 10 A 1.2.3.4 -fetchall 10 AAAA ::1 +fetchall 10 AAAA ::1 +fetchall 10 TXT A short ttl no-edns-version.tld. NS ns.no-edns-version.tld. ns.no-edns-version.tld. A 10.53.0.6 edns-version.tld. NS ns.edns-version.tld. diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 3862db6492..78fa92c617 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -444,8 +444,12 @@ sleep "${ttl1:-0}" dig_with_opts @10.53.0.5 fetchall.tld any > dig.out.2.${n} || ret=1 ttl2=$(awk '/"A" "short" "ttl"/ { print $2 }' dig.out.2.${n}) sleep 1 -# check that the nameserver is still alive +# check that prefetch occurred; +# note that only one record is prefetched, which is the TXT record in this case, +# because of the order of the records in the cache dig_with_opts @10.53.0.5 fetchall.tld any > dig.out.3.${n} || ret=1 +ttl3=$(awk '/"A" "short" "ttl"/ { print $2 }' dig.out.3.${n}) +test "${ttl3:-0}" -gt "${ttl2:-1}" || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret))