]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
dnstap io, test threads in unit test.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 30 Jan 2020 13:57:03 +0000 (14:57 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 30 Jan 2020 13:57:03 +0000 (14:57 +0100)
testdata/dnstap.tdir/dnstap.conf
testdata/dnstap.tdir/dnstap.post
testdata/dnstap.tdir/dnstap.test

index 82250ec2d34e534d71eca09c8240b73678b9e378..5e8dfaefbcef8113d9285ffa80ca5367cb0ed006 100644 (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
index ec79e0427e9ea3efcef8e31ce83f8d61206d447a..6744b4b618ce5b6fe5a682c8f62f7dbc58f8f4da 100644 (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
index 49f1d42a6f8355936c22fff4c8895fe7c73db763..115b099d1f54c38fe187bd1dd33537fc3d754704 100644 (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