From: Evgeny Vereshchagin Date: Sun, 23 Dec 2018 14:48:18 +0000 (+0100) Subject: tests: look for ASan+UBSan reports in the journal X-Git-Tag: v241-rc1~114^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed4f303f398a09986233364ce4fba6a6cdabf31b;p=thirdparty%2Fsystemd.git tests: look for ASan+UBSan reports in the journal --- diff --git a/test/test-functions b/test/test-functions index 467dbbd8e94..dd9cdb7de1c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -462,6 +462,7 @@ EOF check_result_nspawn() { local ret=1 local journald_report="" + local pids="" [[ -e $TESTDIR/$1/testok ]] && ret=0 [[ -f $TESTDIR/$1/failed ]] && cp -a $TESTDIR/$1/failed $TESTDIR cp -a $TESTDIR/$1/var/log/journal $TESTDIR @@ -481,6 +482,14 @@ check_result_nspawn() { printf "%s" "$journald_report" ret=$(($ret+1)) fi + + pids=$("$BUILD_DIR/journalctl" -D "$TESTDIR/$1/var/log/journal" | perl -alne 'print $1 if /\[(\d+)\]:\s*SUMMARY:\s+\w+Sanitizer/') + if [[ ! -z "$pids" ]]; then + ret=$(($ret+1)) + for pid in $pids; do + "$BUILD_DIR/journalctl" -D "$TESTDIR/$1/var/log/journal" _PID=$pid --no-pager + done + fi fi return $ret