[PATCH i-g-t] tests/amdgpu: fix VM test issue

Jesse Zhang jesse.zhang at amd.com
Thu Dec 14 09:07:49 UTC 2023


In some cases, the size of Vram and GTT is not large, such as mobile devices.
It should be skipped.

Cc: Vitaly Prosyak <vitaly.prosyak at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Christian Koenig <christian.koenig at amd.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>

Signed-off-by: Jesse zhang <jesse.zhang at amd.com>
---
 tests/amdgpu/amd_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/amdgpu/amd_vm.c b/tests/amdgpu/amd_vm.c
index 11be25ae8..0dde28e2e 100644
--- a/tests/amdgpu/amd_vm.c
+++ b/tests/amdgpu/amd_vm.c
@@ -127,8 +127,8 @@ amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle)
 	request.preferred_heap = AMDGPU_GEM_DOMAIN_VRAM;
 	request.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
 
-	r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
-	igt_assert_eq(r, 0);
+	/* Don't let the test fail if the device doesn't have enough VRAM */
+	igt_skip_on(amdgpu_bo_alloc(device_handle, &request, &buf_handle));
 
 	r = amdgpu_va_range_alloc(device_handle, amdgpu_gpu_va_range_general,
 				4ULL << 30, 1ULL << 30, 0, &vmc_addr,
-- 
2.25.1



More information about the igt-dev mailing list