[LTP] [PATCH v4 11/19] controllers: Expand cgroup_lib shell library
Petr Vorel
pvorel@suse.cz
Tue May 10 13:19:37 CEST 2022
Hi Luke, Cyril,
> Hi!
> > > +_cgroup_check_return()
> > > +{
> > > + local ret="$1"
> > > + local msg="$2"
> > > +
> > > + tst_flag2mask TBROK
> > > + [ "$ret" = "$?" ] && tst_brk TBROK "$msg"
> > > +
> > > + tst_flag2mask TCONF
> > > + [ "$ret" = "$?" ] && tst_brk TCONF "$msg"
> > > +}
> > As I wrote in previous patch likely we can avoid tst_flag2mask in new API.
> > In few cases where needed we hardwired numbers (IMHO POSIX shell does not
> > support constants, which would be better than variables which can be changed).
> > In this case you could probably use ROD() or EXPECT_PASS_BRK().
> Or we can just passthrough the result, as long as it's non-zero we can
> do exit $ret and be done with it.
+1 (that would suggest to use ROD)
Please, rebase the code for new version. You'll have to for cgroup_lib.sh put
'. tst_test.sh' to the end and also '. cgroup_lib.sh' in the tests also at the
end - required by 04021637f ("tst_test.sh: Cleanup getopts usage").
Kind regards,
Petr
More information about the ltp
mailing list