From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Burns Subject: Re: [PATCH][KVM-AUTOTEST] Add ability to install custom kernel modules Date: Wed, 20 May 2009 18:49:50 -0400 Message-ID: <4A14890E.7060902@redhat.com> References: <1242858392-9704-1-git-send-email-mburns@redhat.com> Reply-To: mburns@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: dhuff@redhat.com, ulublin@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53693 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756710AbZETWtv (ORCPT ); Wed, 20 May 2009 18:49:51 -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 n4KMnrfS010883 for ; Wed, 20 May 2009 18:49:53 -0400 In-Reply-To: <1242858392-9704-1-git-send-email-mburns@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Just found out this is really not going to work like I thought it would. I'll rework and repost later. Mike Burns wrote: > See comments and example in control file for details. > > Signed-off-by: Mike Burns > --- > client/tests/kvm_runtest_2/control | 6 ++++++ > client/tests/kvm_runtest_2/kvm_install.py | 7 +++++++ > 2 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm_runtest_2/control b/client/tests/kvm_runtest_2/control > index d6e26bc..02b1d22 100644 > --- a/client/tests/kvm_runtest_2/control > +++ b/client/tests/kvm_runtest_2/control > @@ -74,6 +74,12 @@ params = { > > ## Custom install > "install_script": 'custom_kvm_install.sh param1' > + > + ## Additional kernel modules to install > + ## Must be a comma separated list of values > + ## Installed in the order they are listed. > + ## to install mod1.ko, mod2.ko, mod3.ko, you would set like this: > + #"additional_modules": 'mod1,mod2,mod3' > } > > # Comment the job.run_test line if you do not want to install kvm on the host. > diff --git a/client/tests/kvm_runtest_2/kvm_install.py b/client/tests/kvm_runtest_2/kvm_install.py > index 392ef0c..4b703f6 100755 > --- a/client/tests/kvm_runtest_2/kvm_install.py > +++ b/client/tests/kvm_runtest_2/kvm_install.py > @@ -237,6 +237,13 @@ def __load_kvm_modules(): > os.chdir("x86") > utils.system("/sbin/insmod ./kvm.ko && sleep 1 && /sbin/insmod ./kvm-%s.ko" % vendor) > > + #Add additional modules specified in params by "additional_modules" > + #Modules must be named .ko and be located in the > + #same location as kvm and kvm-vendor modules > + for module in params.get("additional_modules").split(","): > + kvm_log.info("Installing module \"%s\"" % module) > + utils.system("/sbin/insmod ./%s.ko" % module ) > + > #elif self.config.load_modules == "no": > #kvm_log.info("user requested not to load kvm modules") > >