From 9029f20b35069d068b8be9fdb16fd6874cd420a0 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 27 May 2024 19:40:35 +0200 Subject: [PATCH] TEST-02-UNITTESTS: Pass asan environment to units if it is available Some tests (e.g. test-udev.py) might trigger one of our NSS modules which means LD_PRELOAD has to be configured properly. --- test/units/TEST-02-UNITTESTS.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/units/TEST-02-UNITTESTS.sh b/test/units/TEST-02-UNITTESTS.sh index aac55ea17ce..63924251300 100755 --- a/test/units/TEST-02-UNITTESTS.sh +++ b/test/units/TEST-02-UNITTESTS.sh @@ -55,7 +55,13 @@ run_test() { ;; esac - systemd-run --quiet --property Delegate=1 --property "Environment=$environment" --unit="$name" --wait "$test" && ret=0 || ret=$? + systemd-run \ + --quiet \ + --property Delegate=1 \ + --property EnvironmentFile=-/usr/lib/systemd/systemd-asan-env \ + --property "Environment=$environment" \ + --unit="$name" \ + --wait "$test" && ret=0 || ret=$? exec {LOCK_FD}> /lock flock --exclusive ${LOCK_FD} -- 2.47.3