[LTP] Question on .needs_cgroup_ctrls for cgroupv2

Wei Gao wegao@suse.com
Mon Feb 27 15:44:02 CET 2023


Hi Richard

How to setup correct test case for cgroupv2 check? I try to put following parameter but failed.

struct tst_test test = {
	...
        .needs_cgroup_ctrls = (const char *const []){ "unified", NULL },
        .needs_cgroup_ver = TST_CG_V2,
};


After some investigation i found cgroup_find_ctrl which called by tst_cg_require seems not implement 
how to check cgroupv2, the controllers has no "unified" memeber, should we add CGROUP_CTRL_MEMBER("unified", xxx)
into controllers?  Correct me if any misunderstanding.


void tst_cg_require(const char *const ctrl_name,
                        const struct tst_cg_opts *options)
{
        struct cgroup_ctrl *const ctrl = cgroup_find_ctrl(ctrl_name);


Thanks.
Regards
Gao Wei


More information about the ltp mailing list