diff mbox

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

Message ID 1293662250-18292-8-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Dec. 29, 2010, 10:37 p.m. UTC
None
diff mbox

Patch

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))