1 # #-- fwd_bogus.test --#
2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
10 echo "> dig www.example.com."
11 dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
17 if grep "SERVFAIL" outfile; then
24 # now check the cache.
25 $PRE/unbound-control -c ub.conf dump_cache > cachedump
26 if test $? -ne 0; then
27 echo "unbound-control failed"
31 echo "unbound-control ok"
34 # bad cache entry looks like this
35 # msg www.example.com. IN A 32896 1 1252576696 1 1 0 0
38 ttl=`grep "msg www.example.com" cachedump | awk '{print $7}'`
40 # must be smaller than bogus ttl of 60.
41 if test $ttl -gt 61; then
42 echo "failed: TTL too big!"