[LTP] [PATCH 1/1] fsx-linux: Reduce log output
Petr Vorel
pvorel@suse.cz
Thu Dec 7 13:42:24 CET 2023
> Hi!
> > more than TVERB, it would be nice to add a "verbose_flag". Something like:
@Cyril: Or maybe TDEBUG to be more obvious?
I'll enable them on "-v" or on LTP_VERBOSE=1 parameter.
Also, do we want to add it also to the shell API? -v parameter is used
nfs_lib.sh, I wonder into which to rename (-V is used for LTP version in C API,
I guess I should have add it to shell API as well).
> > tst_res(TINFO, "my message %s", my_param, verbose_flag)
> That's technically impossible, because the printf() like messages have
> variable number of parameters.
+1
> Also it's really hard to extend the API at this point without really
> breaking it. We would have to also rewrite a few thousands of test if we
> introduce such change, which may be possible with coccinelle, but I
> would rather avoid such hassle.
+1
@Andrea, I also don't see a big problem with having TVERB flag.
All of them are somehow informative, although most of them also quit.
Kind regards,
Petr
> > And then with a -v we filter out messages which are verbose or not.
> > In this way we don't add T-flags and we can handle any kind of messages
> > in verbose mode.
> If you are worried about the output, we can easily produce TINFO
> messages for the TVERB flag too.
> Or possibly name the flags as TINFO with a debug level appended e.g. we
> can add TINFO0, TINFO1 and TINFO2 and define TINFO to TNFO0 for
> backwards compatibility.
More information about the ltp
mailing list