[LTP] [PATCH 1/1] fsx-linux: Reduce log output

Andrea Cervesato andrea.cervesato@suse.com
Thu Dec 7 13:30:14 CET 2023


On 12/7/23 13:25, Cyril Hrubis wrote:
> 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.
>
What about mixing TVERB flag with the others ? Something like "TINFO | 
TVERB"

Andrea



More information about the ltp mailing list