From ffc1fe7894f7704ed6af0746715099b098a61463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 28 Oct 2019 19:04:04 -0400 Subject: [PATCH] tests/acceptance: Fix wait_for_console_pattern() hangs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-4-philmd@redhat.com> Reviewed-by: Cleber Rosa Reviewed-by: Aleksandar Markovic [Cleber: corrected small typo in commit message] Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 772771e205..393fc33f35 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -75,6 +75,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)