[PATCH i-g-t] lib/igt_kmod: stop using KMOD_REMOVE_FORCE, again

Lucas De Marchi lucas.demarchi at intel.com
Wed Oct 30 23:49:08 UTC 2024


Just like done in commit 93ad5b785ea0 ("lib/igt_kmod: stop using
KMOD_REMOVE_FORCE"). From igt perspective, if a module can't be removed,
forcing its removal is not the right thing to do: the test should just
fail and be fixed.

If the kernel actually enforces KMOD_REMOVE_FORCE, then it would just
taint and all tests get aborted. Lastly, our kernel config doesn't have
CONFIG_MODULE_FORCE_UNLOAD set, so this is pointless for multiple times.

Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
 lib/igt_kmod.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 75a0d057c..cc3e5e5b1 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1409,8 +1409,7 @@ static void __igt_kunit(struct igt_ktest *tst,
 			char glob[1024];
 			int i;
 
-			igt_skip_on(kmod_module_remove_module(tst->kmod,
-							      KMOD_REMOVE_FORCE));
+			igt_skip_on(kmod_module_remove_module(tst->kmod, 0));
 			igt_skip_on(igt_kernel_tainted(&taints));
 
 			igt_assert_lt(snprintf(glob, sizeof(glob), "%s.%s",
-- 
2.47.0



More information about the igt-dev mailing list