All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 0/2] lib: Add TINFO_WARN
Date: Thu, 20 Jun 2024 07:36:18 +0200	[thread overview]
Message-ID: <20240620053618.GD537887@pevik> (raw)
In-Reply-To: <ZldFa-3CXXbVKmVW@yuki>

> Hi!
> > I'm not sure about this. Why not enabling TINFO + TWARN combination instead?

> > tst_res(TINFO | TWARN, "my message");

> That's even more confusing. Does that propagate into results or not?

> To be honest we even have problem deciding if we should use TINFO or
> TWARN in some cases and adding third variant would make things even
> worse, sicne we would have three options.

> So I would really keep just TINFO which is something that is printed by
> default but does not propagate into results and TWARN that is printed as
> well but propagates into results.

> Maybe it would be even better to actually remove TWARN. That way we
> would have only TFAIL and TBROK that propagate into results since TWARN
> is kind of lesser TBROK anyways...

Understand to your points. But tst_res TWARN is quite understandable
(simple warning, which propagates), IMHO better to use than
tst_res TBROK. But sure, feel free to go ahead and send a patch to remove TWARN.

BTW I was also surprised how many tests use tst_resm TBROK ... / tst_resm(TBROK,
...) followed by exit 1 / exit(1). These should be converted to tst_brkm TBROK /
tst_resm(TBROK, ...).

Other thing is, that I would prefer to have macro for tst_res(TINFO, "WARNING: ...")
e.g. WARNING(...) would produce tst_res(TINFO, "WARNING: ...") from simple point I
don't like to hardwire text (there can be typos). BTW more than for this rare
case I would prefer to have macros for .tags, e.g. LINUX_GIT(43a6684519ab) would
produce {"linux-git", "43a6684519ab"} CVE(2017-2671) would produce {"CVE", "2017-2671"}
(again, typos).

Kind regards,
Petr

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

  reply	other threads:[~2024-06-20  5:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 22:29 [LTP] [PATCH 0/2] lib: Add TINFO_WARN Petr Vorel
2024-05-27 22:29 ` [LTP] [PATCH 1/2] " Petr Vorel
2024-05-27 22:29 ` [LTP] [PATCH 2/2] tree: Use TINFO_WARN Petr Vorel
2024-05-28  6:04 ` [LTP] [PATCH 0/2] lib: Add TINFO_WARN Andrea Cervesato via ltp
2024-05-29 15:10   ` Cyril Hrubis
2024-06-20  5:36     ` Petr Vorel [this message]
2024-06-20  8:05       ` Li Wang
2024-06-20 11:25         ` Petr Vorel
2024-06-21 13:22         ` Li Wang
2024-06-21 13:39           ` Petr Vorel
2024-06-21 13:47             ` Li Wang
2024-06-21 13:53               ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2024-05-28 12:05 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=20240620053618.GD537887@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.