public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [KVM-AUTOTEST PATCH] Instead of trying to remove kvm modules with rmmod, use modprobe -r, as it handles module dependencies better
@ 2009-05-14 21:53 Lucas Meneghel Rodrigues
  2009-05-19 17:26 ` Mike Burns
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-05-14 21:53 UTC (permalink / raw)
  To: kvm

In certain situations, trying to do a rmmod on the kvm modules might
generate errors, as there is a chain of dependencies involved. Instead,
let's use modprobe -r, as it handles dependencies.

Signed-off-by: Lucas Meneghel Rodrigues <mrodrigu@redhat.com>

diff --git a/client/tests/kvm_runtest_2/kvm_install.py b/client/tests/kvm_runtes
index dbf8401..c27c6c7 100755
--- a/client/tests/kvm_runtest_2/kvm_install.py
+++ b/client/tests/kvm_runtest_2/kvm_install.py
@@ -192,9 +192,9 @@ def __load_kvm_modules():
     #utils.system("pkill qemu 1>/dev/null 2>&1", ignore_status=True)
     utils.system("pkill qemu", ignore_status=True)
     #if utils.system("grep kvm_%s /proc/modules 1>/dev/null" % vendor, ignore_s
-    utils.system("/sbin/rmmod kvm_%s" % vendor, ignore_status=True)
+    utils.system("/sbin/modprobe -r kvm_%s" % vendor, ignore_status=True)
     #if utils.system("grep kvm /proc/modules 1>/dev/null", ignore_status=True) 
-    utils.system("/sbin/rmmod kvm", ignore_status=True)
+    utils.system("/sbin/modprobe -r kvm", ignore_status=True)
 
     if utils.system("grep kvm /proc/modules 1>/dev/null", ignore_status=True) =
         message = "Failed to remove old KVM modules"

-- 
Lucas Meneghel Rodrigues
Software Engineer (QE)
Red Hat - Emerging Technologies


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

end of thread, other threads:[~2009-05-24 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 21:53 [KVM-AUTOTEST PATCH] Instead of trying to remove kvm modules with rmmod, use modprobe -r, as it handles module dependencies better Lucas Meneghel Rodrigues
2009-05-19 17:26 ` Mike Burns
2009-05-24 14:54   ` Avi Kivity

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