From: "Jesse.zhang@amd.com" <jesse.zhang@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>,
"Jesse.zhang@amd.com" <jesse.zhang@amd.com>
Subject: [PATCH i-g-t] tests/amd_queue_reset: fix critical warning in queue reset
Date: Thu, 29 Aug 2024 17:17:27 +0800 [thread overview]
Message-ID: <20240829091727.192798-1-jesse.zhang@amd.com> (raw)
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
next reply other threads:[~2024-08-29 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 9:17 Jesse.zhang@amd.com [this message]
2024-08-29 11:12 ` ✓ CI.xeBAT: success for tests/amd_queue_reset: fix critical warning in queue reset 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240829091727.192798-1-jesse.zhang@amd.com \
--to=jesse.zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=vitaly.prosyak@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox