diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2018-04-03 16:04:22 +0300 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-06-28 09:24:07 +0200 |
commit | 05301c0619add83c1426523f08336bc30e1020e2 (patch) | |
tree | 2867608ccbc0a6cfdea1758123196e4d28ed45f6 /src/core | |
parent | 68c47871535923b5580c5e58105f97a062b363dd (diff) |
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.
(cherry picked from commit f6c63f6fc90040f0017a7cc37f3a05d5b86226d7)
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 313801544..1dd17d3e7 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2340,7 +2340,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); #if 0 /// elogind is not init |