- Use 127.0.0.1 explicitly in tests to avoid delays and errors on newer

systems.
This commit is contained in:
Yorgos Thessalonikefs 2023-11-24 15:26:35 +01:00
parent 197bf15402
commit 15a9b0f2be
36 changed files with 123 additions and 119 deletions

View File

@ -1,3 +1,7 @@
24 November 2023: Yorgos
- Use 127.0.0.1 explicitly in tests to avoid delays and errors on
newer systems.
9 November 2023: Wouter
- Fix unit test parse of origin syntax.

View File

@ -7,35 +7,35 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
echo "> cat logfiles"
cat fwd.log

View File

@ -8,35 +8,35 @@ PRE="../.."
. ../common.sh
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
echo "> cat logfiles"
cat petal.log

View File

@ -8,35 +8,35 @@ PRE="../.."
# do the test
TARGET=ns1.blanks.example.com.
echo "> dig $TARGET"
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
echo "> cat logfiles"
cat unbound.log

View File

@ -8,35 +8,35 @@ PRE="../.."
# do the test
TARGET=ns1.blanks.example.com.
echo "> dig $TARGET"
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT $TARGET | tee outfile
fi
echo "> cat logfiles"
cat petal.log

View File

@ -13,7 +13,7 @@ get_ldns_testns
# query for a text record that is stored by unbound's cache and cachedb
# in the testframe cache.
echo "> dig txt1.example.com."
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "example text message" outfile; then
echo "OK"
else
@ -31,7 +31,7 @@ echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
wait_ldns_testns_up fwd2.log
echo "> dig txt1.example.com. from unbound cache"
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "example text message" outfile; then
echo "OK"
else
@ -50,7 +50,7 @@ else
fi
echo "> dig txt1.example.com. from cachedb"
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "example text message" outfile; then
echo "OK"
else
@ -84,7 +84,7 @@ wait_unbound_up unbound2.log
echo ""
echo "> dig txt1.example.com."
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "example text message" outfile; then
echo "OK"
else
@ -102,7 +102,7 @@ echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
wait_ldns_testns_up fwd4.log
echo "> dig txt1.example.com. from unbound cache"
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "example text message" outfile; then
echo "OK"
else
@ -121,7 +121,7 @@ else
fi
echo "> dig txt1.example.com. from cachedb, but that has no message stored"
dig @localhost -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT txt1.example.com. TXT | tee outfile
if grep "SERVFAIL" outfile; then
echo "OK"
else

View File

@ -8,7 +8,7 @@ PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
echo "> cat logfiles"
cat fwd.log
cat fwd2.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT wwwabcdefghijklmnopqrstuvwxyzwww.example.com | tee outfile
echo "> cat logfiles"
cat fwd.log
cat fwd2.log

View File

