[PATCH] KVM Test: Catch AttributeError and make screendump thread continue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Feng Yang <fyang@xxxxxxxxxx>

screendump is start before vm creating.  At most time, it is ok.

But when setting start_vm to no, then create vm in tests script.
This may could not work. screendump thread exit for AttributeError exception.
Some of our unattended_install case fail for this reason.

In order to fix this issue, we may:
1. catch AttributeError exception and make screendump thread continue.
This way is easy fix, but if we do not need vm in a case, screendump thread
will still alive, and print useless debug log.

2. start screendmup thread in vm.create(), then close it in vm.destroy().
This need more work and may bring other problem.

This patch use first way. Please help comment it.

Signed-off-by: Feng Yang <fyang@xxxxxxxxxx>
---
 client/virt/virt_env_process.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py
index 1eb8ecf..ac3c6f1 100644
--- a/client/virt/virt_env_process.py
+++ b/client/virt/virt_env_process.py
@@ -433,6 +433,9 @@ def _take_screendumps(test, params, env):
             except kvm_monitor.MonitorError, e:
                 logging.warn(e)
                 continue
+            except AttributeError, e:
+                logging.warn(e)
+                continue
             if not os.path.exists(temp_filename):
                 logging.warn("VM '%s' failed to produce a screendump", vm.name)
                 continue
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux