All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH igt] igt/vgem_basic: Load and unload the module first
Date: Fri, 25 Aug 2017 19:21:50 +0100	[thread overview]
Message-ID: <20170825182150.2907-1-chris@chris-wilson.co.uk> (raw)

To ensure the module exists, first load it. Then when we try to unload
the module (to check that our modprobe interface works), we will not get
spurious failures due to -ENOENT (in this case meaning the module did
not exist):

(vgem_basic:18361) igt-core-DEBUG: Starting subtest: unload
(vgem_basic:18361) igt-kmod-DEBUG: Could not remove module vgem (No such file or directory)
Test requirement not met in function test_unload, file vgem_basic.c:331:
Test requirement: module_unload() == 0
Last errno: 2, No such file or directory

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/vgem_basic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/vgem_basic.c b/tests/vgem_basic.c
index 982da73a..cfd94071 100644
--- a/tests/vgem_basic.c
+++ b/tests/vgem_basic.c
@@ -328,6 +328,9 @@ static void test_unload(void)
 	int vgem, dmabuf;
 	uint32_t *ptr;
 
+	/* Load and unload vgem just to make sure it exists */
+	vgem = __drm_open_driver(DRIVER_VGEM);
+	igt_require(vgem != -1);
 	igt_require(module_unload() == 0);
 
 	vgem = __drm_open_driver(DRIVER_VGEM);
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-08-25 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 18:21 Chris Wilson [this message]
2017-08-25 18:26 ` [PATCH igt v2] igt/vgem_basic: Load and unload the module first Chris Wilson
2017-08-28  9:13   ` Petri Latvala
2017-08-25 18:40 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-08-25 19:13 ` ✓ Fi.CI.BAT: success for igt/vgem_basic: Load and unload the module first (rev2) Patchwork
2017-08-26  2:38 ` ✓ Fi.CI.IGT: success for igt/vgem_basic: Load and unload the module first Patchwork
2017-08-26  3:31 ` ✓ Fi.CI.IGT: success for igt/vgem_basic: Load and unload the module first (rev2) 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=20170825182150.2907-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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.