Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amdgpu: print expect error information
@ 2024-09-13 10:07 Jesse.zhang@amd.com
  2024-09-13 11:42 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jesse.zhang@amd.com @ 2024-09-13 10:07 UTC (permalink / raw)
  To: igt-dev
  Cc: Vitaly Prosyak, Alex Deucher, Christian Koenig, Kamil Konieczny,
	Jesse.zhang@amd.com

Because they are negative tests, some errors are expected.
Print the expected errors for each test.

Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
---
 tests/amdgpu/amd_queue_reset.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/amdgpu/amd_queue_reset.c b/tests/amdgpu/amd_queue_reset.c
index 68575d496..bd0deb271 100644
--- a/tests/amdgpu/amd_queue_reset.c
+++ b/tests/amdgpu/amd_queue_reset.c
@@ -1090,6 +1090,7 @@ igt_main
 	unsigned int ring_id_bad;
 	unsigned int ring_id_job_good;
 	unsigned int ring_id_job_bad;
+	int expect_error;
 
 	enum amd_ip_block_type ip_tests[2] = {AMD_IP_COMPUTE/*keep first*/, AMD_IP_GFX};
 	enum amd_ip_block_type ip_background = AMD_IP_COMPUTE;
@@ -1146,7 +1147,6 @@ igt_main
 
 		r = is_run_device_parameter_found(argc, argv);
 		snprintf(shm_name,sizeof(shm_name),"/queue_reset_shm_%d",r);
-
 		fd = drm_open_driver(DRIVER_AMDGPU);
 
 		err = amdgpu_device_initialize(fd, &major, &minor, &device);
@@ -1186,6 +1186,17 @@ igt_main
 			process, sh_mem, const_num_of_tests, info[0].hw_ip_version_major,
 			&monitor_child, &test_child);
 	}
+	//print expect error table for each test
+	if(!argc)  {// --list-subtests arg is 0
+		for (int i = 0; i < ARRAY_SIZE(ip_tests); i++)
+			for (struct dynamic_test *it = &arr_err[0]; it->name; it++) {
+				expect_error = ip_tests[i] == AMD_IP_COMPUTE ?
+						it->result.compute_reset_result : it->result.gfx_reset_result;
+				printf("test ip: %s,  test: %s,  expected error:%d \n",
+					ip_tests[i] == AMD_IP_COMPUTE ? "COMPUTE":"GFX", it->name, expect_error);
+			}
+	}
+
 	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++) {
-- 
2.25.1


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

end of thread, other threads:[~2024-09-14  0:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 10:07 [PATCH i-g-t] tests/amdgpu: print expect error information Jesse.zhang@amd.com
2024-09-13 11:42 ` ✓ CI.xeBAT: success for " Patchwork
2024-09-13 12:04 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-13 19:19 ` [PATCH i-g-t] " vitaly prosyak
2024-09-14  0:18 ` ✗ CI.xeFULL: failure for " Patchwork

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