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

Changes v4->v5:
* New commit "lib: Print TCONF on LTP_REPRODUCIBLE_OUTPUT=1"
  (it can be squashed, but I wanted to point this out and get Martin's ack)
* Fix missing new lines in help (AI)
* Remove wrongly stated TWARN (error on code on master)
* Use single fprintf (Li)

Link to v5:
https://lore.kernel.org/ltp/20260422141234.632195-1-pvorel@suse.cz/T/#t
https://patchwork.ozlabs.org/project/ltp/list/?series=501017&state=*

Petr Vorel (6):
  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
  lib: Print TCONF on LTP_REPRODUCIBLE_OUTPUT=1

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

-- 
2.53.0


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

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [LTP] [PATCH v4 1/5] lib: Ignore empty LTP_ENABLE_DEBUG
@ 2026-04-22 14:12 Petr Vorel
  2026-04-22 15:18 ` [LTP] " linuxtestproject.agent
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2026-04-22 14:12 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] 11+ messages in thread

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23  8:41 [LTP] [PATCH v5 0/6] lib: LTP_DEBUG cleanup Petr Vorel
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
2026-04-23  8:41 ` [LTP] [PATCH v5 2/6] lib: Rename variable LTP_ENABLE_DEBUG => LTP_DEBUG Petr Vorel
2026-04-23  8:41 ` [LTP] [PATCH v5 3/6] lib: Prefer LTP_DEBUG over -D Petr Vorel
2026-04-23  8:41 ` [LTP] [PATCH v5 4/6] doc: newlib_tests: Update debugging parameters Petr Vorel
2026-04-23  8:41 ` [LTP] [PATCH v5 5/6] lib: Merge functionality of LTP_QUIET into LTP_REPRODUCIBLE_OUTPUT Petr Vorel
2026-04-23  9:38   ` Petr Vorel
2026-04-23  8:41 ` [LTP] [PATCH v5 6/6] lib: Print TCONF on LTP_REPRODUCIBLE_OUTPUT=1 Petr Vorel
2026-04-23  9:39   ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
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

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