public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] fsx-linux: Reduce log output
Date: Thu, 7 Dec 2023 13:25:43 +0100	[thread overview]
Message-ID: <ZXG5x8R56fISvCLW@rei> (raw)
In-Reply-To: <aecb0e4c-9042-463d-9888-7f4508e277fb@suse.com>

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-12-07 12:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 11:12 [LTP] [PATCH 1/1] fsx-linux: Reduce log output Petr Vorel
2023-12-07 11:18 ` Petr Vorel
2023-12-07 11:22   ` Cyril Hrubis
2023-12-07 11:23     ` Petr Vorel
2023-12-07 12:18     ` Andrea Cervesato via ltp
2023-12-07 12:25       ` Cyril Hrubis [this message]
2023-12-07 12:30         ` Andrea Cervesato via ltp
2023-12-07 12:32           ` Cyril Hrubis
2023-12-07 12:34             ` Andrea Cervesato via ltp
2023-12-07 12:39               ` Cyril Hrubis
2023-12-07 12:40                 ` Andrea Cervesato via ltp
2023-12-07 12:44                   ` Cyril Hrubis
2023-12-07 12:46                     ` Andrea Cervesato via ltp
2023-12-07 12:49                       ` Cyril Hrubis
2023-12-07 12:42         ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZXG5x8R56fISvCLW@rei \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox