summaryrefslogtreecommitdiffstats
path: root/test/test-functions
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2018-09-15 16:21:33 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-16 19:16:07 +0200
commitc1342d559739a07e1fe52bc73d6ccadff72f6920 (patch)
tree28f81051f69d8a492060adee384c09db93a0564d /test/test-functions
parentsd-device: use qsort_safe() (#10099) (diff)
downloadsystemd-c1342d559739a07e1fe52bc73d6ccadff72f6920.tar.xz
systemd-c1342d559739a07e1fe52bc73d6ccadff72f6920.zip
tests: make UBSan print full backtraces
This should make it easier to get backtraces that can be pasted into issues like https://github.com/systemd/systemd/issues/10096.
Diffstat (limited to '')
-rw-r--r--test/test-functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test-functions b/test/test-functions
index 438ecbb288..a1d9e5c953 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -330,7 +330,8 @@ create_asan_wrapper() {
set -x
DEFAULT_ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
-DEFAULT_ENVIRONMENT=ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS
+DEFAULT_UBSAN_OPTIONS=print_stacktrace=1:print_summary=1
+DEFAULT_ENVIRONMENT="ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS"
mount -t proc proc /proc
mount -t sysfs sysfs /sys
@@ -353,7 +354,7 @@ JOURNALD_CONF_DIR=/etc/systemd/system/systemd-journald.service.d
mkdir -p "\$JOURNALD_CONF_DIR"
printf "[Service]\nEnvironment=ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd-journald.asan.log\n" >"\$JOURNALD_CONF_DIR/env.conf"
-export ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd.asan.log
+export ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS:log_path=/systemd.asan.log UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS
exec $ROOTLIBDIR/systemd "\$@"
EOF