[LTP] [RFC PATCH 3/3] lib/C-API: Print LTP version at test start

Petr Vorel pvorel@suse.cz
Tue Jul 4 11:19:33 CEST 2023


Although -V option for printing version was added in previous commit,
having a way to always print LTP version at the beginning of the test
(makes debugging of troubleshooting reported issues even easier).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index e81a3d036..c93ef6aac 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1677,6 +1677,8 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self)
 	SAFE_SIGNAL(SIGALRM, alarm_handler);
 	SAFE_SIGNAL(SIGUSR1, heartbeat_handler);
 
+	tst_res(TINFO, LTP_VERSION);
+
 	if (tst_test->max_runtime)
 		results->max_runtime = multiply_runtime(tst_test->max_runtime);
 
-- 
2.40.1



More information about the ltp mailing list