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:
Daan De Meyer
2025-05-13 13:52:49 +02:00
parent 22571018e2
commit cfc9d3bef9
2 changed files with 2 additions and 8 deletions
-7
View File
@@ -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);
+2 -1
View File
@@ -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());
}
}