[PATCH i-g-t] tests/intel/xe_exec_atomic: fix basic-inc-all
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon Jan 29 18:54:12 UTC 2024
Previous test removed skips on unsupported system memory on dGPU
but did it only for basic-dec-all. Fix it for second test
basic-inc-all. Also while at this, use drm_open_driver and
drm_close_driver which takes care of xe device get/put.
Cc: Nirmoy Das <nirmoy.das at intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
tests/intel/xe_exec_atomic.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tests/intel/xe_exec_atomic.c b/tests/intel/xe_exec_atomic.c
index 48c70ec72..d9790da78 100644
--- a/tests/intel/xe_exec_atomic.c
+++ b/tests/intel/xe_exec_atomic.c
@@ -124,10 +124,8 @@ igt_main
struct drm_xe_engine_class_instance *hwe;
int fd;
- igt_fixture {
+ igt_fixture
fd = drm_open_driver(DRIVER_XE);
- xe_device_get(fd);
- }
igt_subtest_with_dynamic("basic-dec-all") {
xe_for_each_engine(fd, hwe) {
@@ -152,8 +150,8 @@ igt_main
uint64_t memreg = all_memory_regions(fd), region;
xe_for_each_mem_region(fd, memreg, region) {
-
- igt_skip_on(!has_atomics(fd, region));
+ if (!has_atomics(fd, region))
+ continue;
igt_dynamic_f("Engine-%s-Instance-%d-Tile-%d-%s-memory",
xe_engine_class_string(hwe->engine_class),
@@ -165,8 +163,6 @@ igt_main
}
}
- igt_fixture {
- xe_device_put(fd);
- close(fd);
- }
+ igt_fixture
+ drm_close_driver(fd);
}
--
2.42.0
More information about the igt-dev
mailing list