[Avocado-devel] Bug: Once created VM object stays for all tests.
Andrei Stepanov
astepano at redhat.com
Tue Jan 31 17:15:33 UTC 2017
Hi.
It seems that avocado-vt has a serious bug.
Test case: run a few avocado-vt tests in a bunch. For example two tests.
Test1 starts just right after Test2.
Test1.
Test2.
Test1 & Test2 use the same name for VM in cartesian configs:
vms = guest
Other options for VM() objects are different, for example port VNC port,
some device config, etc....
The problem is that: KVM from Test2 uses VM() object that was created for
Test1.
For Test2:
virttest/env_process.py:
def preprocess_vm(test, params, env, name):
vm = env.get_vm(name) <--- returns VM that was created for Test1.
create_vm == False
It can be fixed by:
diff --git a/virttest/env_process.py b/virttest/env_process.py
index d05976e..7c08df4 100644
--- a/virttest/env_process.py
+++ b/virttest/env_process.py
@@ -687,9 +687,8 @@ def preprocess(test, params, env):
vm = env[key]
if not isinstance(vm, virt_vm.BaseVM):
continue
- if vm.name not in requested_vms:
- vm.destroy()
- del env[key]
+ vm.destroy()
+ del env[key]
if (params.get("auto_cpu_model") == "yes" and
vm_type == "qemu"):
Could you please confirm that bug exists in real?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20170131/bef368ff/attachment.htm>
More information about the Avocado-devel
mailing list