diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 3f8e06240f..8f39c9436b 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -3303,7 +3303,7 @@ void manager_shutdown_cgroup(Manager *m, bool delete) { /* 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); diff --git a/src/core/manager.c b/src/core/manager.c index f3275a4070..c239737e40 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -870,7 +870,7 @@ int manager_new(UnitFileScope scope, ManagerTestRunFlags test_run_flags, Manager 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;