diff options
Diffstat (limited to 'usr.sbin/unbound/testdata/dnstap.tdir/dnstap.test')
-rw-r--r-- | usr.sbin/unbound/testdata/dnstap.tdir/dnstap.test | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/usr.sbin/unbound/testdata/dnstap.tdir/dnstap.test b/usr.sbin/unbound/testdata/dnstap.tdir/dnstap.test deleted file mode 100644 index 3a2dcc5e13f..00000000000 --- a/usr.sbin/unbound/testdata/dnstap.tdir/dnstap.test +++ /dev/null @@ -1,89 +0,0 @@ -# #-- dnstap.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 - -. ../common.sh -PRE="../.." - -# test if the server is up. -echo "> dig www.example.com." -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" -else - echo "> cat logfiles" - cat tap.log - cat tap.errlog - cat fwd.log - cat unbound.log - echo "Not OK" - exit 1 -fi - -echo "> wait for log to happen on timer" -sleep 3 -echo "> check tap.log for dnstap info" -# see if it logged the information in tap.log -# wait for a moment for filesystem to catch up. -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi -if grep "www.example.com" tap.log >/dev/null; then :; else sleep 10; fi -if grep "www.example.com" tap.log; then echo "yes it is in tap.log"; -else - echo "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 - -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. -echo "> wait for log to happen on timer" -sleep 3 -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 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 -echo "> OK" -exit 0 |