]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Cleanup libfaketime handling in rec regression tests 11019/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 22 Nov 2021 14:28:42 +0000 (15:28 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 22 Nov 2021 16:16:48 +0000 (17:16 +0100)
- Use the MT variant for libfaketime, we are MT after all
- It is only needed for auth and LD_PRELOAD is set by the tests where it matters
- It interacts badly with libfstrm and tsan in the recursor
- No more separate run of the dnstap test is needed

regression-tests.recursor-dnssec/runtests
tasks.py

index 600d681adf2351f37f9d6cb7949b6b7e4208febf..d570c5849729eb94c1ec96e36ebd46f37536d6d8 100755 (executable)
@@ -21,7 +21,7 @@ export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
 export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor}
 export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}
 
-LIBFAKETIME_DEFAULT=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 # ubuntu default
+LIBFAKETIME_DEFAULT=/usr/lib/x86_64-linux-gnu/faketime/libfaketimeMT.so.1 # ubuntu default
 LIBAUTHBIND_DEFAULT=/usr/lib/authbind/libauthbind.so.1
 if [ $(uname -s) = "Darwin" ]; then
   # macOS is not /really/ supported here; it works for some tests, and then you might need sudo.
@@ -55,14 +55,9 @@ if ! "$PDNSRECURSOR" --version 2>&1 | grep Features | grep -q dnstap-framestream
   export NODNSTAPTESTS=1
 fi
 
-# libfstrm has a bad interaction with libfaketime on at least 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 $@
+# LIBFAKETIME is only added to LD_PRELOAD by the pyton code when needed
+if [ "${LIBASAN}" != "" -o "${LIBAUTHBIND}" != "" ]; then
+LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND}" nosetests -I test_WellKnown.py --with-xunit $@
 else
 nosetests -I test_WellKnown.py --with-xunit $@
 fi
index 74f14b5dcb658cf2dda4c7f28c19278448d60f90..0edc6c3f01ac5018ec81b37e9cfa4101ef64a7fd 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -456,8 +456,7 @@ def test_dnsdist(c):
 @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 -I 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, threads, mthreads, shards):