[igt-dev] [PATCH i-g-t] tests/xe_vm: Do not assert uninitalized variable
Dominik Grzegorzek
dominik.grzegorzek at intel.com
Fri Apr 7 11:40:16 UTC 2023
test_munmap_style_unbind() used wrong, uninitialized variable
in assert of mmap result. That could lead to unextpected failure.
Use correct one.
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
---
tests/xe/xe_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xe/xe_vm.c b/tests/xe/xe_vm.c
index ce770f2a9..c09b9714b 100644
--- a/tests/xe/xe_vm.c
+++ b/tests/xe/xe_vm.c
@@ -1331,7 +1331,7 @@ test_munmap_style_unbind(int fd, struct drm_xe_engine_class_instance *eci,
map = mmap(from_user_pointer(addr), bo_size, PROT_READ |
PROT_WRITE, MAP_SHARED | MAP_FIXED |
MAP_ANONYMOUS, -1, 0);
- igt_assert(data != MAP_FAILED);
+ igt_assert(map != MAP_FAILED);
} else {
bo = xe_bo_create(fd, eci->gt_id, vm, bo_size);
map = xe_bo_map(fd, bo, bo_size);
--
2.34.1
More information about the igt-dev
mailing list