From: Frantisek Sumsal Date: Fri, 5 Mar 2021 22:20:45 +0000 (+0100) Subject: test: disable at_exit LSan check for dbus.service X-Git-Tag: v248-rc3~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b5fc147d6aff46d80ff3b01574bcd6a06936eeb;p=thirdparty%2Fsystemd.git test: disable at_exit LSan check for dbus.service When running integration tests under sanitizers D-Bus fails to shutdown cleanly, causing unnecessary noise in the logs: ``` dbus-daemon[272]: ==272==LeakSanitizer has encountered a fatal error. dbus-daemon[272]: ==272==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1 dbus-daemon[272]: ==272==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc) ``` Since we're not "sanitizing" D-Bus anyway let's disable LSan's at_exit check for the dbus.service to get rid of this error. --- diff --git a/test/test-functions b/test/test-functions index b2a875ffce4..498fde567b5 100644 --- a/test/test-functions +++ b/test/test-functions @@ -725,6 +725,12 @@ printf "[Unit]\nConditionVirtualization=container\n\n[Service]\nTimeoutSec=240s\ mkdir -p /etc/systemd/system/systemd-journal-flush.service.d printf "[Service]\nTimeoutSec=180s\n" >/etc/systemd/system/systemd-journal-flush.service.d/timeout.conf +# D-Bus has troubles during system shutdown causing it to fail. Although it's +# harmless, it causes unnecessary noise in the logs, so let's disable LSan's +# at_exit check just for the dbus.service +mkdir -p /etc/systemd/system/dbus.service.d +printf "[Service]\nEnvironment=ASAN_OPTIONS=leak_check_at_exit=false\n" >/etc/systemd/system/dbus.service.d/disable-lsan.conf + # The 'mount' utility doesn't behave well under libasan, causing unexpected # fails during boot and subsequent test results check: # bash-5.0# mount -o remount,rw -v /