All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] lib: Print version and kernel early enough
@ 2026-09-30  9:51 Petr Vorel
  2026-09-30 15:04 ` [LTP] " linuxtestproject.agent
  2026-10-01 13:59 ` [LTP] [PATCH 1/1] " Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2026-09-30  9:51 UTC (permalink / raw)
  To: ltp

Print LTP version and tested kernel before calling do_setup()
which can quit testing due various reasons, e.g.:

    # ./fw_load02
    tst_kconfig.c:90: TINFO: Parsing kernel config '/proc/config.gz'
    tst_kconfig.c:90: TINFO: Parsing kernel config '/proc/config.gz'
    tst_kconfig.c:90: TINFO: Parsing kernel config '/proc/config.gz'
    tst_security.c:115: TINFO: SecureBoot sysfs file not available
    tst_security.c:94: TINFO: Unable to determine system lockdown state
    tst_security.c:115: TINFO: SecureBoot sysfs file not available
    tst_tmpdir.c:309: TINFO: Using /tmp/LTP_fw_ZRzLML as tmpdir (btrfs filesystem)
    tst_sys_conf.c:103: TBROK: Failed to read anything from
	'/sys/module/firmware_class/parameters/path': SUCCESS (0)

It's always good to know this info.

Fixes: eb0a5367fa ("lib: Print tested kernel and arch")
Fixes: 546beb5340 ("lib/C-API: Print LTP version at test start")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
It should be merged *after* the release.

 lib/tst_test.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index e27a24c246..10ff733971 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -2058,17 +2058,17 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self)
 
 	tst_test = self;
 
+	tst_res(TINFO, "LTP version: "LTP_VERSION);
+
+	uname(&uval);
+	tst_res(TINFO, "Tested kernel: %s %s %s", uval.release, uval.version, uval.machine);
+
 	do_setup(argc, argv);
 	tst_enable_oom_protection(context->lib_pid);
 
 	SAFE_SIGNAL(SIGALRM, alarm_handler);
 	SAFE_SIGNAL(SIGUSR1, heartbeat_handler);
 
-	tst_res(TINFO, "LTP version: "LTP_VERSION);
-
-	uname(&uval);
-	tst_res(TINFO, "Tested kernel: %s %s %s", uval.release, uval.version, uval.machine);
-
 	if (tst_test->min_runtime && !tst_test->runtime)
 		tst_test->runtime = tst_test->min_runtime;
 
-- 
2.55.0


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

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

end of thread, other threads:[~2026-10-01 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  9:51 [LTP] [PATCH 1/1] lib: Print version and kernel early enough Petr Vorel
2026-09-30 15:04 ` [LTP] " linuxtestproject.agent
2026-10-01 13:59 ` [LTP] [PATCH 1/1] " Cyril Hrubis
2026-10-01 15:13   ` Petr Vorel

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.