diff --git a/test/test-functions b/test/test-functions index a7026d7ad7..1459ee1456 100644 --- a/test/test-functions +++ b/test/test-functions @@ -832,7 +832,7 @@ mount -o remount,rw / # A lot of services (most notably dbus) won't start without preloading libasan # See https://github.com/systemd/systemd/issues/5004 -DEFAULT_ENVIRONMENT="\$DEFAULT_ENVIRONMENT LD_PRELOAD=$ASAN_RT_PATH" +DEFAULT_ENVIRONMENT="\$DEFAULT_ENVIRONMENT LD_PRELOAD=$ASAN_RT_PATH ASAN_RT_PATH=$ASAN_RT_PATH" if [[ "$ASAN_COMPILER" == "clang" ]]; then # Let's add the ASan DSO's path to the dynamic linker's cache. This is pretty diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh index f395ef4e5e..5e4fa1877c 100755 --- a/test/units/testsuite-70.sh +++ b/test/units/testsuite-70.sh @@ -4,12 +4,11 @@ set -ex export SYSTEMD_LOG_LEVEL=debug - # Prepare fresh disk image img="/var/tmp/test.img" dd if=/dev/zero of=$img bs=1024k count=20 status=none echo -n passphrase >/tmp/passphrase -cryptsetup luksFormat -q --use-urandom $img /tmp/passphrase +LD_PRELOAD="${ASAN_RT_PATH:-}" cryptsetup luksFormat -q --use-urandom $img /tmp/passphrase # Enroll unlock with default PCR policy env PASSWORD=passphrase systemd-cryptenroll --tpm2-device=auto $img