From: W.C.A. Wijngaards Date: Tue, 13 Oct 2020 06:28:59 +0000 (+0200) Subject: - Fix #323: unbound testsuite fails on mock build in systemd-nspawn X-Git-Tag: release-1.13.0rc1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79a8db1ee184ca9e6fa1e265c1970f7074c0bea1;p=thirdparty%2Funbound.git - Fix #323: unbound testsuite fails on mock build in systemd-nspawn if systemd support is build. --- diff --git a/doc/Changelog b/doc/Changelog index e98876fca..f8cec1158 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/testcode/do-tests.sh b/testcode/do-tests.sh index 5439f0f28..effb7c16a 100755 --- a/testcode/do-tests.sh +++ b/testcode/do-tests.sh @@ -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 diff --git a/testcode/run_vm.sh b/testcode/run_vm.sh index 5f599e144..363a32b52 100644 --- a/testcode/run_vm.sh +++ b/testcode/run_vm.sh @@ -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 diff --git a/testcode/testbound.c b/testcode/testbound.c index 602dffaff..3f3e106b0 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -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 */