From: Matthew Auld <matthew.auld@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/intel/xe_mmap: sanity check partial munmap
Date: Thu, 7 Dec 2023 15:25:46 +0000 [thread overview]
Message-ID: <20231207152546.360422-1-matthew.auld@intel.com> (raw)
Make sure we have some basic coverage for partial munmap, since this can
lead to multiple vm_close calls per mmap, and therefore anything we do
in vm_close should be mirrored in vm_open, otherwise we should expect
explosions.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
---
tests/intel/xe_mmap.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/intel/xe_mmap.c b/tests/intel/xe_mmap.c
index 63fdf46a8..8faacdb5c 100644
--- a/tests/intel/xe_mmap.c
+++ b/tests/intel/xe_mmap.c
@@ -57,7 +57,12 @@ test_mmap(int fd, uint32_t placement, uint32_t flags)
map = xe_bo_map(fd, bo, bo_size);
strcpy(map, "Write some data to the BO!");
+ munmap(map, bo_size);
+ /* Also try partial munmap */
+ map = xe_bo_map(fd, bo, bo_size);
+ munmap(map, bo_size/2);
+ strcpy(map + bo_size/2, "More data to the BO!");
munmap(map, bo_size);
gem_close(fd, bo);
--
2.43.0
next reply other threads:[~2023-12-07 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 15:25 Matthew Auld [this message]
2023-12-07 19:42 ` ✓ Fi.CI.BAT: success for tests/intel/xe_mmap: sanity check partial munmap Patchwork
2023-12-07 21:09 ` ✗ CI.xeBAT: failure " Patchwork
2023-12-08 6:30 ` ✗ 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=20231207152546.360422-1-matthew.auld@intel.com \
--to=matthew.auld@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