dnstap io, test threads in unit test.

This commit is contained in:
W.C.A. Wijngaards 2020-01-30 14:57:03 +01:00
parent 9c71e5733d
commit 8aa338ba2d
3 changed files with 33 additions and 2 deletions

View File

@ -1,6 +1,6 @@
server:
verbosity: 2
num-threads: 1
num-threads: 3
outgoing-range: 16
interface: 127.0.0.1
port: @PORT@
@ -10,6 +10,8 @@ server:
chroot: ""
username: ""
do-not-query-localhost: no
local-zone: "example.net." redirect
local-data: "example.net. IN A 10.20.30.41"
remote-control:
control-enable: yes
control-interface: 127.0.0.1

View File

@ -12,4 +12,5 @@ kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID
kill $UNBOUND_PID >/dev/null 2>&1
cat unbound.log
exit 0

View File

@ -43,11 +43,39 @@ else
exit 1
fi
echo "> make 10 queries to spread them over threads"
dig @127.0.0.1 -p $UNBOUND_PORT q1.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q2.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q3.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q4.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q5.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q6.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q7.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q8.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q9.example.net.
dig @127.0.0.1 -p $UNBOUND_PORT q10.example.net.
for x in q1 q2 q3 q4 5 q6 q7 q8 q9 q10; do
if grep "$x.example.net" tap.log >/dev/null; then :; else sleep 1; fi
if grep "$x.example.net" tap.log >/dev/null; then :; else sleep 1; fi
if grep "$x.example.net" tap.log >/dev/null; then :; else sleep 1; fi
if grep "$x.example.net" tap.log >/dev/null; then :; else sleep 10; fi
if grep "$x.example.net" tap.log; then echo "yes it is in tap.log";
else
echo "$x.example.net. information not in tap.log"
echo "failed"
echo "> cat logfiles"
cat tap.log
cat tap.errlog
cat fwd.log
cat unbound.log
echo "Not OK"
exit 1
fi
done
echo "> cat logfiles"
cat tap.log
cat tap.errlog
cat fwd.log
cat unbound.log
echo "> OK"
exit 0