diff mbox series

[v2,02/11] tests/acceptance: Fixe wait_for_console_pattern() hangs

Message ID 20191019153437.9820-3-f4bug@amsat.org
State New
Headers show
Series tests/acceptance: Fix 64-bit MIPS target tests | expand

Commit Message

Philippe Mathieu-Daudé Oct. 19, 2019, 3:34 p.m. UTC
From: Philippe Mathieu-Daudé <philmd@redhat.com>

Because of a possible deadlock (QEMU waiting for the socket to
become writable) let's close the console socket as soon as we
stop to use it.

Suggested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Aleksandar Markovic Oct. 24, 2019, 9:23 a.m. UTC | #1
On Saturday, October 19, 2019, Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:

> From: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Because of a possible deadlock (QEMU waiting for the socket to
> become writable) let's close the console socket as soon as we
> stop to use it.
>
> Suggested-by: Cleber Rosa <crosa@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/avocado_qemu/__init__.py | 1 +
>  1 file changed, 1 insertion(+)
>
>

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>


> diff --git a/tests/acceptance/avocado_qemu/__init__.py
> b/tests/acceptance/avocado_qemu/__init__.py
> index e3101cba30..a0450e5263 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -74,6 +74,7 @@ def wait_for_console_pattern(test, success_message,
> failure_message=None):
>          if success_message in msg:
>              break
>          if failure_message and failure_message in msg:
> +            console.close()
>              fail = 'Failure message found in console: %s' %
> failure_message
>              test.fail(fail)
>
> --
> 2.21.0
>
>
>
diff mbox series

Patch

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index e3101cba30..a0450e5263 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -74,6 +74,7 @@  def wait_for_console_pattern(test, success_message, failure_message=None):
         if success_message in msg:
             break
         if failure_message and failure_message in msg:
+            console.close()
             fail = 'Failure message found in console: %s' % failure_message
             test.fail(fail)