Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/xe_vm: Do not assert uninitalized variable
@ 2023-04-07 11:40 Dominik Grzegorzek
  2023-04-07 13:55 ` Manszewski, Christoph
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Grzegorzek @ 2023-04-07 11:40 UTC (permalink / raw)
  To: igt-dev

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@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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-08  0:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-07 11:40 [igt-dev] [PATCH i-g-t] tests/xe_vm: Do not assert uninitalized variable Dominik Grzegorzek
2023-04-07 13:55 ` Manszewski, Christoph
2023-04-07 21:38 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-08  0:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox