]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-79-MEMPRESS: Load systemd-asan-env if available
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 27 May 2024 11:38:51 +0000 (13:38 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 10:47:45 +0000 (12:47 +0200)
Required since we run with DynamicUser=1.

test/units/TEST-79-MEMPRESS.sh

index 4ce73d4c299e2bbc0d6f987d99c495bcdad871f9..2b1de204f7b35f7debd22bf52893ecefe3372a18 100755 (executable)
@@ -49,7 +49,17 @@ EOF
 
 chmod +x "$SCRIPT"
 
-systemd-run -u "$UNIT" -p Type=exec -p ProtectControlGroups=1 -p DynamicUser=1 -p MemoryPressureWatch=on -p MemoryPressureThresholdSec=123ms -p BindPaths=$SCRIPT --wait "$SCRIPT"
+systemd-run \
+    -u "$UNIT" \
+    -p Type=exec \
+    -p ProtectControlGroups=1 \
+    -p DynamicUser=1 \
+    -p MemoryPressureWatch=on \
+    -p MemoryPressureThresholdSec=123ms \
+    -p BindPaths=$SCRIPT \
+    `# Make sanitizers happy when DynamicUser=1 pulls in instrumented systemd NSS modules` \
+    -p EnvironmentFile=-/usr/lib/systemd/systemd-asan-env \
+    --wait "$SCRIPT"
 
 rm "$SCRIPT"