summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-27 19:40:35 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-30 12:47:45 +0200
commit9029f20b35069d068b8be9fdb16fd6874cd420a0 (patch)
treef372714e81e393fad0d7e21815140f98fb15ff51 /test
parentTEST-79-MEMPRESS: Load systemd-asan-env if available (diff)
downloadsystemd-9029f20b35069d068b8be9fdb16fd6874cd420a0.tar.xz
systemd-9029f20b35069d068b8be9fdb16fd6874cd420a0.zip
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.
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/TEST-02-UNITTESTS.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/units/TEST-02-UNITTESTS.sh b/test/units/TEST-02-UNITTESTS.sh
index aac55ea17c..6392425130 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}