public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Correcting timeout interruption of virtio_console test.
@ 2010-12-03 13:10 Jiří Župka
  2010-12-06 23:13 ` Lucas Meneghel Rodrigues
  0 siblings, 1 reply; 2+ messages in thread
From: Jiří Župka @ 2010-12-03 13:10 UTC (permalink / raw)
  To: kvm-autotest, kvm, autotest, lmr, ldoktor, akong

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(-)

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)
 
 
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Correcting timeout interruption of virtio_console test.
  2010-12-03 13:10 [PATCH] Correcting timeout interruption of virtio_console test Jiří Župka
@ 2010-12-06 23:13 ` Lucas Meneghel Rodrigues
  0 siblings, 0 replies; 2+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-12-06 23:13 UTC (permalink / raw)
  To: Jiří Župka; +Cc: kvm-autotest, kvm, autotest, ldoktor, akong

On Fri, 2010-12-03 at 14:10 +0100, Jiří Župka wrote:
> Catch new exception from kvm_suprocess to 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

> ---
>  client/tests/kvm/tests/virtio_console.py |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> 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)
>  
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-06 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 13:10 [PATCH] Correcting timeout interruption of virtio_console test Jiří Župka
2010-12-06 23:13 ` Lucas Meneghel Rodrigues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox