tests.h: Get rid of TEST_REQ_RUNNING_SYSTEMD()
This only has a single user, let's just inline it and get rid of the macro.
This commit is contained in:
@@ -91,13 +91,6 @@ bool can_memlock(void);
|
||||
size_t name##_len = 0; \
|
||||
assert_se(unhexmem_full(hex, strlen_ptr(hex), false, &name, &name##_len) >= 0);
|
||||
|
||||
#define TEST_REQ_RUNNING_SYSTEMD(x) \
|
||||
if (sd_booted() > 0) { \
|
||||
x; \
|
||||
} else { \
|
||||
printf("systemd not booted, skipping '%s'\n", #x); \
|
||||
}
|
||||
|
||||
/* Provide a convenient way to check if we're running in CI. */
|
||||
const char* ci_environment(void);
|
||||
|
||||
|
||||
@@ -113,7 +113,8 @@ TEST(pid_get_comm) {
|
||||
(void) parse_pid(saved_argv[1], &pid);
|
||||
test_pid_get_comm_one(pid);
|
||||
} else {
|
||||
TEST_REQ_RUNNING_SYSTEMD(test_pid_get_comm_one(1));
|
||||
if (sd_booted() > 0)
|
||||
test_pid_get_comm_one(1);
|
||||
test_pid_get_comm_one(getpid());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user