mirror of
https://github.com/systemd/systemd.git
synced 2025-02-02 13:47:27 +03:00
test: fix ASAN options in TEST-29-PORTABLE
Bash arrays cannot be exported, so we need to redefine it in each subtest Follow-up for 680dec33f27d408c94afe654113ba87e3bb8208b
This commit is contained in:
parent
27a8a29e32
commit
37c2010bcf
@ -9,6 +9,14 @@ set -o pipefail
|
||||
# shellcheck source=test/units/util.sh
|
||||
. "$(dirname "$0")"/util.sh
|
||||
|
||||
# Arrays cannot be exported, so redefine in each test script
|
||||
ARGS=()
|
||||
if [[ -v ASAN_OPTIONS || -v UBSAN_OPTIONS ]]; then
|
||||
# If we're running under sanitizers, we need to use a less restrictive
|
||||
# profile, otherwise LSan syscall would get blocked by seccomp
|
||||
ARGS+=(--profile=trusted)
|
||||
fi
|
||||
|
||||
unsquashfs -dest /tmp/minimal_0 /usr/share/minimal_0.raw
|
||||
unsquashfs -dest /tmp/minimal_1 /usr/share/minimal_1.raw
|
||||
|
||||
|
@ -9,6 +9,14 @@ set -o pipefail
|
||||
# shellcheck source=test/units/util.sh
|
||||
. "$(dirname "$0")"/util.sh
|
||||
|
||||
# Arrays cannot be exported, so redefine in each test script
|
||||
ARGS=()
|
||||
if [[ -v ASAN_OPTIONS || -v UBSAN_OPTIONS ]]; then
|
||||
# If we're running under sanitizers, we need to use a less restrictive
|
||||
# profile, otherwise LSan syscall would get blocked by seccomp
|
||||
ARGS+=(--profile=trusted)
|
||||
fi
|
||||
|
||||
portablectl "${ARGS[@]}" attach --now --runtime /usr/share/minimal_0.raw minimal-app0
|
||||
|
||||
portablectl is-attached minimal-app0
|
||||
|
@ -29,7 +29,6 @@ EOF
|
||||
|
||||
systemctl daemon-reexec
|
||||
|
||||
export SYSTEMD_DISSECT_VERITY_TIMEOUT_SEC=30
|
||||
|
||||
udevadm control --log-level debug
|
||||
|
||||
@ -42,9 +41,9 @@ if [[ -v ASAN_OPTIONS || -v UBSAN_OPTIONS ]]; then
|
||||
# With the trusted profile DynamicUser is disabled, so the storage is not in private/
|
||||
STATE_DIRECTORY=/var/lib/
|
||||
fi
|
||||
export ARGS
|
||||
export STATE_DIRECTORY
|
||||
export SYSTEMD_LOG_LEVEL=debug
|
||||
export SYSTEMD_DISSECT_VERITY_TIMEOUT_SEC=30
|
||||
|
||||
# Quick smoke tests
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user