diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-09-08 14:57:19 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2025-09-09 12:41:18 +0200 |
commit | fb352b3c85a990ba81e41e4e8c7eb53ccc3059a3 (patch) | |
tree | 8a360e55b2fa1000866fe0becb192e0932e47fed | |
parent | ba87a01e1af04599e1952cacfb7eb25f06e15da5 (diff) | |
download | qemu-fb352b3c85a990ba81e41e4e8c7eb53ccc3059a3.zip qemu-fb352b3c85a990ba81e41e4e8c7eb53ccc3059a3.tar.gz qemu-fb352b3c85a990ba81e41e4e8c7eb53ccc3059a3.tar.bz2 |
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>
-rw-r--r-- | tests/functional/qemu_test/cmd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index 8069c89..f544566 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -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}'") |