diff mbox series

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

Message ID 20230704091933.496989-4-pvorel@suse.cz
State Changes Requested
Headers show
Series [RFC,1/3] Makefile: Add C header with generated LTP version | expand

Commit Message

Petr Vorel July 4, 2023, 9:19 a.m. UTC
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 mbox series

Patch

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);