diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2020-01-31 07:13:14 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-01-31 13:13:04 +0100 |
commit | 9a1862bfa6cdd1352101b232a24f039b88ef4cee (patch) | |
tree | 761573238928ab6309d53bef1e68137e57cdd662 /test/test-functions | |
parent | Merge pull request #14718 from yuwata/man-repart-14716 (diff) | |
download | systemd-9a1862bfa6cdd1352101b232a24f039b88ef4cee.tar.xz systemd-9a1862bfa6cdd1352101b232a24f039b88ef4cee.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | test/test-functions | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test-functions b/test/test-functions index 5fffa5b9f8..372b039408 100644 --- a/test/test-functions +++ b/test/test-functions @@ -469,9 +469,14 @@ printf "[Service]\nTimeoutSec=180s\n" >/etc/systemd/system/systemd-journal-flush # 1 # Let's workaround this by clearing the previously set LD_PRELOAD env variable, # so the libasan library is not loaded for this particular service -REMOUNTFS_CONF_DIR=/etc/systemd/system/systemd-remount-fs.service.d -mkdir -p "\$REMOUNTFS_CONF_DIR" -printf "[Service]\nUnsetEnvironment=LD_PRELOAD\n" >"\$REMOUNTFS_CONF_DIR/env.conf" +unset_ld_preload() { + local _dropin_dir="/etc/systemd/system/\$1.service.d" + 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 exec $ROOTLIBDIR/systemd "\$@" |