mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
tests: unset LD_PRELOAD in testsuite.service when it's run under ASan
This should help to address the "grep" issue we ran into in https://github.com/systemd/systemd-centos-ci/pull/217.
This commit is contained in:
parent
99860f1f8d
commit
9a1862bfa6
@ -469,9 +469,14 @@ printf "[Service]\nTimeoutSec=180s\n" >/etc/systemd/system/systemd-journal-flush
|
|||||||
# 1
|
# 1
|
||||||
# Let's workaround this by clearing the previously set LD_PRELOAD env variable,
|
# Let's workaround this by clearing the previously set LD_PRELOAD env variable,
|
||||||
# so the libasan library is not loaded for this particular service
|
# so the libasan library is not loaded for this particular service
|
||||||
REMOUNTFS_CONF_DIR=/etc/systemd/system/systemd-remount-fs.service.d
|
unset_ld_preload() {
|
||||||
mkdir -p "\$REMOUNTFS_CONF_DIR"
|
local _dropin_dir="/etc/systemd/system/\$1.service.d"
|
||||||
printf "[Service]\nUnsetEnvironment=LD_PRELOAD\n" >"\$REMOUNTFS_CONF_DIR/env.conf"
|
mkdir -p "\$_dropin_dir"
|
||||||
|
printf "[Service]\nUnsetEnvironment=LD_PRELOAD\n" >"\$_dropin_dir/unset_ld_preload.conf"
|
||||||
|
}
|
||||||
|
|
||||||
|
unset_ld_preload systemd-remount-fs
|
||||||
|
unset_ld_preload testsuite
|
||||||
|
|
||||||
export ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd.asan.log UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS
|
export ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd.asan.log UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS
|
||||||
exec $ROOTLIBDIR/systemd "\$@"
|
exec $ROOTLIBDIR/systemd "\$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user