diff --git a/src/test/test-execute.c b/src/test/test-execute.c index e6715f9574..0e378f68c0 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -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); } }