Do it in the reverse order. unload_module() is able to follow dependencies, but it is safer to simply unload the modules in the reverse of the order we loaded them so we don't hit any dependencies.
Signed-off-by: Eduardo Habkost <[email protected]> --- client/tests/kvm/kvm/installer.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm/installer.py b/client/tests/kvm/kvm/installer.py index 3632535..bfe3438 100644 --- a/client/tests/kvm/kvm/installer.py +++ b/client/tests/kvm/kvm/installer.py @@ -62,11 +62,11 @@ def load_kvm_modules(vendor, module_dir=None, load_stock=False, extra_modules=No def _unload_kvm_modules(vendor, extra_modules): logging.info("Unloading previously loaded KVM modules") - utils.unload_module("kvm-%s" % (vendor)) - utils.unload_module("kvm") if extra_modules: - for module in extra_modules: + for module in reversed(extra_modules): utils.unload_module(module) + utils.unload_module("kvm-%s" % (vendor)) + utils.unload_module("kvm") def _load_kvm_modules(vendor, module_dir=None, load_stock=False, extra_modules=None): """Just load the KVM modules, without killing Qemu or unloading previous modules -- 1.7.3.2 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
