On 08/09/2025 15.57, Daniel P. Berrangé wrote:
> 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>
> ---
> tests/functional/qemu_test/cmd.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py
> index dc5f422b77..2fb731ca24 100644
> --- a/tests/functional/qemu_test/cmd.py
> +++ b/tests/functional/qemu_test/cmd.py
> @@ -51,7 +51,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}'")
Reviewed-by: Thomas Huth <thuth@redhat.com>