@@ -401,6 +401,10 @@ def _take_screendumps(test, params, env):
kvm_utils.generate_random_string(6))
delay = float(params.get("screendump_delay", 5))
quality = int(params.get("screendump_quality", 30))
+ if params.get("screendump_verbose") == 'yes':
+ screendump_verbose = True
+ else:
+ screendump_verbose = False
cache = {}
@@ -408,7 +412,11 @@ def _take_screendumps(test, params, env):
for vm in kvm_utils.env_get_all_vms(env):
if vm.is_dead():
continue
- vm.send_monitor_cmd("screendump %s" % temp_filename)
+ if screendump_verbose:
+ vm.send_monitor_cmd("screendump %s" % temp_filename)
+ else:
+ vm.send_monitor_cmd("screendump %s" % temp_filename,
+ verbose=False)
if not os.path.exists(temp_filename):
logging.warn("VM '%s' failed to produce a screendump", vm.name)
continue
@@ -498,7 +498,7 @@ class VM:
lockfile.close()
- def send_monitor_cmd(self, command, block=True, timeout=20.0):
+ def send_monitor_cmd(self, command, block=True, timeout=20.0, verbose=True):
"""
Send command to the QEMU monitor.
@@ -541,8 +541,11 @@ class VM:
time.sleep(0.01)
return (False, o)
+ # In certain conditions printing this debug output might be too much
+ # Just print it if verbose is enabled (True by default)
+ if verbose:
+ logging.debug("Sending monitor command: %s" % command)
# Connect to monitor
- logging.debug("Sending monitor command: %s" % command)
try:
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.setblocking(False)
@@ -23,6 +23,7 @@ keep_screendumps_on_error = yes
screendump_delay = 5
screendump_quality = 30
screendump_temp_dir = /dev/shm
+screendump_verbose = no
# Some default VM params
qemu_binary = qemu