]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: fix killing of unit processes
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Nov 2018 12:05:43 +0000 (13:05 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 19 Nov 2018 20:53:23 +0000 (21:53 +0100)
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: f7f8e8cbb953686c520969a66a9718675a972af5

src/test/test-execute.c

index 0e378f68c01dc28b5e74a28bd5731c75c7198c98..18a021dcea2cb7ace80828e57bccc2211dc83571 100644 (file)
@@ -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);