public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] lib/tst_module.c: Replace "rmmod" with "modprobe -r"
@ 2023-11-03 16:03 Petr Vorel
  2023-11-03 16:53 ` Edward Liaw via ltp
  2023-11-03 18:54 ` Petr Vorel
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2023-11-03 16:03 UTC (permalink / raw)
  To: ltp; +Cc: Richard Palethorpe

"modprobe -r" will remove also the dependencies loaded for kernel
modules.

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tst_module.c b/lib/tst_module.c
index 9bd443623..e52bb6e00 100644
--- a/lib/tst_module.c
+++ b/lib/tst_module.c
@@ -105,7 +105,7 @@ void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name)
 {
 	int i, rc;
 
-	const char *const argv[] = { "rmmod", mod_name, NULL };
+	const char *const argv[] = { "modprobe", "-r", mod_name, NULL };
 
 	rc = 1;
 	for (i = 0; i < 50; i++) {
-- 
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-03 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 16:03 [LTP] [PATCH 1/1] lib/tst_module.c: Replace "rmmod" with "modprobe -r" Petr Vorel
2023-11-03 16:53 ` Edward Liaw via ltp
2023-11-03 22:16   ` Petr Vorel
2023-11-03 23:02     ` Edward Liaw via ltp
2023-11-03 18:54 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox