public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v4 0/5] lib: LTP_DEBUG cleanup
@ 2026-04-22 14:12 Petr Vorel
  2026-04-22 14:12 ` [LTP] [PATCH v4 1/5] lib: Ignore empty LTP_ENABLE_DEBUG Petr Vorel
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Petr Vorel @ 2026-04-22 14:12 UTC (permalink / raw)
  To: ltp; +Cc: Martin Cermak

Changes v3->v4:
* New commit "lib: Merge functionality of LTP_QUIET into LTP_REPRODUCIBLE_OUTPUT"
(I wanted to add it before Valgrind release, but too late.)
* Fix typo: "overwriten" -> "overwritten". Also missing closing ')' (Andrea)
* Remove double space before "support" (Andrea)

@Cyril: I know this has very little priority but could it get into
upcoming release?

Link to v4:
https://lore.kernel.org/ltp/20260327173252.1112192-1-pvorel@suse.cz/#r
https://patchwork.ozlabs.org/project/ltp/list/?series=497808&state=*

Petr Vorel (5):
  lib: Ignore empty LTP_ENABLE_DEBUG
  lib: Rename variable LTP_ENABLE_DEBUG => LTP_DEBUG
  lib: Prefer LTP_DEBUG over -D
  doc: newlib_tests: Update debugging parameters
  lib: Merge functionality of LTP_QUIET into LTP_REPRODUCIBLE_OUTPUT

 doc/developers/debugging.rst     |  6 ++--
 doc/old/C-Test-API.asciidoc      |  4 +--
 doc/users/setup_tests.rst        |  4 +--
 lib/newlib_tests/tst_res_flags.c |  2 +-
 lib/tst_test.c                   | 49 +++++++++++++-------------------
 5 files changed, 29 insertions(+), 36 deletions(-)

-- 
2.53.0


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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [LTP] [PATCH v5 1/6] lib: Ignore empty LTP_ENABLE_DEBUG
@ 2026-04-23  8:41 Petr Vorel
  2026-04-23  9:36 ` [LTP] " linuxtestproject.agent
  0 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2026-04-23  8:41 UTC (permalink / raw)
  To: ltp; +Cc: Martin Cermak

Empty LTP_ENABLE_DEBUG environment variable should be just ignored.

This fixes warning:
LTP_ENABLE_DEBUG= ./test05
tst_test.c:1454: TWARN: Invalid LTP_ENABLE_DEBUG value:

Fixes: e434de62b4 ("lib: Extend LTP_ENABLE_DEBUG to support verbosity levels")
Reviewed-by: Li Wang <liwang@redhat.com>
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index 26f6510a0a..229da669fa 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1445,13 +1445,13 @@ static void do_setup(int argc, char *argv[])
 
 	parse_opts(argc, argv);
 
-	if (tdebug_env && !context->tdebug) {
+	if (tdebug_env && *tdebug_env && !context->tdebug) {
 		if (!strcmp(tdebug_env, "2"))
 			context->tdebug = 2;
 		else if (!strcmp(tdebug_env, "1") || !strcmp(tdebug_env, "y"))
 			context->tdebug = 1;
 		else
-			tst_res(TWARN, "Invalid LTP_ENABLE_DEBUG value: %s", tdebug_env);
+			tst_res(TWARN, "Invalid LTP_ENABLE_DEBUG value: '%s'", tdebug_env);
 
 		if (context->tdebug)
 			tst_res(TINFO, "Enabling debug info (level %d)", context->tdebug);
-- 
2.53.0


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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-23  9:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 14:12 [LTP] [PATCH v4 0/5] lib: LTP_DEBUG cleanup Petr Vorel
2026-04-22 14:12 ` [LTP] [PATCH v4 1/5] lib: Ignore empty LTP_ENABLE_DEBUG Petr Vorel
2026-04-22 15:18   ` [LTP] " linuxtestproject.agent
2026-04-22 14:12 ` [LTP] [PATCH v4 2/5] lib: Rename variable LTP_ENABLE_DEBUG => LTP_DEBUG Petr Vorel
2026-04-22 14:12 ` [LTP] [PATCH v4 3/5] lib: Prefer LTP_DEBUG over -D Petr Vorel
2026-04-23  6:43   ` Li Wang
2026-04-22 14:12 ` [LTP] [PATCH v4 4/5] doc: newlib_tests: Update debugging parameters Petr Vorel
2026-04-23  6:45   ` Li Wang
2026-04-22 14:12 ` [LTP] [PATCH v4 5/5] lib: Merge functionality of LTP_QUIET into LTP_REPRODUCIBLE_OUTPUT Petr Vorel
2026-04-23  7:09   ` Li Wang
2026-04-23  8:15     ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2026-04-23  8:41 [LTP] [PATCH v5 1/6] lib: Ignore empty LTP_ENABLE_DEBUG Petr Vorel
2026-04-23  9:36 ` [LTP] " linuxtestproject.agent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox