We use installer._unload_modules() so we don't get an exception if no
module is loaded.

Note that we call _unload_modules() so we don't kill Qemu by accident.
If Qemu is running while the test runs, we will get a failure.

Signed-off-by: Eduardo Habkost <[email protected]>
---
 client/tests/kvm/tests/module_probe.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/tests/module_probe.py 
b/client/tests/kvm/tests/module_probe.py
index 7dcf5db..82b905b 100644
--- a/client/tests/kvm/tests/module_probe.py
+++ b/client/tests/kvm/tests/module_probe.py
@@ -32,6 +32,9 @@ def run_module_probe(test, params, env):
         mod_list = installer.full_module_list()
         logging.debug("mod list from installer: %r", mod_list)
 
+    # unload the modules before starting:
+    installer._unload_modules(mod_list)
+
     load_count = int(params.get("load_count", 100))
     try:
         for i in range(load_count):
-- 
1.7.3.2

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to