From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: [PATCH 7/8] KVM test: add interface to get modules from cfg file, and load/unload them Date: Wed, 29 Dec 2010 20:37:29 -0200 Message-ID: <1293662250-18292-8-git-send-email-lmr@redhat.com> References: <1293662250-18292-1-git-send-email-lmr@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Suqin Huang , kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: In-Reply-To: <1293662250-18292-1-git-send-email-lmr@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org From: Suqin Huang The default modules are 'kvm, kvm_intel/amd, [ksm]' user can set the module list in cfg file the module names are splited with "," Signed-off-by: Suqin Huang Acked-by: Chen Cao --- client/tests/kvm/tests/module_probe.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/tests/module_probe.py b/client/tests/kvm/tests/module_probe.py index 519a916..727dcc2 100644 --- a/client/tests/kvm/tests/module_probe.py +++ b/client/tests/kvm/tests/module_probe.py @@ -6,7 +6,7 @@ def run_module_probe(test, params, env): """ load/unload kvm modules several times. - Packet Loss Test: + Module load/unload Test: 1) check host cpu module 2) get module info 3) unload modules if they exist, else load them @@ -35,11 +35,13 @@ def run_module_probe(test, params, env): arch = "kvm_amd" #Check whether ksm module exist + mod_str = "" if os.path.exists("/sys/module/ksm"): - mod_list = ["ksm", arch, "kvm"] - else: - mod_list = [arch, "kvm"] + mod_str = "ksm," + mod_str += "%s, kvm" % arch + mod_str = params.get("mod_list", mod_str) + mod_list = re.split(",", mod_str) logging.debug(mod_list) load_count = int(params.get("load_count", 100)) -- 1.7.2.3