mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
tests/functional: fix infinite loop on console EOF
The 'recv' method will return an empty byte array, not None, when the socket has EOF. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250908135722.3375580-2-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
committed by
Thomas Huth
parent
ba87a01e1a
commit
fb352b3c85
@@ -54,7 +54,7 @@ def _console_read_line_until_match(test, vm, success, failure):
|
||||
done = False
|
||||
while True:
|
||||
c = vm.console_socket.recv(1)
|
||||
if c is None:
|
||||
if not c:
|
||||
done = True
|
||||
test.fail(
|
||||
f"EOF in console, expected '{success}'")
|
||||
|
||||
Reference in New Issue
Block a user