diff options
Diffstat (limited to 'src/test/test5.sh')
-rwxr-xr-x | src/test/test5.sh | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/test/test5.sh b/src/test/test5.sh index 515a5ff..4831eb4 100755 --- a/src/test/test5.sh +++ b/src/test/test5.sh @@ -3,21 +3,25 @@ test "$TEST_DNSPERF_WITH_NETWORK" = "1" || exit 0 dumdumd=`which dumdumd` +dumdohd=`which dumdohd` -if [ -n "$dumdumd" ]; then - pkill -9 dumdumd || true +pkill -9 dumdumd || true +pkill -9 dumdohd || true +if [ -n "$dumdumd" ]; then $dumdumd 127.0.0.1 5353 -r -D 100 & pid="$!" sleep 2 ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 2 -Q 10 -m tcp kill "$pid" + sleep 2 $dumdumd 127.0.0.1 5353 -r -D 10 & pid="$!" sleep 2 ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 10 -Q 100 -m tcp kill "$pid" + sleep 2 rm -f key.pem cert.pem openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd" @@ -27,12 +31,29 @@ if [ -n "$dumdumd" ]; then sleep 2 ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 2 -Q 10 -m dot kill "$pid" + sleep 2 $dumdumd 127.0.0.1 5353 -r -T -D 10 & pid="$!" sleep 2 ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 10 -Q 100 -m dot kill "$pid" +fi + +if [ -n "$dumdohd" ]; then + rm -f key.pem cert.pem + openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd" - pkill -9 dumdumd || true + $dumdohd 5353 key.pem cert.pem -D 100 & + pid="$!" + sleep 2 + ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 2 -Q 10 -m doh + kill "$pid" + sleep 2 + + $dumdohd 5353 key.pem cert.pem -D 10 & + pid="$!" + sleep 2 + ../dnsperf -s 127.0.0.1 -p 5353 -d "$srcdir/datafile" -t 2 -l 10 -Q 100 -m doh + kill "$pid" fi |