mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
tests: reproduce https://github.com/systemd/systemd/issues/11251
This commit is contained in:
parent
9103671d7c
commit
7e11a95e41
@ -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");
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user