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

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.

Should be something like:

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

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

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

  parent reply	other threads:[~2026-03-27 10:39 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 ` Andrea Cervesato via ltp [this message]
2026-03-27 12:40   ` [LTP] [PATCH v2 0/3] lib: LTP_DEBUG cleanup Petr Vorel
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=69c65e5f.050a0220.19109e.1a43@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=pvorel@suse.cz \
    /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