From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/vgem_basic: Fix unload testcase
Date: Thu, 27 May 2021 16:07:32 +0200 [thread overview]
Message-ID: <20210527140732.5762-1-daniel.vetter@ffwll.ch> (raw)
An mmap _should_ keep the module alive.
This reverts
commit 8abe91985b30f8a26cdcb6816d2393956f171ea5
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Oct 5 14:40:16 2016 +0100
igt/vgem_basic: Allow mmap() to persist without the vgem module loaded
With real drivers there is usually more than just shmem around, so
encoding this as some kind of expectation just doesn't make sense at
all.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
tests/vgem_basic.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/vgem_basic.c b/tests/vgem_basic.c
index 526636dd1772..57c575e2e51b 100644
--- a/tests/vgem_basic.c
+++ b/tests/vgem_basic.c
@@ -382,14 +382,18 @@ static void test_unload(void)
close(dmabuf);
/* Although closed, the mmap should keep the dmabuf/module alive */
- igt_assert_f(module_unload() == 0,
- "A mmap should not keep the module alive\n");
+ igt_assert_f(module_unload() != 0,
+ "A mmap should keep the module alive\n");
for (int page = 0; page < bo.size >> 12; page++)
ptr[1024*page + page%1024] = page;
/* And finally we should have no more uses on the module. */
munmap(ptr, bo.size);
+
+ igt_assert_f(module_unload() == 0,
+ "No mmap anymore, should be able to unload\n");
+
}
static bool has_prime_export(int fd)
--
2.24.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2021-05-27 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 14:07 Daniel Vetter [this message]
2021-05-27 15:03 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/vgem_basic: Fix unload testcase Patchwork
2021-07-13 16:39 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/vgem_basic: Fix unload testcase (rev2) Patchwork
2021-08-12 19:38 ` [igt-dev] [PATCH i-g-t] tests/vgem_basic: Fix unload testcase Daniel Vetter
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=20210527140732.5762-1-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.