@ -10,7 +10,7 @@ PRE="../.."
# First the nasty name.
# The server should not have performed EDNS fallback and cached it.
echo "> dig nasty.example.com."
dig @localhost -p $UNBOUND_PORT nasty.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT nasty.example.com. | tee outfile
# no answer possible for it.
echo "> check backed-off"
@ -27,7 +27,7 @@ fi
# Then the www name.
# See if we can still get the EDNS data.
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -10,7 +10,7 @@ PRE="../.."
# First the nasty name.
# The server should not have performed EDNS fallback and cached it.
echo "> dig nasty.example.com."
dig @localhost -p $UNBOUND_PORT nasty.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT nasty.example.com. | tee outfile
# no answer possible for it.
echo "> check no-answer"
@ -27,7 +27,7 @@ fi
# Then the www name.
# See if we can still get the EDNS data.
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -11,7 +11,7 @@ PRE="../.."
# so that all three queries get timeouts during the later test.
#
#echo "> dig www1.example.com."
#dig @localhost -p $UNBOUND_PORT www1.example.com. | tee outfile
#dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. | tee outfile
#echo "> cat logfiles"
#cat fwd.log
#cat unbound.log
@ -24,17 +24,17 @@ PRE="../.."
#fi
echo "> do queries"
dig @localhost -p $UNBOUND_PORT www1.example.com. >outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. >outfile1 &
digpid1=$!
dig @localhost -p $UNBOUND_PORT www2.example.com. >outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. >outfile2 &
digpid2=$!
dig @localhost -p $UNBOUND_PORT www3.example.com. >outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT www3.example.com. >outfile3 &
digpid3=$!
dig @localhost -p $UNBOUND_PORT www4.example.com. >outfile4 &
dig @127.0.0.1 -p $UNBOUND_PORT www4.example.com. >outfile4 &
digpid4=$!
dig @localhost -p $UNBOUND_PORT www5.example.com. >outfile5 &
dig @127.0.0.1 -p $UNBOUND_PORT www5.example.com. >outfile5 &
digpid5=$!
dig @localhost -p $UNBOUND_PORT www6.example.com. >outfile6 &
dig @127.0.0.1 -p $UNBOUND_PORT www6.example.com. >outfile6 &
digpid6=$!
sleep 12
kill -9 $digpid1

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost +vc -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 +vc -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www1.example.com."
dig @localhost -p $UNBOUND_PORT www1.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -20,11 +20,11 @@ else
fi
echo "> do three queries"
dig @localhost -p $UNBOUND_PORT +retry=10 +time=1 www1.example.com. >outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT +retry=10 +time=1 www1.example.com. >outfile1 &
digpid1=$!
dig @localhost -p $UNBOUND_PORT +retry=10 +time=1 www2.example.com. >outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT +retry=10 +time=1 www2.example.com. >outfile2 &
digpid2=$!
dig @localhost -p $UNBOUND_PORT +retry=10 +time=1 www3.example.com. >outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT +retry=10 +time=1 www3.example.com. >outfile3 &
digpid3=$!
sleep 5
kill -9 $digpid1

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www1.example.com."
dig @localhost -p $UNBOUND_PORT www1.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -20,11 +20,11 @@ else
fi
echo "> do three queries"
dig @localhost -p $UNBOUND_PORT www1.example.com. >outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. >outfile1 &
digpid1=$!
dig @localhost -p $UNBOUND_PORT www2.example.com. >outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. >outfile2 &
digpid2=$!
dig @localhost -p $UNBOUND_PORT www3.example.com. >outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT www3.example.com. >outfile3 &
digpid3=$!
sleep 5
kill -9 $digpid1

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> check answer"
if grep "10.20.30.40" outfile; then
echo "OK"
@ -20,7 +20,7 @@ sleep 4
# query again
rm outfile
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> check answer"
if grep "10.20.30.40" outfile; then
echo "OK"

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig tcp.example.com."
dig @localhost -p $UNBOUND_PORT tcp.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT tcp.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -20,7 +20,7 @@ else
fi
echo "> dig udp.example.com."
dig @localhost -p $UNBOUND_PORT udp.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT udp.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -11,7 +11,7 @@ PRE="../.."
# so that all three queries get timeouts during the later test.
#
#echo "> dig www1.example.com."
#dig @localhost -p $UNBOUND_PORT www1.example.com. | tee outfile
#dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. | tee outfile
#echo "> cat logfiles"
#cat fwd.log
#cat unbound.log
@ -24,17 +24,17 @@ PRE="../.."
#fi
echo "> do queries"
dig @localhost -p $UNBOUND_PORT www1.example.com. >outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. >outfile1 &
digpid1=$!
dig @localhost -p $UNBOUND_PORT www2.example.com. >outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. >outfile2 &
digpid2=$!
dig @localhost -p $UNBOUND_PORT www3.example.com. >outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT www3.example.com. >outfile3 &
digpid3=$!
dig @localhost -p $UNBOUND_PORT www4.example.com. >outfile4 &
dig @127.0.0.1 -p $UNBOUND_PORT www4.example.com. >outfile4 &
digpid4=$!
dig @localhost -p $UNBOUND_PORT www5.example.com. >outfile5 &
dig @127.0.0.1 -p $UNBOUND_PORT www5.example.com. >outfile5 &
digpid5=$!
dig @localhost -p $UNBOUND_PORT www6.example.com. >outfile6 &
dig @127.0.0.1 -p $UNBOUND_PORT www6.example.com. >outfile6 &
digpid6=$!
sleep 15

View File

@ -11,7 +11,7 @@ PRE="../.."
# so that all three queries get timeouts during the later test.
#
#echo "> dig www1.example.com."
#dig @localhost -p $UNBOUND_PORT www1.example.com. | tee outfile
#dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. | tee outfile
#echo "> cat logfiles"
#cat fwd.log
#cat unbound.log
@ -24,11 +24,11 @@ PRE="../.."
#fi
echo "> do three queries"
dig @localhost -p $UNBOUND_PORT www1.example.com. >outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT www1.example.com. >outfile1 &
digpid1=$!
dig @localhost -p $UNBOUND_PORT www2.example.com. >outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. >outfile2 &
digpid2=$!
dig @localhost -p $UNBOUND_PORT www3.example.com. >outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT www3.example.com. >outfile3 &
digpid3=$!
sleep 15
kill -9 $digpid1

View File

