virt.virt_test_utils: Fix migration message
PATCH 1/3 virt.virt_test_utils: Fix migration message
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- client/virt/virt_test_utils.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
client/virt/virt_test_utils.py +1 -1
@@ -575,7 +575,7 @@ def run_autotest(vm, session, control_path, timeout, outputdir, params): bg.start() while bg.is_alive(): - logging.info("Tests is not ended, start a round of" + logging.info("Autotest job did not end, start a round of " "migration") vm.migrate(timeout=mig_timeout, protocol=mig_protocol) else:
Signature · 1 line
1.7.6
PATCH 2/3 KVM test: Omit debug printing from iozone_windows
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- client/virt/tests/iozone_windows.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
client/virt/tests/iozone_windows.py +1 -1
@@ -27,7 +27,7 @@ def run_iozone_windows(test, params, env): c = params.get("iozone_cmd") t = int(params.get("iozone_timeout")) logging.info("Running IOzone command on guest, timeout %ss", t) - results = session.cmd_output(cmd=c, timeout=t, print_func=logging.debug) + results = session.cmd_output(cmd=c, timeout=t) utils.open_write_close(results_path, results) # Postprocess the results using the IOzone postprocessing module
Signature · 1 line
1.7.6
PATCH 3/3 client.virt.kvm_monitor: Throw less cryptic exceptions
In reply to Lucas Meneghel RodriguesSometimes, when the kvm monitor code tries to verify if there is data available on the monitor socket, a socket.error might be thrown, leading to somewhat cryptic error messages, such as:
raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor
So, wrap the select operation on a try block and raise a more comprehensive MonitorSocketError, along with the original exception.
Also, turning the error into a MonitorError makes KVM autotest to not blow when trying to get a screendump from the VM during postprocessing.
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- client/virt/kvm_monitor.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
client/virt/kvm_monitor.py +4 -1
@@ -120,7 +120,10 @@ class Monitor: def _data_available(self, timeout=0): timeout = max(0, timeout) - return bool(select.select([self._socket], [], [], timeout)[0]) + try: + return bool(select.select([self._socket], [], [], timeout)[0]) + except socket.error, e: + raise MonitorSocketError("Verifying data on monitor socket", e) def _recvall(self):
Signature · 1 line
1.7.6