[igt-dev] [PATCH 7/9] tests/amdgpu: add tests for invalid memory and register access

vitaly.prosyak at amd.com vitaly.prosyak at amd.com
Fri Nov 11 21:52:11 UTC 2022


From: Vitaly Prosyak <vitaly.prosyak at amd.com>

Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
Reviewed-by: Pierre-eric Pelloux-prayer <Pierre-eric.Pelloux-prayer at amd.com>
---
 tests/amdgpu/amd_deadlock.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/amdgpu/amd_deadlock.c b/tests/amdgpu/amd_deadlock.c
index d4de20114..df650c921 100644
--- a/tests/amdgpu/amd_deadlock.c
+++ b/tests/amdgpu/amd_deadlock.c
@@ -58,6 +58,18 @@ amdgpu_deadlock_sdma(amdgpu_device_handle device_handle)
 	amdgpu_wait_memory_helper(device_handle, AMDGPU_HW_IP_DMA);
 }
 
+static void
+amdgpu_gfx_illegal_reg_access(amdgpu_device_handle device_handle)
+{
+	bad_access_helper(device_handle, 1, AMDGPU_HW_IP_GFX);
+}
+
+static void
+amdgpu_gfx_illegal_mem_access(amdgpu_device_handle device_handle)
+{
+	bad_access_helper(device_handle, 0, AMDGPU_HW_IP_GFX);
+}
+
 igt_main
 {
 	amdgpu_device_handle device;
@@ -86,6 +98,12 @@ igt_main
 	igt_subtest("amdgpu_deadlock_sdma")
 	amdgpu_deadlock_sdma(device);
 
+	igt_subtest("amdgpu_gfx_illegal_reg_access")
+	amdgpu_gfx_illegal_reg_access(device);
+
+	igt_subtest("amdgpu_gfx_illegal_mem_access")
+	amdgpu_gfx_illegal_mem_access(device);
+
 	igt_subtest("amdgpu_deadlock_gfx")
 	amdgpu_deadlock_gfx(device);
 
-- 
2.25.1



More information about the igt-dev mailing list