[LTP] [PATCH 4/5] lib/tst_res_.c: Add TBROK handler + more verbose errors
Cyril Hrubis
chrubis@suse.cz
Thu Dec 12 10:03:03 CET 2024
Hi!
> > In the end both of these functions increment counters, but in this case
> > we need to return to the shell so we cannot call tst_brk() in the
> > helper. It's a very special situation here.
>
> Thanks for info. Maybe a little note anywhere (e.g. commit message) would help.
Will do.
> > > Also we have TST_RES_SUPPORTS_TCONF_TDEBUG_TFAIL_TINFO_TPASS_TWARN check to not
> > > add TBROK to tst_res_().
>
> > That only works when the value is constant, if you pass via variable
> > that is not constant at build time you can pass whatever you want. Which
> > is another reason why it makes sense to relax the constraints.
>
> Good point. So you plan to remove these build time checks?
For tst_brk() these checks are removed in my patchset that changes how
TBROK is propagated, so that tst_brk() works with TFAIL and TPASS as
well.
We also had a discussion about removing TWARN since there is not a big
difference between TBROK and TWARN and replacing TWARN with
tst_res(TBROK, ...) as that would make things simpler. Currently there
is no good rule where to use TBROK and where TWARN so removing TWARN
sounds like a good option.
> Also we have nice docs from you include/tst_res_flags.h.
> ATM include/tst_test.h and doc/old/C-Test-API.asciidoc are outdated,
> but if you relax allowed ttype, than it would not need to be updated.
>
> Also, any reason to not support TWARN?
See above.
> I suppose we don't need TERRNO, TTERRNO, TRERRNO (not supported by tst_test.sh).
Yes, errno is not defined in shell.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list