[LTP] [PATCH v4 1/4] lib: add new cgroup test API

Richard Palethorpe rpalethorpe@suse.de
Thu Sep 24 10:55:47 CEST 2020


Hello,

Li Wang <liwang@redhat.com> writes:

>> Perhaps you meant:
>>
>> if (tst_is_mounted("cgroup"))
>>    cg_ver = TST_CGROUP_V1;
>> else
>>    cg_ver = TST_CGROUP_V2;
>>
>
> This is not enough for the version choice. As tst_is_mounted(“cgroup”) can't
> distinguish precisely what "cgroup" or "cgroup2" has been mounted. Because
> the function is fuzzy matching a string.
>> >
>> > To be honest, I hope a Linux distribution provides a pure way in cgroup
>> > using, which means just mounting V1 or V2 but not to mix together. Or, do
>> > you think LTP should handle the situation for the v1&v2 mixing mount?
>>
>> For now, I think we just need to use V1 if it is mounted. I don't like
>> the fact we have both mounted, but it seems most software can handle it,
>> so LTP should as well.
>>
>
> Agreed.

OK, I will send a patch unless you send one first.

-- 
Thank you,
Richard.


More information about the ltp mailing list