]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #323: unbound testsuite fails on mock build in systemd-nspawn
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Oct 2020 06:28:59 +0000 (08:28 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Oct 2020 06:28:59 +0000 (08:28 +0200)
  if systemd support is build.

doc/Changelog
testcode/do-tests.sh
testcode/run_vm.sh
testcode/testbound.c

index e98876fca08b43d8533d49aa5243298d98e3602d..f8cec1158321199a2a45ba81ecd145af5fb89c3a 100644 (file)
@@ -1,3 +1,7 @@
+13 October 2020: Wouter
+       - Fix #323: unbound testsuite fails on mock build in systemd-nspawn
+         if systemd support is build.
+
 9 October 2020: Wouter
        - Fix dnstap socket and the chroot not applied properly to the dnstap
          socket path.
index 5439f0f285e6a7a8b479c1927f9d8629d2b9ed45..effb7c16a5bbcd017a03d397624cb84eb96ee5ee 100755 (executable)
@@ -29,6 +29,9 @@ else
        HAVE_MINGW=no
 fi
 
+# stop tests from notifying systemd, if that is compiled in.
+export -n NOTIFY_SOCKET
+
 cd testdata;
 sh ../testcode/mini_tdir.sh clean
 rm -f .perfstats.txt
index 5f599e144a5be4ee12be7c45e7d19034a1104a3f..363a32b52cb5e664cc930b8a6a9deef4731672ef 100644 (file)
@@ -40,6 +40,8 @@ cleanup() {
        exit 0
 }
 trap cleanup INT
+# stop tests from notifying systemd, if that is compiled in.
+export -n NOTIFY_SOCKET
 
 for t in $RUNLIST
 do
index 602dffaff14a918b5eedc90dc524e4f896fa967c..3f3e106b039c2377210f0820fa28690caf10dc9d 100644 (file)
@@ -362,6 +362,10 @@ main(int argc, char* argv[])
        /* we do not want the test to depend on the timezone */
        (void)putenv("TZ=UTC");
        memset(pass_argv, 0, sizeof(pass_argv));
+#ifdef HAVE_SYSTEMD
+       /* we do not want the test to use systemd daemon startup notification*/
+       (void)unsetenv("NOTIFY_SOCKET");
+#endif /* HAVE_SYSTEMD */
 
        log_init(NULL, 0, NULL);
        /* determine commandline options for the daemon */