From 3b5fc147d6aff46d80ff3b01574bcd6a06936eeb Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 5 Mar 2021 23:20:45 +0100 Subject: [PATCH] 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. --- test/test-functions | 6 ++++++ 1 file changed, 6 insertions(+) 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 / -- 2.47.3