From patchwork Thu May 14 21:53:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 23839 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4EM2CUt006279 for ; Thu, 14 May 2009 22:02:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754108AbZENWCG (ORCPT ); Thu, 14 May 2009 18:02:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753812AbZENWCF (ORCPT ); Thu, 14 May 2009 18:02:05 -0400 Received: from mx2.redhat.com ([66.187.237.31]:38434 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753948AbZENWCD (ORCPT ); Thu, 14 May 2009 18:02:03 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4EM24np011144 for ; Thu, 14 May 2009 18:02:05 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4ELrm7L002132 for ; Thu, 14 May 2009 17:53:49 -0400 Received: from [10.11.12.33] (vpn-12-33.rdu.redhat.com [10.11.12.33]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4ELrlUW028577 for ; Thu, 14 May 2009 17:53:48 -0400 Subject: [KVM-AUTOTEST PATCH] Instead of trying to remove kvm modules with rmmod, use modprobe -r, as it handles module dependencies better From: Lucas Meneghel Rodrigues To: kvm@vger.kernel.org Date: Thu, 14 May 2009 18:53:46 -0300 Message-Id: <1242338026.2554.44.camel@localhost.localdomain> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 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"