[PATCH 7/8] KVM test: add interface to get modules from cfg file, and load/unload them

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Suqin Huang <shuang@xxxxxxxxxx>

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 <shuang@xxxxxxxxxx>
Acked-by: Chen Cao <kcao@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux