]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests/recursor-test-freebsd
Update h2o to 2.2.6, fixing CVE-2019-9512, CVE-2019-9514 and CVE-2019-9515
[thirdparty/pdns.git] / regression-tests / recursor-test-freebsd
CommitLineData
6acfc026
PD
1#!/bin/sh -ex
2chmod +x dnsbulktest toxml
3port=$1
4[ -z "$port" ] && port=5300
5limit=$2
6[ -z "$limit" ] && limit=100000
7
8: ${RECURSOR:=pdns-recursor-*/pdns_recursor}
9: ${CSV:="top-1m.csv"}
10: ${IPv6:="1"}
11: ${TRACE:="fail"}
12
13if [ $IPv6 = 1 ]
14then
15 QLA6="::"
16else
17 QLA6=""
18fi
19
20rm -f recursor.pid pdns_recursor.pid
21${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --local-address=0.0.0.0 --allow-from=0.0.0.0/0 --query-local-address6="${QLA6}" > recursor.log 2>&1 &
22sleep 3
23./dnsbulktest -qe 37.252.127.190 $port $limit < ${CSV} > bulktest.results
24kill $(cat pdns_recursor.pid)
25sleep 5
26
27. ./bulktest.results
28
29mkdir -p recursor-bulktest
30rm -f failed_tests passed_tests
31touch failed_tests passed_tests
32: ${THRESHOLD:="95"}
33if [ "$DBT_OKPERCENTAGEINT" -ge $THRESHOLD ]
34then
35 echo recursor-bulktest >> passed_tests
36 RETVAL=0
37else
38 echo recursor-bulktest >> failed_tests
39 RETVAL=1
40fi
41
42echo "$DBT_OKPERCENTAGE% of domains resolved" > recursor-bulktest/diff
43egrep 'PowerDNS.COM|^<measurement' recursor.log > recursor-bulktest/stdout
44echo "<measurement><name>% domains resolved</name><value>$DBT_OKPERCENTAGE</value></measurement>" >> recursor-bulktest/stdout
45
46: ${context:="recursor-bulktest"}
47
48export context
49testsdir=. ./toxml
50
51exit $RETVAL