From: Feng Yang <[email protected]>

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 to get screendump for this reason.
We do not know what happened if unattended_install fail.

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 cause other problem.

This patch use first way. Please help comment it.

Changes from v1:
Update the commit log.


Signed-off-by: Feng Yang <[email protected]>
---
 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

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

Reply via email to