Commit ffc1fe78 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Cleber Rosa
Browse files

tests/acceptance: Fix wait_for_console_pattern() hangs



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: default avatarCleber Rosa <crosa@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191028073441.6448-4-philmd@redhat.com>
Reviewed-by: default avatarCleber Rosa <crosa@redhat.com>
Reviewed-by: default avatarAleksandar Markovic <amarkovic@wavecomp.com>
[Cleber: corrected small typo in commit message]
Signed-off-by: default avatarCleber Rosa <crosa@redhat.com>
parent 77bcd248
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)