Correcting timeout interruption of virtio_console test.
PATCH 1/1 Correcting timeout interruption of virtio_console test.
Catch new exception from kvm_suprocess to avoid killing of tests.
--- client/tests/kvm/tests/virtio_console.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
client/tests/kvm/tests/virtio_console.py +7 -3
@@ -468,9 +468,13 @@ def run_virtio_console(test, params, env): logging.debug("Executing '%s' on virtio_guest.py loop, vm: %s," + "timeout: %s", command, vm[0].name, timeout) vm[1].sendline(command) - (match, data) = vm[1].read_until_last_line_matches(["PASS:", - "FAIL:[Failed to execute]"], - timeout) + try: + (match, data) = vm[1].read_until_last_line_matches(["PASS:", + "FAIL:"], + timeout) + except (kvm_subprocess.ExpectTimeoutError): + match = None + data = None return (match, data)
Signature · 1 line
1.7.3.2
Quoted 1 line · Jiří Župka
Catch new exception from
kvm_suprocessto avoid killing of tests.
Hi guys, I did some rebasing in all your patches to virtio_console and re-sent to the mailing list. All of them are applied, thank you very much for your work on this!
Lucas
Quoted 25 lines
--- client/tests/kvm/tests/virtio_console.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)client/tests/kvm/tests/virtio_console.py +7
-3@@ -468,9 +468,13 @@ def run_virtio_console(test, params, env): logging.debug("Executing '%s' on virtio_guest.py loop, vm: %s," + "timeout: %s", command, vm[0].name, timeout) vm[1].sendline(command) - (match, data) = vm[1].read_until_last_line_matches(["PASS:", - "FAIL:[Failed to execute]"], - timeout) + try: + (match, data) = vm[1].read_until_last_line_matches(["PASS:", + "FAIL:"], + timeout) + except (kvm_subprocess.ExpectTimeoutError): + match = None + data = None return (match, data)