Rather than checking if test_run_flags is set exclusively to MANAGER_TEST_RUN_MINIMAL,
check if it is set as a flag, so that it can be used together with other flags.
/* We can't really delete the group, since we are in it. But
* let's trim it. */
- if (delete && m->cgroup_root && m->test_run_flags != MANAGER_TEST_RUN_MINIMAL)
+ if (delete && m->cgroup_root && !FLAGS_SET(m->test_run_flags, MANAGER_TEST_RUN_MINIMAL))
(void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, false);
m->cgroup_empty_event_source = sd_event_source_unref(m->cgroup_empty_event_source);
if (r < 0)
return r;
- if (test_run_flags == MANAGER_TEST_RUN_MINIMAL) {
+ if (FLAGS_SET(test_run_flags, MANAGER_TEST_RUN_MINIMAL)) {
m->cgroup_root = strdup("");
if (!m->cgroup_root)
return -ENOMEM;