[LTP] [PATCH] tst_cgroup: Don't try to use V2 if V1 controllers are mounted

Richard Palethorpe rpalethorpe@suse.de
Fri Sep 25 14:26:20 CEST 2020


Hello Li,

Li Wang <liwang@redhat.com> writes:

> Richard Palethorpe <rpalethorpe@suse.de> wrote:
>
> ...
>> >> I wonder if it would be better to simply try mounting/using V2 and if
>> >> that fails try V1?
>> >>
>> >
>> > That will be work but not good, because if cgroup mount fails, how do we
>> > know it is a bug or not support?
>>
>> I think this is a valid point if you are writing a test for mounting
>> cgroups. However if we are testing something else then trying to guess
>> if cgroups should be available before using them, makes the test
>> fragile. I suppose we could check *after* trying to use the cgroups so
>> we can report some diagnostic info.
>>
>
> This sounds practicable, please feel free to work out the patch.

OK, I just sent a new patch. However there is no diagnostic info yet,
I'm not sure if actually it would be better to make a test specifically
checking if cgroups can be mounted and checking what is in filesystems
and mounts.

-- 
Thank you,
Richard.


More information about the ltp mailing list