On 03/11/2013 09:20 AM, Fergus Yu wrote:
On 03/08/2013 12:18 AM, Chris Evich wrote:
On 02/28/2013 03:05 AM, Yu Mingfei wrote:
+    # Recover vm state
+    if vm_state == "paused":
+        vm.resume()
+    if vm.is_alive():
+        vm.destroy()

I don't think vm.destroy() is needed here, maybe next test can use
same VM and save time waiting for it to boot.  Next test may not
always be another virsh_dumpxml variant, it could be anything.
Recovery only needs to return state to same as start of test.


Hmm, my consideration is that environment for one case should not
disturb another one.
But it cost additional time to boot indeed. :(

Removing vm.destroy() here is ok since I have not done other operation
but start/shutdown/pause.

Thanks
Yu

Your understanding is correct, we should not disturb other tests. There is a balance between ease of testing and result precision. Here, because you have not done any other operation, I think it is reasonably safe, and will benefit other tests.

If a test absolutely MUST have a pristine build, we can assume it will take those steps. There are many other places where we operate this way, since there are situations where booting can take a LONG time.

--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to