All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jani.nikula@intel.com, pranay.samala@intel.com,
	karthik.b.s@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 7/8] tests/intel/xe_module_load: Verify driver unload result
Date: Wed, 18 Nov 2026 21:14:22 +0530	[thread overview]
Message-ID: <20261118154426.345883-8-jeevan.b@intel.com> (raw)
In-Reply-To: <20261118154426.345883-1-jeevan.b@intel.com>

Assert that igt_xe_driver_unload() succeeds in the unload and reload
subtests instead of ignoring its return value. In the unload subtest also
check that xe is gone and that intel_display is unloaded too, unless i915
is still loaded and holds it.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/intel/xe_module_load.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/intel/xe_module_load.c b/tests/intel/xe_module_load.c
index ae6c6708b..afb1bc0cd 100644
--- a/tests/intel/xe_module_load.c
+++ b/tests/intel/xe_module_load.c
@@ -130,7 +130,13 @@ int igt_main()
 	}
 
 	igt_subtest("unload") {
-		igt_xe_driver_unload();
+		igt_assert_eq(igt_xe_driver_unload(), IGT_EXIT_SUCCESS);
+		igt_assert(!igt_kmod_is_loaded("xe"));
+
+		/* intel_display stays only if i915 still uses it */
+		if (!igt_kmod_is_loaded("i915"))
+			igt_assert_f(!igt_kmod_is_loaded("intel_display"),
+				     "intel_display still loaded after xe unload\n");
 	}
 
 	igt_subtest("force-load") {
@@ -143,9 +149,9 @@ int igt_main()
 	}
 
 	igt_subtest("reload-no-display") {
-		igt_xe_driver_unload();
+		igt_assert_eq(igt_xe_driver_unload(), IGT_EXIT_SUCCESS);
 		load_and_check_xe("probe_display=0");
-		igt_xe_driver_unload();
+		igt_assert_eq(igt_xe_driver_unload(), IGT_EXIT_SUCCESS);
 	}
 
 	igt_subtest("many-reload") {
@@ -153,14 +159,14 @@ int igt_main()
 
 		for (i = 0; i < 10; i++) {
 			igt_debug("reload cycle: %d\n", i);
-			igt_xe_driver_unload();
+			igt_assert_eq(igt_xe_driver_unload(), IGT_EXIT_SUCCESS);
 			load_and_check_xe(NULL);
 			sleep(1);
 		}
 	}
 
 	igt_subtest("reload") {
-		igt_xe_driver_unload();
+		igt_assert_eq(igt_xe_driver_unload(), IGT_EXIT_SUCCESS);
 		load_and_check_xe(NULL);
 
 		/* only default modparams, can leave module loaded */
-- 
2.43.0


  parent reply	other threads:[~2026-11-18 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 15:44 [PATCH i-g-t 0/8] RFC: Add intel_display module support to module load tests Jeevan B
2026-11-18 15:44 ` [PATCH i-g-t 1/8] lib/igt_params: Fall back to intel_display module parameters Jeevan B
2026-11-18 15:44 ` [PATCH i-g-t 2/8] tests/kms_panel_fitting: Find fastboot param with a dedicated display module Jeevan B
2026-11-19  9:13   ` Jani Nikula
2026-11-18 15:44 ` [PATCH i-g-t 3/8] tests/intel/i915_module_load: Check intel_display in load subtest Jeevan B
2026-11-18 15:44 ` [PATCH i-g-t 4/8] tests/intel/xe_module_load: Check intel_display in load subtests Jeevan B
2026-11-18 15:44 ` [PATCH i-g-t 5/8] lib/igt_kmod: Unload intel_display together with the GPU driver Jeevan B
2026-11-18 15:44 ` [PATCH i-g-t 6/8] tests/intel: Add intel_display_module_load test Jeevan B
2026-11-18 15:44 ` Jeevan B [this message]
2026-11-18 15:44 ` [PATCH i-g-t 8/8] tests/intel/i915_module_load: Verify driver unload result Jeevan B
2026-11-19  3:40 ` ✓ Xe.CI.BAT: success for RFC: Add intel_display module support to module load tests Patchwork
2026-11-19 12:46 ` ✗ i915.CI.BAT: failure " Patchwork
2026-11-20  3:40 ` ✗ Xe.CI.FULL: " 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=20261118154426.345883-8-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=pranay.samala@intel.com \
    /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.