public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 0/3] lib: LTP_DEBUG cleanup
Date: Fri, 27 Mar 2026 13:40:52 +0100	[thread overview]
Message-ID: <20260327124052.GB1083266@pevik> (raw)
In-Reply-To: <69c65e5f.050a0220.19109e.1a43@mx.google.com>

> Hi Petr,

> Patches 1/3 and 2/3 look good. Patch 3/3 has a regression
> and a couple of nits.

> > [PATCH 3/3]
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > +	{"D::", "-D[1,2]  Prints debug information (can be overwriten by LTP_DEBUG"},

> Typo: "overwriten" -> "overwritten". Also missing closing ')'.

> [...]

> > 	case 'D':
> > +		if (!getenv("LTP_DEBUG")) {

> This undoes the empty-string fix from patch 1/3. When
> LTP_DEBUG="" is set, getenv() returns "" (non-NULL), so -D is
> skipped here. But in do_setup() the tdebug_env[0] != '\0'
> check also skips it. Net result: LTP_DEBUG= ./test -D2
> silently produces no debug output.

Good point, thanks!

nit: better to discuss in patch itself, discussion on cover letter is somehow
hidden in patchwork.

Kind regards,
Petr

> Should be something like:

> 	char *env = getenv("LTP_DEBUG");
> 	if (!env || !env[0]) {

> Regards,

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

  reply	other threads:[~2026-03-27 12:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 17:04 [LTP] [PATCH v2 0/3] lib: LTP_DEBUG cleanup Petr Vorel
2026-03-26 17:04 ` [LTP] [PATCH v2 1/3] lib: Ignore empty LTP_ENABLE_DEBUG Petr Vorel
2026-03-27  3:51   ` Li Wang via ltp
2026-03-27  9:38     ` Petr Vorel
2026-03-26 17:04 ` [LTP] [PATCH v2 2/3] lib: Rename variable LTP_ENABLE_DEBUG => LTP_DEBUG Petr Vorel
2026-03-27  3:47   ` Li Wang via ltp
2026-03-26 17:04 ` [LTP] [PATCH v2 3/3] lib: Prefer LTP_DEBUG over -D Petr Vorel
2026-03-27  3:45   ` Li Wang via ltp
2026-03-27 10:39 ` [LTP] [PATCH v2 0/3] lib: LTP_DEBUG cleanup Andrea Cervesato via ltp
2026-03-27 12:40   ` Petr Vorel [this message]
2026-03-27 15:46     ` 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=20260327124052.GB1083266@pevik \
    --to=pvorel@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