From: Yu Watanabe Date: Sat, 14 Dec 2024 08:34:55 +0000 (+0900) Subject: TEST-07-PID1: skip test cases that invokes unshare when running with sanitizers X-Git-Tag: v258-rc1~1858^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F35616%2Fhead;p=thirdparty%2Fsystemd.git TEST-07-PID1: skip test cases that invokes unshare when running with sanitizers Fixes #35546. --- diff --git a/test/units/TEST-07-PID1.exec-context.sh b/test/units/TEST-07-PID1.exec-context.sh index 1e253b390d5..592c64ca4ce 100755 --- a/test/units/TEST-07-PID1.exec-context.sh +++ b/test/units/TEST-07-PID1.exec-context.sh @@ -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