This commit is contained in:
Evgeny Vereshchagin 2018-12-23 14:46:00 +01:00
parent 9103671d7c
commit 7e11a95e41
3 changed files with 17 additions and 1 deletions

View file

@ -83,6 +83,10 @@
#include "virt.h"
#include "watchdog.h"
#if HAS_FEATURE_ADDRESS_SANITIZER
#include <sanitizer/lsan_interface.h>
#endif
static enum {
ACTION_RUN,
ACTION_HELP,
@ -2612,6 +2616,10 @@ finish:
}
#endif
#if HAS_FEATURE_ADDRESS_SANITIZER
__lsan_do_leak_check();
#endif
if (shutdown_verb) {
r = become_shutdown(shutdown_verb, retval);
log_error_errno(r, "Failed to execute shutdown binary, %s: %m", getpid_cached() == 1 ? "freezing" : "quitting");

View file

@ -26,7 +26,7 @@ Description=Testsuite service
After=multi-user.target
[Service]
ExecStart=/bin/sh -x -c 'systemctl --state=failed --no-legend --no-pager > /failed ; echo OK > /testok'
ExecStart=/bin/sh -x -c 'systemctl --state=failed --no-legend --no-pager > /failed ; systemctl daemon-reload ; echo OK > /testok'
Type=oneshot
EOF

View file

@ -462,6 +462,14 @@ check_result_nspawn() {
ls -l $TESTDIR/journal/*/*.journal
test -s $TESTDIR/failed && ret=$(($ret+1))
[ -n "$TIMED_OUT" ] && ret=$(($ret+1))
if [[ "$IS_BUILT_WITH_ASAN" = "yes" ]]; then
ls -l "$TESTDIR/$1"
if [[ -e "$TESTDIR/$1/systemd.asan.log.1" ]]; then
cat "$TESTDIR/$1/systemd.asan.log.1"
ret=$(($ret+1))
fi
fi
return $ret
}