[igt-dev] [PATCH i-g-t] tests/xe_create: Remove create-invalid-size subtest

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Jun 26 14:23:08 UTC 2023


Xe team decided to return real (not requested) bo size on create
ioctl return path. Subtest which tested returning -EINVAL on
not-aligned size is not valid anymore. Lets remove it.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 tests/xe/xe_create.c | 50 --------------------------------------------
 1 file changed, 50 deletions(-)

diff --git a/tests/xe/xe_create.c b/tests/xe/xe_create.c
index b427c51fd5..5c3708b587 100644
--- a/tests/xe/xe_create.c
+++ b/tests/xe/xe_create.c
@@ -42,52 +42,6 @@ static int __create_bo(int fd, uint32_t vm, uint64_t size, uint32_t flags,
 	return ret;
 }
 
-/**
- * SUBTEST: create-invalid-size
- * Description: Verifies xe bo create returns expected error code on invalid
- *              buffer sizes.
- */
-static void create_invalid_size(int fd)
-{
-	struct drm_xe_query_mem_region *memregion;
-	uint64_t memreg = all_memory_regions(fd), region;
-	uint32_t vm;
-	uint32_t handle;
-	int ret;
-
-	vm = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_BIND_OPS, 0);
-
-	xe_for_each_mem_region(fd, memreg, region) {
-		memregion = xe_mem_region(fd, region);
-
-		/* first try, use half of possible min page size */
-		ret = __create_bo(fd, vm, memregion->min_page_size >> 1,
-				  region, &handle);
-		if (!ret) {
-			gem_close(fd, handle);
-			xe_vm_destroy(fd, vm);
-		}
-		igt_assert_eq(ret, -EINVAL);
-
-		/*
-		 * second try, add page size to min page size if it is
-		 * bigger than page size.
-		 */
-		if (memregion->min_page_size > PAGE_SIZE) {
-			ret = __create_bo(fd, vm,
-					  memregion->min_page_size + PAGE_SIZE,
-					  region, &handle);
-			if (!ret) {
-				gem_close(fd, handle);
-				xe_vm_destroy(fd, vm);
-			}
-			igt_assert_eq(ret, -EINVAL);
-		}
-	}
-
-	xe_vm_destroy(fd, vm);
-}
-
 enum engine_destroy {
 	NOLEAK,
 	LEAK
@@ -214,10 +168,6 @@ igt_main
 		xe_device_get(xe);
 	}
 
-	igt_subtest("create-invalid-size") {
-		create_invalid_size(xe);
-	}
-
 	igt_subtest("create-engines-noleak")
 		create_engines(xe, NOLEAK);
 
-- 
2.34.1



More information about the igt-dev mailing list