summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Cavalca <dcavalca@fb.com>2016-07-27 14:22:26 -0700
committerDavide Cavalca <dcavalca@fb.com>2016-07-29 14:30:46 -0700
commit76c19e9f6c8e8e5922e43716137d532c542e34c8 (patch)
tree3a16b1b3c079fc9408d9a4e83053ce89071a9646
parent40a23924efc64598d580b5fd92ef3937583d1fc9 (diff)
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.
-rw-r--r--src/test/test-process-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index 562ad4acb8..9ada46b1e9 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());
}