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

Wei Gao wegao@suse.com
Mon May 1 01:39:53 CEST 2023


On Sun, Apr 30, 2023 at 09:44:08PM +0800, Li Wang wrote:
> 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.)
Thanks a lot :)
> 
> --- 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