Merge pull request #23643 from mrc0mmand/asan-tweaks
test: fix (not only) TEST-70 under sanitizers
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user