diff mbox

Correcting timeout interruption of virtio_console test.

Message ID 1291381809-16450-1-git-send-email-jzupka@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jiri Zupka Dec. 3, 2010, 1:10 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py
index d8d2143..d083783 100644
--- a/client/tests/kvm/tests/virtio_console.py
+++ b/client/tests/kvm/tests/virtio_console.py
@@ -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)