[LTP] [PATCH 1/1] fsx-linux: Reduce log output
Cyril Hrubis
chrubis@suse.cz
Thu Dec 7 13:25:43 CET 2023
Hi!
> more than TVERB, it would be nice to add a "verbose_flag". Something like:
>
> tst_res(TINFO, "my message %s", my_param, verbose_flag)
That's technically impossible, because the printf() like messages have
variable number of parameters.
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.
> 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.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list