[PATCH i-g-t 6/7] HAX: debug messages

Dominik Karol Piatkowski dominik.karol.piatkowski at intel.com
Thu May 18 05:47:59 UTC 2023


---
 lib/igt_ktap.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c
index 11f4a607..8a0133e7 100644
--- a/lib/igt_ktap.c
+++ b/lib/igt_ktap.c
@@ -370,27 +370,35 @@ igt_ktap_parser_start:
 				igt_warn("kmsg truncated: too many messages. You may want to increase log_buf_len in kmcdline\n");
 				continue;
 			}
+			igt_info("[DEBUG] read successful; results.still_running: %d\n", READ_ONCE(results.still_running));
 		}
 
 		clock_gettime(CLOCK_MONOTONIC, &last_kmsg);
 
 		while (sublevel >= 0) {
+
+			igt_info("[DEBUG] sublevel: %d\n", sublevel);
+
 			switch (find_next_tap_subtest(fp, record, is_builtin)) {
 			case -2:
 				/* no more data to read */
+				igt_info("[DEBUG] find_next_tap_subtest: -2\n");
 				goto igt_ktap_parser_start;
 			case -1:
 				/* no test found, so we keep parsing */
+				igt_info("[DEBUG] find_next_tap_subtest: -1\n");
 				break;
 			case 0:
 				/*
 				 * tests found, but they're missing info, so we might
 				 * have read into test output
 				 */
+				igt_info("[DEBUG] find_next_tap_subtest: 0\n");
 				found_tests = true;
 				sublevel++;
 				break;
 			default:
+				igt_info("[DEBUG] find_next_tap_subtest: default\n");
 				while (read(fp_fd, record, BUF_LEN) < 0) {
 					if (errno == EINTR)
 						continue;
@@ -416,8 +424,10 @@ igt_ktap_parser_start:
 
 			switch (parse_kmsg_for_tap(fp, record, test_name)) {
 			case -2:
+				igt_info("[DEBUG] parse_kmsg_for_tap: -2\n");
 				goto igt_ktap_parser_start;
 			case -1:
+				igt_info("[DEBUG] parse_kmsg_for_tap: -1\n");
 				sublevel--;
 				failed_tests = true;
 
@@ -443,18 +453,24 @@ igt_ktap_parser_start:
 				test_name[0] = '\0';
 				break;
 			case 0: /* fallthrough */
+				igt_info("[DEBUG] parse_kmsg_for_tap: 0\n");
 				igt_subtest(test_name)
 					igt_success();
 				test_name[0] = '\0';
 			default:
+				igt_info("[DEBUG] parse_kmsg_for_tap: default\n");
 				break;
 			}
 		}
 
+		igt_info("[DEBUG] sublevel_after: %d\n", sublevel);
+
 		if (sublevel < 0)
 			ktap_args.is_running = false;
 	}
 
+	igt_info("[DEBUG] outside main loop\n");
+
 	if (failed_tests || !found_tests)
 		ktap_args.ret = IGT_EXIT_FAILURE;
 	else
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list