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

Li Wang liwang@redhat.com
Fri Sep 25 14:04:34 CEST 2020


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.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200925/aa8c31f1/attachment.htm>


More information about the ltp mailing list