[PATCH i-g-t] lib/igt_core: Add ftrace logs at test boundaries

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Fri Feb 21 22:31:00 UTC 2025


Wrong version sent, please ignore.

On Fri, Feb 21, 2025 at 02:27:39PM -0800, Umesh Nerlige Ramappa wrote:
>When looking at kernel ftrace output, it would really help to see the
>test start/exit boundaries.
>
>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
>---
> lib/igt_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/lib/igt_core.c b/lib/igt_core.c
>index b95db1b25..6d9928e36 100644
>--- a/lib/igt_core.c
>+++ b/lib/igt_core.c
>@@ -1324,6 +1324,7 @@ out:
> 	if (!igt_only_list_subtests()) {
> 		bind_fbcon(false);
> 		igt_kmsg(KMSG_INFO "%s: executing\n", command_str);
>+		igt_trace(KMSG_INFO "%s: executing\n", command_str);
> 		print_version();
> 		igt_srandom();
>
>@@ -1528,6 +1529,8 @@ bool __igt_run_subtest(const char *subtest_name, const char *file, const int lin
>
> 	igt_kmsg(KMSG_INFO "%s: starting subtest %s\n",
> 		 command_str, subtest_name);
>+	igt_trace(KMSG_INFO "%s: starting subtest %s\n",
>+		  command_str, subtest_name);
> 	_subtest_starting_message(_SUBTEST_TYPE_NORMAL, subtest_name);
>
> 	_igt_log_buffer_reset();
>@@ -1681,6 +1684,8 @@ __noreturn static void exit_subtest(const char *result)
> 				igt_time_elapsed(thentime, &now));
> 	igt_kmsg(KMSG_INFO "%s: finished subtest %s, %s\n",
> 		 command_str, *subtest_name, result);
>+	igt_trace(KMSG_INFO "%s: finished subtest %s, %s\n",
>+		  command_str, *subtest_name, result);
>
> 	igt_terminate_spins();
>
>-- 
>2.34.1
>


More information about the igt-dev mailing list