diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2019-01-30 14:24:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 14:24:18 +0100 |
commit | 3fb1ea3bb4d25b968c82c9648117ee289f985951 (patch) | |
tree | 1ee013aee8eb5897153f420363154faa5b942078 | |
parent | Fixed minor typo in man/tmpfiles.d.xml (diff) | |
parent | tests: crash PID1 if UBSan is unhappy (diff) | |
download | systemd-3fb1ea3bb4d25b968c82c9648117ee289f985951.tar.xz systemd-3fb1ea3bb4d25b968c82c9648117ee289f985951.zip |
Merge pull request #11592 from evverx/ignore-memory-leaks-in-dbus
tests: ignore memory leaks in dbus-daemon and also crash PID1 if UBSan is unhappy
-rw-r--r-- | test/test-functions | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/test/test-functions b/test/test-functions index cb83761a6c..3243a868b7 100644 --- a/test/test-functions +++ b/test/test-functions @@ -344,8 +344,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_UBSAN_OPTIONS=print_stacktrace=1:print_summary=1 -DEFAULT_ENVIRONMENT="ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS:halt_on_error=1" +DEFAULT_UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 +DEFAULT_ENVIRONMENT="ASAN_OPTIONS=\$DEFAULT_ASAN_OPTIONS UBSAN_OPTIONS=\$DEFAULT_UBSAN_OPTIONS" mount -t proc proc /proc mount -t sysfs sysfs /sys @@ -485,19 +485,27 @@ check_asan_reports() { ret=$(($ret+1)) fi - journald_report=$(find "$root" -name "systemd-journald.asan.log*" -exec cat {} \;) - if [[ ! -z "$journald_report" ]]; then + journald_report=$(find "$root" -name "systemd-journald.asan.log*" -exec cat {} \;) + if [[ ! -z "$journald_report" ]]; then printf "%s" "$journald_report" ret=$(($ret+1)) - fi + fi - pids=$("$BUILD_DIR/journalctl" -D "$root/var/log/journal" | perl -alne 'print $1 if /\[(\d+)\]:\s*SUMMARY:\s+\w+Sanitizer/') - if [[ ! -z "$pids" ]]; then + pids=$( + "$BUILD_DIR/journalctl" -D "$root/var/log/journal" | perl -alne ' + BEGIN { + %services_to_ignore = ( + "dbus-daemon" => undef, + ); + } + print $2 if /\s(\S*)\[(\d+)\]:\s*SUMMARY:\s+\w+Sanitizer/ && !exists $services_to_ignore{$1}' + ) + if [[ ! -z "$pids" ]]; then ret=$(($ret+1)) for pid in $pids; do "$BUILD_DIR/journalctl" -D "$root/var/log/journal" _PID=$pid --no-pager done - fi + fi fi return $ret @@ -1582,7 +1590,7 @@ test_run() { else dwarn "can't run systemd-nspawn, skipping" fi - fi + fi fi return 0 } |