diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2018-04-03 16:04:22 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-04-03 15:04:22 +0200 |
commit | f6c63f6fc90040f0017a7cc37f3a05d5b86226d7 (patch) | |
tree | 5808925b66df91c45bec394a1d0a6d8c8d7dac83 /src/core | |
parent | cde942f61bf231ea4a0d50780cdb4e744458daeb (diff) | |
download | systemd-f6c63f6fc90040f0017a7cc37f3a05d5b86226d7.tar.gz |
core: skip the removal of cgroups in the TEST_RUN_MINIMAL mode (#8622)
When `systemd` is run in the TEST_RUN_MINIMAL mode, it doesn't really
set up cgroups, so it shouldn't try to remove anything.
Closes https://github.com/systemd/systemd/issues/8474.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 62a3d86ef1..87545a28ae 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2305,7 +2305,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) + if (delete && m->cgroup_root && 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); |