summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-07-30 22:29:00 +0200
committerMike Yuan <me@yhndnzj.com>2024-08-02 16:36:08 +0200
commit031860d6cbe430fb080ec0986950b72c4718e59a (patch)
treef3935af48bcc98850f8da2150c0202547c4e3401 /src/test
parentcgroup-util: refactor cg_{ns,freezer,kill}_supported (diff)
downloadsystemd-031860d6cbe430fb080ec0986950b72c4718e59a.tar.xz
systemd-031860d6cbe430fb080ec0986950b72c4718e59a.zip
cgroup-util: drop unused cg_rmdir()
When removing a cgroup, we always want to eliminate subcgroups first, i.e. use cg_trim(). And cg_rmdir() (along with CGROUP_REMOVE flag) is simply unused. Kill it.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-cgroup.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c
index 040e9e9c12..461576c4cf 100644
--- a/src/test/test-cgroup.c
+++ b/src/test/test-cgroup.c
@@ -122,12 +122,7 @@ TEST(cg_create) {
assert_se(cg_kill_recursive(test_a, 0, 0, NULL, NULL, NULL) > 0);
assert_se(cg_kill_recursive(test_b, 0, 0, NULL, NULL, NULL) == 0);
- (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, test_b, false);
-
- assert_se(cg_rmdir(SYSTEMD_CGROUP_CONTROLLER, test_b) == 0);
- assert_se(cg_rmdir(SYSTEMD_CGROUP_CONTROLLER, test_a) < 0);
- assert_se(cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, test_a, SYSTEMD_CGROUP_CONTROLLER, here, 0) > 0);
- assert_se(cg_rmdir(SYSTEMD_CGROUP_CONTROLLER, test_a) == 0);
+ ASSERT_OK(cg_trim(SYSTEMD_CGROUP_CONTROLLER, test_b, true));
}
TEST(id) {