[LTP] [PATCH v12 1/2] tst_cgroup.c: Add a cgroup base controller

Li Wang liwang@redhat.com
Sun Apr 30 15:44:08 CEST 2023


Hi Wei,

Seems we have to skip the cgroup.subtree_control cleanup
process inside tst_cg_cleanup(), otherwise, test complains that
there is error operation in line#1020 if the unified cgroup-V2
was mounted by LTP.

(no need to resend another patch, someone who merge this can help fix.)

--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -1012,7 +1012,8 @@ void tst_cg_cleanup(void)
        }

        for_each_ctrl(ctrl) {
-               if (!cgroup_ctrl_on_v2(ctrl) ||
!ctrl->ctrl_root->we_mounted_it)
+               if (!cgroup_ctrl_on_v2(ctrl) ||
!ctrl->ctrl_root->we_mounted_it
+                               || !strcmp(ctrl->ctrl_name, "base"))
                        continue;

                SAFE_FILE_PRINTFAT(ctrl->ctrl_root->mnt_dir.dir_fd,

With above fix:
Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang


More information about the ltp mailing list