From: Frantisek Sumsal Date: Wed, 15 Jun 2022 10:32:51 +0000 (+0200) Subject: test: drop all LD_PRELOAD-related ASan workarounds X-Git-Tag: v252-rc1~802^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa65ba6baac8c9241cf30802bb5fd3698d1f3189;p=thirdparty%2Fsystemd.git test: drop all LD_PRELOAD-related ASan workarounds since they shouldn't be necessary anymore, as we tweak the "problematic" binaries on per-binary basis. --- diff --git a/test/test-functions b/test/test-functions index 67019acf439..01cc063e12b 100644 --- a/test/test-functions +++ b/test/test-functions @@ -600,10 +600,6 @@ install_verity_minimal() { # missing $LD_PRELOAD libraries. inst_libs "$ASAN_RT_PATH" inst_library "$ASAN_RT_PATH" - # Create a dummy LSan suppression file otherwise gcc's ASan - # complains as it doesn't exist in the minimal image - # (i.e. when running TEST-29 or TEST-50 under sanitizers) - touch "$initdir/systemd-lsan.supp" fi cp "$os_release" "$initdir/usr/lib/os-release" ln -s ../usr/lib/os-release "$initdir/etc/os-release" @@ -808,20 +804,6 @@ if [[ ! -e "$ASAN_RT_PATH" ]]; then exit 1 fi -# Suppress certain leaks reported by LSan (either in external tools or bogus -# ones) -# Docs: # https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer#suppressions -# -# - fsck is called by systemd-homed and is reporting a leak we're not interested -# in -# - libLLVM is a "side effect" caused by the previous fsck leak -cat >/systemd-lsan.supp </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 - -# Some utilities run via IMPORT/RUN/PROGRAM udev directives fail because -# they're uninstrumented (like dmsetup). Let's add a simple rule which sets -# LD_PRELOAD to the ASan RT library to fix this. -mkdir -p /etc/udev/rules.d -cat >/etc/udev/rules.d/00-set-LD_PRELOAD.rules <"\$_dropin_dir/unset_ld_preload.conf" -} - -unset_ld_preload systemd-remount-fs -unset_ld_preload testsuite- - export ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd.asan.log UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS exec "$ROOTLIBDIR/systemd" "\$@" EOF