@ -17,7 +17,7 @@ echo "b4380100000100000000000003777777076578616d706c6503636f6d00" | xxd -r -p |
# now test that server is still up
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -9,35 +9,35 @@ PRE="../.."
# Query and check check that we get the correct answer from the auth_zone
query () {
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
echo "> check answer"
if grep "1.2.3.4" outfile; then

View File

@ -9,7 +9,7 @@ PRE="../.."
# this one should have NXDOMAIN builtin
#
echo "> dig 1.0.31.172.in-addr.arpa."
dig @localhost -p $UNBOUND_PORT 1.0.31.172.in-addr.arpa. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT 1.0.31.172.in-addr.arpa. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -23,7 +23,7 @@ fi
# this one should give our own data as the reply
echo "> dig 1.0.30.172.in-addr.arpa."
dig @localhost -p $UNBOUND_PORT 1.0.30.172.in-addr.arpa. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT 1.0.30.172.in-addr.arpa. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -38,7 +38,7 @@ fi
# this one should give our own data as the reply
# but different trailing dot in unbound.conf file
echo "> dig 1.0.29.172.in-addr.arpa."
dig @localhost -p $UNBOUND_PORT 1.0.29.172.in-addr.arpa. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT 1.0.29.172.in-addr.arpa. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -11,7 +11,7 @@ PRE="../.."
# foo.example.com is available through local-data (and recursion...).
#
echo "> dig www.example.com. +RD"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -24,7 +24,7 @@ else
fi
echo "> dig www.example.com. +norec"
dig @localhost +norec -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 +norec -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -37,7 +37,7 @@ else
fi
echo "> dig foo.example.com. +RD"
dig @localhost -p $UNBOUND_PORT foo.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT foo.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -50,7 +50,7 @@ else
fi
echo "> dig foo.example.com. +norec"
dig @localhost +norec -p $UNBOUND_PORT foo.example.com. | tee outfile
dig @127.0.0.1 +norec -p $UNBOUND_PORT foo.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -14,7 +14,7 @@ PRE="../.."
# dig +norec for www does not work any more.
#
echo "> dig www.example.com. +RD"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -27,7 +27,7 @@ else
fi
echo "> dig www.example.com. +norec"
dig @localhost +norec -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 +norec -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -47,7 +47,7 @@ else
fi
echo "> dig foo.example.com. +RD"
dig @localhost -p $UNBOUND_PORT foo.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT foo.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -60,7 +60,7 @@ else
fi
echo "> dig foo.example.com. +norec"
dig @localhost +norec -p $UNBOUND_PORT foo.example.com. | tee outfile
dig @127.0.0.1 +norec -p $UNBOUND_PORT foo.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -22,7 +22,7 @@ fi
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log
@ -35,7 +35,7 @@ else
fi
echo "> dig www2.example.com."
dig @localhost -p $UNBOUND_PORT www2.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -23,16 +23,16 @@ fi
# do the test
# generate some load.
echo "> dig www[1-10].example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile1 &
dig @localhost -p $UNBOUND_PORT www2.example.com. | tee outfile3 &
dig @localhost -p $UNBOUND_PORT www3.example.com. | tee outfile2 &
dig @localhost -p $UNBOUND_PORT www4.example.com. | tee outfile4 &
dig @localhost -p $UNBOUND_PORT www5.example.com. | tee outfile5 &
dig @localhost -p $UNBOUND_PORT www6.example.com. | tee outfile6 &
dig @localhost -p $UNBOUND_PORT www7.example.com. | tee outfile7 &
dig @localhost -p $UNBOUND_PORT www8.example.com. | tee outfile8 &
dig @localhost -p $UNBOUND_PORT www9.example.com. | tee outfile9 &
dig @localhost -p $UNBOUND_PORT www10.example.com. | tee outfile10 &
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile1 &
dig @127.0.0.1 -p $UNBOUND_PORT www2.example.com. | tee outfile3 &
dig @127.0.0.1 -p $UNBOUND_PORT www3.example.com. | tee outfile2 &
dig @127.0.0.1 -p $UNBOUND_PORT www4.example.com. | tee outfile4 &
dig @127.0.0.1 -p $UNBOUND_PORT www5.example.com. | tee outfile5 &
dig @127.0.0.1 -p $UNBOUND_PORT www6.example.com. | tee outfile6 &
dig @127.0.0.1 -p $UNBOUND_PORT www7.example.com. | tee outfile7 &
dig @127.0.0.1 -p $UNBOUND_PORT www8.example.com. | tee outfile8 &
dig @127.0.0.1 -p $UNBOUND_PORT www9.example.com. | tee outfile9 &
dig @127.0.0.1 -p $UNBOUND_PORT www10.example.com. | tee outfile10 &
wait # wait for all jobs to complete.

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT . SOA | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT . SOA | tee outfile
echo "> check answer"
if grep root-servers outfile | grep "nstld.verisign-grs.com"; then
echo "OK"

View File

@ -7,7 +7,7 @@
PRE="../.."
# test if unbound is up
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> check answer"
if grep "10.20.30.40" outfile; then
echo "OK"

View File

@ -7,7 +7,7 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
cat unbound.log

View File

@ -7,35 +7,35 @@
PRE="../.."
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
if grep SERVFAIL outfile; then
echo "> try again"
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 1
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
if grep SERVFAIL outfile; then
echo "> try again"
sleep 10
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
fi
echo "> cat logfiles"
cat fwd.log