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:
Daniel P. Berrangé
2025-09-09 12:41:18 +02:00
committed by Thomas Huth
parent ba87a01e1a
commit fb352b3c85
+1 -1
View File
@@ -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}'")