From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 1/4] tests/functional: fix infinite loop on console EOF
Date: Tue, 9 Sep 2025 12:15:48 +0200 [thread overview]
Message-ID: <1e744fe7-6ef1-4917-8074-b01f12618ede@redhat.com> (raw)
In-Reply-To: <20250908135722.3375580-2-berrange@redhat.com>
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>
next prev parent reply other threads:[~2025-09-09 10:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 13:57 [PATCH 0/4] tests/functional: misc fixes for reliability / debuggability Daniel P. Berrangé
2025-09-08 13:57 ` [PATCH 1/4] tests/functional: fix infinite loop on console EOF Daniel P. Berrangé
2025-09-09 10:15 ` Thomas Huth [this message]
2025-09-09 10:39 ` Alex Bennée
2025-09-08 13:57 ` [PATCH 2/4] tests/functional: avoid duplicate messages on failures Daniel P. Berrangé
2025-09-09 10:16 ` Thomas Huth
2025-09-08 13:57 ` [PATCH 3/4] tests/functional: avoid tearDown failure when QEMU dies Daniel P. Berrangé
2025-09-09 10:17 ` Thomas Huth
2025-09-08 13:57 ` [PATCH 4/4] tests/functional: purge scratch dir on test startup Daniel P. Berrangé
2025-09-08 14:20 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e744fe7-6ef1-4917-8074-b01f12618ede@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).