Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/xe_vm: Do not assert uninitalized variable
Date: Fri,  7 Apr 2023 13:40:16 +0200	[thread overview]
Message-ID: <20230407114016.28728-1-dominik.grzegorzek@intel.com> (raw)

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

             reply	other threads:[~2023-04-07 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 11:40 Dominik Grzegorzek [this message]
2023-04-07 13:55 ` [igt-dev] [PATCH i-g-t] tests/xe_vm: Do not assert uninitalized variable 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230407114016.28728-1-dominik.grzegorzek@intel.com \
    --to=dominik.grzegorzek@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox