[PATCH] tests/intel/xe_vm: Fix assertion on the return value of mmap

Shuicheng Lin shuicheng.lin at intel.com
Tue May 27 21:59:15 UTC 2025


The return value of mmap is stored in map, so the assertion should
use map instead of data.

Cc: Matthew Brost <matthew.brost at intel.com>
Cc: Brian Nguyen <brian3.nguyen at intel.com>
Cc: Alex Zuo <alex.zuo at intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
---
 tests/intel/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index 5cbd56037..b5bba7b7e 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1846,7 +1846,7 @@ try_again_after_invalidate:
 		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);
 		goto try_again_after_invalidate;
 	}
 
-- 
2.25.1



More information about the igt-dev mailing list