~samiam/MaraDNS

ref: 3.5.0021 MaraDNS/deadwood-github/sqa/dwood2rc_n_num_retries/do.test -rwxr-xr-x 825 bytes
ca00f282 — Sam Trenholme MaraDNS release 3.5.0021 9 months ago
                                                                                
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
#!/bin/sh

# Make sure Deadwood works
# NOTE: No startup of MaraDNS because 127.0.0.2 is *supposed* to be
#       non-responsive

cc -o simple.dns simple.dns.c > /dev/null 2>&1

killall deadwood 2> /dev/null
killall maradns 2> /dev/null
killall DwMain 2> /dev/null
sleep 10

for VALUE in 0 1 2 3 ; do

#./simple.dns &
./simple.dns > /dev/null 2>&1 &

cat > dwood2rc << EOF
chroot_dir="$( pwd )"
ipv4_bind_addresses="127.0.0.2"
upstream_servers = {}
upstream_servers["."]="127.0.0.1"
recursive_acl="127.0.0.1/16"
maxprocs=8
timeout_seconds=1
num_retries=${VALUE}
filter_rfc1918 = 0
EOF

../../src/Deadwood -f dwood2rc > /dev/null &
sleep 1
echo num_retries=$VALUE
askmara -t 10 Awww.example.com. 127.0.0.2
sleep 1
killall Deadwood > /dev/null 2>&1
sleep 1

killall simple.dns
sleep 10

done

rm dwood2rc
sleep 1
rm simple.dns