- run: inv install-rec-test-deps
- run: inv test-api recursor
+ test-recursor-regression:
+ needs: build-recursor
+ runs-on: ubuntu-20.04
+ env:
+ UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=/home/runner/work/pdns/pdns/build-scripts/UBSan.supp'
+ ASAN_OPTIONS: detect_leaks=0
+ steps:
+ - uses: actions/checkout@v2.3.4
+ with:
+ fetch-depth: 5
+ submodules: recursive
+ - name: Fetch the binaries
+ uses: actions/download-artifact@v2
+ with:
+ name: pdns-recursor
+ path: /opt/pdns-recursor
+ - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade
+ - run: inv add-auth-repo
+ - run: inv install-clang-runtime
+ - run: inv install-rec-test-deps
+ - run: inv test-regression-recursor
+
+ test-recursor-bulk:
+ needs: build-recursor
+ runs-on: ubuntu-20.04
+ env:
+ UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=/home/runner/work/pdns/pdns/build-scripts/UBSan.supp'
+ ASAN_OPTIONS: detect_leaks=0
+ steps:
+ - uses: actions/checkout@v2.3.4
+ with:
+ fetch-depth: 5
+ submodules: recursive
+ - name: Fetch the binaries
+ uses: actions/download-artifact@v2
+ with:
+ name: pdns-recursor
+ path: /opt/pdns-recursor
+ - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade
+ - run: inv install-clang-runtime
+ - run: inv install-rec-test-deps
+ - run: inv test-bulk-recursor
+
test-dnsdist-regression:
needs: build-dnsdist
runs-on: ubuntu-20.04
./clean.sh
cd ../regression-tests.recursor-dnssec
-./runtests || EXIT=1
+./runtests $@ || EXIT=1
./printlogs.py || true
exit $EXIT
export NODNSTAPTESTS=1
fi
+# libfstrm has a bad interaction with libfaketime on at leas Ubuntu focal
+# to run the test without LIBFAKETIME, we clear the var if it set to /bin/false
+if [ "$LIBFAKETIME" = "/bin/false" ]; then
+ LIBFAKETIME=""
+fi
+
if [ "${LIBAUTHBIND}" != "" -o "${LIBFAKETIME}" != "" ]; then
LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND} ${LIBFAKETIME}" nosetests -I test_WellKnown.py --with-xunit $@
else
' ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address="0.0.0.0${QLA6}" --threads=$threads --record-cache-shards=$shards --disable-packetcache --refresh-on-ttl-perc=10 --dnssec=validate > recursor.log 2>&1 &
sleep 3
if [ ! -e pdns_recursor.pid ]; then
+ cat recursor.log
echo Recursor did not start or did not write pdns_recursor.pid, exiting
exit 1
fi
@task
def install_rec_test_deps(c): # FIXME: rename this, we do way more than apt-get
- c.sudo('apt-get --no-install-recommends install -qq -y authbind python3-venv python3-dev default-libmysqlclient-dev libpq-dev pdns-tools libluajit-5.1-2 \
+ c.sudo('apt-get --no-install-recommends install -qq -y \
+ pdns-server curl unzip pdns-backend-bind pdns-tools daemontools \
+ jq libfaketime lua-posix lua-socket moreutils bc authbind \
+ python3-venv python3-dev default-libmysqlclient-dev libpq-dev \
+ libluajit-5.1-2 \
libboost-all-dev \
libcap2 \
libssl1.1 \
libsystemd0 \
libsodium23 \
libfstrm0 \
- libsnmp35')
+ libsnmp35 \
+ protobuf-compiler \
+ snmpd \
+ prometheus')
c.run('chmod +x /opt/pdns-recursor/bin/* /opt/pdns-recursor/sbin/*')
setup_authbind(c)
+ c.run('sed "s/agentxperms 0700 0755 recursor/agentxperms 0777 0755/g" regression-tests.recursor-dnssec/snmpd.conf | sudo tee /etc/snmp/snmpd.conf')
+ c.sudo('systemctl restart snmpd')
+ time.sleep(5)
+ c.sudo('chmod 755 /var/agentx')
+
@task
def install_dnsdist_test_deps(c): # FIXME: rename this, we do way more than apt-get
c.sudo('apt-get install -qq -y \
with c.cd('regression-tests.dnsdist'):
c.run('DNSDISTBIN=/opt/dnsdist/bin/dnsdist ./runtests')
+@task
+def test_regression_recursor(c):
+ c.run('/opt/pdns-recursor/sbin/pdns_recursor --version')
+ c.run('PDNSRECURSOR=/opt/pdns-recursor/sbin/pdns_recursor RECCONTROL=/opt/pdns-recursor/bin/rec_control SKIP_IPV6_TESTS=y LIBFAKETIME=/bin/false ./build-scripts/test-recursor test_RecDnstap.py')
+ c.run('PDNSRECURSOR=/opt/pdns-recursor/sbin/pdns_recursor RECCONTROL=/opt/pdns-recursor/bin/rec_control SKIP_IPV6_TESTS=y ./build-scripts/test-recursor')
+
+@task
+def test_bulk_recursor(c):
+ # We run an extremely samll version of the bulk test, as GH does not seem to be able to handle the UDP load
+ with c.cd('regression-tests'):
+ c.run('curl -LO http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip')
+ c.run('unzip top-1m.csv.zip -d .')
+ c.run('chmod +x /opt/pdns-recursor/bin/* /opt/pdns-recursor/sbin/*')
+ c.run('DNSBULKTEST=/usr/bin/dnsbulktest RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor RECCONTROL=/opt/pdns-recursor/bin/rec_control THRESHOLD=95 TRACE=no ./timestamp ./recursor-test 5300 1000 2')
+
# this is run always
def setup():
if '/usr/lib/ccache' not in os.environ['PATH']: