blob: 1d19e5ca3b22713de34d1f3bdd5a6a303752c216 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# #-- log_servfail.test --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
. ../common.sh
outfile=dig.out
teststep "Check if log-servfail logs to output for iterator error"
dig a.servfail @127.0.0.1 -p $SERVER_PORT > $outfile
if ! grep "SERVFAIL" $outfile
then
cat $outfile
echo "Did not get a SERVFAIL response"
exit 1
fi
if ! grep "SERVFAIL <a\.servfail\. " unbound.log
then
echo "No log-servfail in output"
exit 1
fi
teststep "Enable serve expired"
$PRE/unbound-control -c ub.conf set_option serve-expired: yes
if test $? -ne 0
then
echo "unbound-control command exited with non-zero error code"
exit 1
fi
teststep "Check if log-servfail logs to output for iterator error (with serve-expired)"
dig b.servfail @127.0.0.1 -p $SERVER_PORT > $outfile
if ! grep "SERVFAIL" $outfile
then
cat $outfile
echo "Did not get a SERVFAIL response"
exit 1
fi
if ! grep "SERVFAIL <b\.servfail\. " unbound.log
then
echo "No log-servfail in output"
exit 1
fi
exit 0
|