From patchwork Wed Dec 29 22:37:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 440101 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBUMBElV000490 for ; Thu, 30 Dec 2010 22:11:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101Ab0L2Whs (ORCPT ); Wed, 29 Dec 2010 17:37:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45471 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089Ab0L2Whr (ORCPT ); Wed, 29 Dec 2010 17:37:47 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBTMbkb3010587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Dec 2010 17:37:46 -0500 Received: from freedom.redhat.com (vpn-8-145.rdu.redhat.com [10.11.8.145]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBTMbWix012882; Wed, 29 Dec 2010 17:37:45 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Suqin Huang 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> In-Reply-To: <1293662250-18292-1-git-send-email-lmr@redhat.com> References: <1293662250-18292-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Dec 2010 22:12:00 +0000 (UTC) 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))