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>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
"Jesse.zhang@amd.com" <jesse.zhang@amd.com>
Subject: [PATCH i-g-t] test/amdgpu: fix unknow test issue for amdgpu queue test
Date: Tue, 27 Aug 2024 13:19:32 +0800 [thread overview]
Message-ID: <20240827051932.74382-1-jesse.zhang@amd.com> (raw)
Queue reset does not exit properly when executing unknown subtests.
Because other processes are still functioning.
It should exit the other three processes
(test, background, and monitor) for this case.
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
---
tests/amdgpu/amd_queue_reset.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/amdgpu/amd_queue_reset.c b/tests/amdgpu/amd_queue_reset.c
index 60208e085..85408e3ff 100644
--- a/tests/amdgpu/amd_queue_reset.c
+++ b/tests/amdgpu/amd_queue_reset.c
@@ -70,6 +70,7 @@ struct shmbuf {
int count;
bool sub_test_completed;
bool sub_test_is_skipped;
+ bool sub_test_is_existed;
unsigned int test_flags;
int test_error_code;
bool reset_completed;
@@ -148,6 +149,7 @@ skip_sub_test(struct shmbuf *sh_mem)
{
sem_wait(&sh_mem->sem_state_mutex);
sh_mem->sub_test_is_skipped = true;
+ sh_mem->sub_test_is_existed = true;
sem_post(&sh_mem->sem_state_mutex);
}
@@ -327,6 +329,7 @@ static void set_next_test_to_run(struct shmbuf *sh_mem, unsigned int error,
sh_mem->good_job.ip = ip_good;
sh_mem->good_job.ring_id = ring_id_good;
sh_mem->sub_test_is_skipped = false;
+ sh_mem->sub_test_is_existed = true;
sem_post(&sh_mem->sem_state_mutex);
//sync and wait for complete
@@ -405,6 +408,7 @@ shared_mem_create(struct shmbuf **ppbuf)
shmp->sub_test_completed = false;
shmp->reset_completed = false;
shmp->sub_test_is_skipped = false;
+ shmp->sub_test_is_existed = false;
*ppbuf = shmp;
return shm_fd;
@@ -1128,7 +1132,6 @@ igt_main
create_contexts(device, &arr_context_handle, const_num_of_tests);
else if (process == PROCESS_BACKGROUND)
fd_shm = shared_mem_open(&sh_mem);
-
igt_require(fd_shm != -1);
igt_require(sh_mem != NULL);
@@ -1136,7 +1139,6 @@ igt_main
process, sh_mem, const_num_of_tests, info[0].hw_ip_version_major,
&monitor_child, &test_child);
}
-
for (int i = 0; i < ARRAY_SIZE(ip_tests); i++) {
reset_rings_numbers(&ring_id_good, &ring_id_bad, &ring_id_job_good, &ring_id_job_bad);
for (struct dynamic_test *it = &arr_err[0]; it->name; it++) {
@@ -1154,6 +1156,10 @@ igt_main
}
}
}
+
+ if (sh_mem &&( !sh_mem->sub_test_is_existed))
+ set_next_test_to_skip(sh_mem);
+
igt_fixture {
if (process == PROCESS_TEST) {
waitpid(monitor_child, &monitorExitMethod, 0);
--
2.25.1
next reply other threads:[~2024-08-27 5:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 5:19 Jesse.zhang@amd.com [this message]
2024-08-27 5:56 ` ✓ CI.xeBAT: success for test/amdgpu: fix unknow test issue for amdgpu queue test Patchwork
2024-08-27 6:04 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-27 7:24 ` [PATCH i-g-t] " Kamil Konieczny
2024-08-27 7:54 ` Zhang, Jesse(Jie)
2024-08-28 1:50 ` vitaly prosyak
2024-08-28 2:00 ` Zhang, Jesse(Jie)
2024-08-28 2:05 ` vitaly prosyak
2024-08-27 12:17 ` ✗ CI.xeFULL: failure for " Patchwork
2024-08-28 5:33 ` ✗ Fi.CI.IGT: " 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=20240827051932.74382-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=kamil.konieczny@linux.intel.com \
--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