From: Davide Cavalca Date: Wed, 27 Jul 2016 21:22:26 +0000 (-0700) Subject: tests: skip process 1 tests if systemd not is running X-Git-Tag: v232~356^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c19e9f6c8e8e5922e43716137d532c542e34c8;p=thirdparty%2Fsystemd.git tests: skip process 1 tests if systemd not is running No point running tests against process 1 if systemd is not running as that process. This is a rework of an unpublished patch by @9muir. --- diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index 562ad4acb85..9ada46b1e9e 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -40,6 +40,7 @@ #include "stdio-util.h" #include "string-util.h" #include "terminal-util.h" +#include "test-helper.h" #include "util.h" #include "virt.h" @@ -357,7 +358,7 @@ int main(int argc, char *argv[]) { (void) parse_pid(argv[1], &pid); test_get_process_comm(pid); } else { - test_get_process_comm(1); + TEST_REQ_RUNNING_SYSTEMD(test_get_process_comm(1)); test_get_process_comm(getpid()); }