virt.virt_env_process: Abstract screenshot production
PATCH 1/1 virt.virt_env_process: Abstract screenshot production
In order to ease work with other virtualization types, make virt_env_process to call vm.screendump() instead of vm.monitor.screendump().
--- client/virt/virt_env_process.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
client/virt/virt_env_process.py +3 -3
@@ -110,7 +110,7 @@ def preprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name) try: if vm.monitor and params.get("take_regular_screendumps") == "yes": - vm.monitor.screendump(scrdump_filename, debug=False) + vm.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e)
@@ -151,7 +151,7 @@ def postprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "post_%s.ppm" % name) try: if vm.monitor and params.get("take_regular_screenshots") == "yes": - vm.monitor.screendump(scrdump_filename, debug=False) + vm.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e)
@@ -460,7 +460,7 @@ def _take_screendumps(test, params, env): if not vm.is_alive(): continue try: - vm.monitor.screendump(filename=temp_filename, debug=False) + vm.screendump(filename=temp_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e) continue
Signature · 1 line
1.7.6
Hi,
vm.screendump() doesn't have parameter 'debug'.
So you should either add debug parameter to kvm_vm.py or remove this parameter (and perhaps add debug=False into kvm_vm.py).
Regards,
Lukáš
Dne 24.9.2011 01:27, Lucas Meneghel Rodrigues napsal(a):
Quoted 40 lines
In order to ease work with other virtualization types, make
virt_env_processto callvm.screendump()instead ofvm.monitor.screendump().Signed-off-by Lucas Meneghel Rodrigues<[email protected]>--- client/virt/virt_env_process.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)client/virt/virt_env_process.py +3
-3@@ -110,7 +110,7 @@ def preprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name) try: if vm.monitor and params.get("take_regular_screendumps") == "yes": - vm.monitor.screendump(scrdump_filename, debug=False) + vm.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e)@@ -151,7 +151,7 @@ def postprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "post_%s.ppm" % name) try: if vm.monitor and params.get("take_regular_screenshots") == "yes": - vm.monitor.screendump(scrdump_filename, debug=False) + vm.screendump(scrdump_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e)@@ -460,7 +460,7 @@ def _take_screendumps(test, params, env): if not vm.is_alive(): continue try: - vm.monitor.screendump(filename=temp_filename, debug=False) + vm.screendump(filename=temp_filename, debug=False) except kvm_monitor.MonitorError, e: logging.warn(e) continue
Quoted 3 lines · Lukáš Doktor
Hi,
vm.screendump()doesn't have parameter 'debug'.
My fault, the screendump method on both qmp and human monitors does take this parameter, and since the implementation on virt_env_process was using the monitor method directly, I forgot to add the param to screendump.
It's fixed now. debug=True by default, the only place where it is False is during screendump thread (to avoid polluting the logs).
https://github.com/autotest/autotest/commit/49b1d9b65ab0061aaf631c19620987bc59592af6
Quoted 50 lines
So you should either add debug parameter to
kvm_vm.pyor remove this parameter (and perhaps add debug=False intokvm_vm.py).Regards,
LukášDne 24.9.2011 01:27, Lucas Meneghel Rodrigues napsal(a):
Quoted 41 lines
In order to ease work with other virtualization types, make
virt_env_processto callvm.screendump()instead ofvm.monitor.screendump().Signed-off-by Lucas Meneghel Rodrigues<[email protected]>---
client/virt/virt_env_process.py| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)client/virt/virt_env_process.py +0
-0@@ -110,7 +110,7 @@ def preprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name)try:
if vm.monitor andparams.get("take_regular_screendumps")== "yes":
-vm.monitor.screendump(scrdump_filename, debug=False)
+vm.screendump(scrdump_filename, debug=False)
except kvm_monitor.MonitorError, e:logging.warn(e)client/virt/virt_env_process.py +0
-0@@ -151,7 +151,7 @@ def postprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "post_%s.ppm" % name)try:
if vm.monitor andparams.get("take_regular_screenshots")== "yes":
-vm.monitor.screendump(scrdump_filename, debug=False)
+vm.screendump(scrdump_filename, debug=False)
except kvm_monitor.MonitorError, e:logging.warn(e)client/virt/virt_env_process.py +0
-0@@ -460,7 +460,7 @@ def _take_screendumps(test, params, env):if not
vm.is_alive():
continue
try:
-vm.monitor.screendump(filename=temp_filename, debug=False)
+vm.screendump(filename=temp_filename, debug=False)except kvm_monitor.MonitorError, e:logging.warn(e)
continue
Lukáš Doktor
Acked-byDne 26.9.2011 15:10, Lucas Meneghel Rodrigues napsal(a):
Quoted 11 lines · Lukáš Doktor
Quoted 3 lines
Hi,
vm.screendump()doesn't have parameter 'debug'.My fault, the screendump method on both qmp and human monitors does take this parameter, and since the implementation on
virt_env_processwas using the monitor method directly, I forgot to add the param to screendump.It's fixed now. debug=True by default, the only place where it is False is during screendump thread (to avoid polluting the logs).
https://github.com/autotest/autotest/commit/49b1d9b65ab0061aaf631c19620987bc59592af6
We used the same fix ;-)
Quoted 52 lines
Quoted 51 lines
So you should either add debug parameter to
kvm_vm.pyor remove this parameter (and perhaps add debug=False intokvm_vm.py).Regards,
LukášDne 24.9.2011 01:27, Lucas Meneghel Rodrigues napsal(a):
Quoted 41 lines
In order to ease work with other virtualization types, make
virt_env_processto callvm.screendump()instead ofvm.monitor.screendump().Signed-off-by Lucas Meneghel Rodrigues<[email protected]>---
client/virt/virt_env_process.py| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)client/virt/virt_env_process.py +0
-0@@ -110,7 +110,7 @@ def preprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name)try:
if vm.monitor andparams.get("take_regular_screendumps")== "yes":
-vm.monitor.screendump(scrdump_filename, debug=False)
+vm.screendump(scrdump_filename, debug=False)
except kvm_monitor.MonitorError, e:logging.warn(e)client/virt/virt_env_process.py +0
-0@@ -151,7 +151,7 @@ def postprocess_vm(test, params, env, name): scrdump_filename = os.path.join(test.debugdir, "post_%s.ppm" % name)try:
if vm.monitor andparams.get("take_regular_screenshots")== "yes":
-vm.monitor.screendump(scrdump_filename, debug=False)
+vm.screendump(scrdump_filename, debug=False)
except kvm_monitor.MonitorError, e:logging.warn(e)client/virt/virt_env_process.py +0
-0@@ -460,7 +460,7 @@ def _take_screendumps(test, params, env):if not
vm.is_alive():
continue
try:
-vm.monitor.screendump(filename=temp_filename, debug=False)
+vm.screendump(filename=temp_filename, debug=False)except kvm_monitor.MonitorError, e:logging.warn(e)
continue
Quoted 11 lines · Lukáš Doktor
Dne 26.9.2011 15:10, Lucas Meneghel Rodrigues napsal(a):
Quoted 10 lines · Lukáš Doktor
Quoted 3 lines
Hi,
vm.screendump()doesn't have parameter 'debug'.My fault, the screendump method on both qmp and human monitors does take this parameter, and since the implementation on
virt_env_processwas using the monitor method directly, I forgot to add the param to screendump.
Quoted 6 lines
Quoted 5 lines
It's fixed now. debug=True by default, the only place where it is False is during screendump thread (to avoid polluting the logs).
https://github.com/autotest/autotest/commit/49b1d9b65ab0061aaf631c19620987bc59592af6
We used the same fix ;-)
Yup :) Now, please rebase your topic branch, remove the fix and commit it with push --force. The pull request will be updated automatically, I will test it here and will let you know if there are more comments before I merge it with upstream.