[LTP] [PATCH v3 08/16] controllers: Expand cgroup_lib shell library

Li Wang liwang@redhat.com
Wed Mar 16 10:46:20 CET 2022


Richard Palethorpe <rpalethorpe@suse.de> wrote:



> >> +
> >> +    _cgroup_state=$(tst_cgctl require "$ctrl" $$)
> >> +
> >> +    [ "$_cgroup_state" = "" ] && tst_brk TBROK "cgroup_require: No
> >state was set after call. Controller '$ctrl' maybe does not exist?"
>
> Perhaps we can just check the return status of tst_cgctl and exit the
> script if it is >0?
>

That should be work, but we need to check the _cgrou_state
at other places because many shell APIs require getting Cgroup
info, I guess this does not make things more easily if check the
return value only one time.


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


More information about the ltp mailing list