diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-10-17 14:31:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-10-18 14:49:40 +0200 |
commit | d0547385d9da980ca752e1f5df959280a053fdb4 (patch) | |
tree | a1d3c53be415719c5ab511b9ac9499f6e0a8d513 | |
parent | killall: port killing spree loop over to PidRef (diff) | |
download | systemd-d0547385d9da980ca752e1f5df959280a053fdb4.tar.xz systemd-d0547385d9da980ca752e1f5df959280a053fdb4.zip |
test-cgroup: make test case a bit more robust towards previous aborted runs
-rw-r--r-- | src/test/test-cgroup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index c6e6b8e01a..0fbd6351a4 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -61,6 +61,10 @@ TEST(cg_create) { log_info("Paths for test:\n%s\n%s", test_a, test_b); + /* Possibly clean up left-overs from aboted previous runs */ + (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, test_a, /* delete_root= */ true); + (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, test_b, /* delete_root= */ true); + r = cg_create(SYSTEMD_CGROUP_CONTROLLER, test_a); if (IN_SET(r, -EPERM, -EACCES, -EROFS)) { log_info_errno(r, "Skipping %s: %m", __func__); |