test-execute: fix killing of unit processes
Let's use the correct wrapper for calling unit vtable functions. Let's
make sure we always use the right wrappers, and never bypass them
needlessly.
Moreover use SIGKILL rather than "9" as signal name. Let's not be
needlessly cryptic.
Follow-up for: f7f8e8cbb9
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
f7f00fb15b
commit
1acacd737b
@@ -54,7 +54,7 @@ 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);
|
||||
r = unit_kill(unit, KILL_ALL, SIGKILL, NULL);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to kill %s: %m", unit->id);
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user