[PATCH i-g-t] tests/amd_queue_reset: fix critical warning in queue reset
Jesse.zhang@amd.com
jesse.zhang at amd.com
Thu Aug 29 09:17:27 UTC 2024
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 at 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
More information about the igt-dev
mailing list