TEST-07-PID1: fixlets for running with sanitizers (#35616)

Hopefully fixes #35546.
This commit is contained in:
Luca Boccassi
2024-12-14 12:21:45 +00:00
committed by GitHub
2 changed files with 10 additions and 4 deletions
-1
View File
@@ -78,7 +78,6 @@ wrap=(
su
tar
tgtd
unshare
useradd
userdel
veritysetup
+10 -3
View File
@@ -416,6 +416,13 @@ fi
(! systemd-run --wait --pipe -p RootDirectory=/tmp/root /foo)
(! systemd-run --wait --pipe --service-type=oneshot -p ExecStartPre=-/foo/bar/baz -p ExecStart=-/foo/bar/baz -p RootDirectory=/tmp/root -- "- foo")
# RestrictNamespaces=
systemd-run --wait --pipe unshare -T true
(! systemd-run --wait --pipe -p RestrictNamespaces=~time unshare -T true)
# Tests for RestrictNamespaces=
# For some reasons, the following test cases fail when running with sanitizers:
# TEST-07-PID1.sh[194]: + systemd-run --wait --pipe unshare -T true
# TEST-07-PID1.sh[718]: ==718==ASan runtime does not come first in
# initial library list; you should either link runtime to your
# application or manually preload it with LD_PRELOAD.
if [[ ! -v ASAN_OPTIONS ]]; then
systemd-run --wait --pipe unshare -T true
(! systemd-run --wait --pipe -p RestrictNamespaces=~time unshare -T true)
fi