Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amd_queue_reset: fix critical warning in queue reset
@ 2024-08-29  9:17 Jesse.zhang@amd.com
  2024-08-29 11:12 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jesse.zhang@amd.com @ 2024-08-29  9:17 UTC (permalink / raw)
  To: igt-dev; +Cc: Vitaly Prosyak, Alex Deucher, Christian Koenig,
	Jesse.zhang@amd.com

When queue reset is run with the subtest parameter, a critical warning will be reported. For example:
run the command: sudo ./tests/amdgpu/amd_queue_reset --run-subtest amdgpu-GFX-CMD_STREAM_EXEC_INVALID_PACKET_LENGTH
the warnning is:
(amd_queue_reset:71723) igt_core-CRITICAL: Unknown subtest: amdgpu-GFX-CMD_STREAM_EXEC_INVALID_PACKET_LENGTH
Subtest amdgpu-GFX-CMD_STREAM_EXEC_INVALID_PACKET_LENGTH: SUCCESS (9.771s)
(amd_queue_reset:71722) igt_core-CRITICAL: Unknown subtest: amdgpu-GFX-CMD_STREAM_EXEC_INVALID_PACKET_LENGTH
(amd_queue_reset:71721) igt_core-CRITICAL: Unknown subtest: amdgpu-GFX-CMD_STREAM_EXEC_INVALID_PACKET_LENGTH

Because it has three processes (backgroud, monitor, test), not including subtest.
So when these three processes exit, the variable igt_exit_called needs to be masked to skip the warning report.

Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
---
 lib/igt_core.h                 | 2 +-
 tests/amdgpu/amd_queue_reset.c | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/igt_core.h b/lib/igt_core.h
index 06c5314bf..5b4f41504 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -1225,7 +1225,7 @@ void igt_skip_on_simulation(void);
 
 extern const char *igt_interactive_debug;
 extern bool igt_skip_crc_compare;
-
+extern bool igt_exit_called;
 /**
  * igt_log_level:
  * @IGT_LOG_DEBUG: debug information, not printed by default
diff --git a/tests/amdgpu/amd_queue_reset.c b/tests/amdgpu/amd_queue_reset.c
index 8482a371d..414677861 100644
--- a/tests/amdgpu/amd_queue_reset.c
+++ b/tests/amdgpu/amd_queue_reset.c
@@ -759,7 +759,8 @@ run_all(amdgpu_device_handle device, amdgpu_context_handle *arr_context_handle,
 			*monitor_child = getppid();
 			run_monitor_child(device, arr_context_handle, sh_mem, num_of_tests);
 				igt_success();
-				igt_exit();
+				igt_exit_called = true;
+				exit(0);
 		}
 		*test_child = fork();
 		if (*test_child == -1) {
@@ -768,13 +769,15 @@ run_all(amdgpu_device_handle device, amdgpu_context_handle *arr_context_handle,
 			*test_child = getppid();
 			run_test_child(device, arr_context_handle, sh_mem, num_of_tests, version);
 			igt_success();
-			igt_exit();
+			igt_exit_called = true;
+			exit(0);
 
 		}
 	} else if (process == PROCESS_BACKGROUND) {
 		run_background(device, sh_mem, num_of_tests);
 		igt_success();
-		igt_exit();
+		igt_exit_called = true;
+		exit(0);
 	}
 	return 0;
 }
-- 
2.25.1


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

end of thread, other threads:[~2024-08-30  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29  9:17 [PATCH i-g-t] tests/amd_queue_reset: fix critical warning in queue reset Jesse.zhang@amd.com
2024-08-29 11:12 ` ✓ CI.xeBAT: success for " Patchwork
2024-08-29 11:25 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-29 23:45 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-30  8:10 ` ✓ Fi.CI.IGT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox