diff options
Diffstat (limited to 'src/test/test_dnstap_unixsock.sh')
-rwxr-xr-x | src/test/test_dnstap_unixsock.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/test_dnstap_unixsock.sh b/src/test/test_dnstap_unixsock.sh new file mode 100755 index 0000000..cf1e08f --- /dev/null +++ b/src/test/test_dnstap_unixsock.sh @@ -0,0 +1,31 @@ +#!/bin/sh -x + +# Special test for coverage using dnswire example + +if [ -x ~/workspace/dnswire/examples/reader_sender ]; then + mkdir -p dnstap + (cd dnstap && rm -f *.xml) + rm -f dnstap/dnstap.sock + ../dsc -f "$srcdir/dnstap_unixsock.conf" & + sleep 2 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 1 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 1 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 1 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 1 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 1 + ~/workspace/dnswire/examples/reader_sender "$srcdir/test.dnstap" ./dnstap/dnstap.sock + sleep 5 + pkill -ou `id -un` dsc + sleep 5 + pgrep -ou `id -un` dsc || exit 0 + pkill -ou `id -un` dsc + sleep 5 + pgrep -ou `id -un` dsc || exit 0 + pkill -KILL -ou `id -un` dsc + exit 1 +fi |