mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
test: kill all processes launched by test-execute before exiting
As was shown in https://github.com/systemd/systemd/issues/10696#issuecomment-439613204, currently `meson` waits for 1080 seconds (which is three times the global timeout) for the test to fail completely even though it takes just two minutes for it to really fail. This happens because the test itself leaves the services it has launched behind, which, in turn, makes meson think that the test is still in progress. KILL_ALL with SIGKILL should make the issue go away.
This commit is contained in:
parent
85b18dbec5
commit
f7f8e8cbb9
@ -54,6 +54,9 @@ static void check(Manager *m, Unit *unit, int status_expected, int code_expected
|
||||
n = now(CLOCK_MONOTONIC);
|
||||
if (ts + timeout < n) {
|
||||
log_error("Test timeout when testing %s", unit->id);
|
||||
r = UNIT_VTABLE(unit)->kill(unit, KILL_ALL, 9, NULL);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to kill %s: %m", unit->id);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user