From: Eric Blake <eblake@redhat.com>
To: Guillaume Vincke <guillaume.vincke@ovhcloud.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v3 2/2] iotests: Add coverage for x-debug-query-nbd-client QMP command
Date: Tue, 1 Dec 2026 09:39:57 -0600 [thread overview]
Message-ID: <aw7ic1JFB_UcOj2u@redhat.com> (raw)
In-Reply-To: <20261130111327.178850-3-guillaume.vincke@ovhcloud.com>
On Mon, Nov 30, 2026 at 12:13:27PM +0100, Guillaume Vincke wrote:
> Check that running it on a nonexistent or non-nbd node fails. Also
> check each state reached when the server restarts.
>
> Running x-qemu-io on a bare node would drain its temporary
> BlockBackend, which blocks until the request completes and hides
> connecting-wait. We force the I/O to go through a device to avoid this
> issue.
>
> Signed-off-by: Guillaume Vincke <guillaume.vincke@ovhcloud.com>
> ---
> tests/qemu-iotests/tests/nbd-client-query | 73 +++++++++++++++++++
> tests/qemu-iotests/tests/nbd-client-query.out | 13 ++++
> 2 files changed, 86 insertions(+)
> create mode 100755 tests/qemu-iotests/tests/nbd-client-query
> create mode 100644 tests/qemu-iotests/tests/nbd-client-query.out
> +++ b/tests/qemu-iotests/tests/nbd-client-query.out
> @@ -0,0 +1,13 @@
> +{"error": {"class": "GenericError", "desc": "Node 'nbd0' not found"}}
> +{"error": {"class": "GenericError", "desc": "Node 'null0' is not an NBD client"}}
> +Start NBD server
> +{"return": {"connector": {"state": "idle"}, "state": "connected"}}
> +Kill NBD server
> +{"return": {}}
> +{"return": {"connector": {"state": "running"}, "state": "connecting-wait"}}
> +{"return": {"connector": {"state": "running"}, "state": "connecting-nowait"}}
> +Start NBD server
> +{"return": {"connector": {"state": "parked"}, "state": "connecting-nowait"}}
> +{"return": {}}
> +{"return": {"connector": {"state": "idle"}, "state": "connected"}}
> +Kill NBD server
> --
I tried to think of a reliable way to show a client in the "quit"
state, but am not coming up with anything easy. If I understand, that
state exists in the small window between when the client has stopped
transmission (such as if we just did a yank on the client) but the
socket still hasn't been cleaned up. So the set of states that you
did manage to test is reasonable.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-12-01 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 11:13 [PATCH v3 0/2] nbd: Add an unstable query for the client state Guillaume Vincke
2026-11-30 11:13 ` [PATCH v3 1/2] " Guillaume Vincke
2026-12-01 14:59 ` Eric Blake
2026-12-01 17:08 ` guillaume vincke
2026-12-01 17:26 ` Eric Blake
2026-11-30 11:13 ` [PATCH v3 2/2] iotests: Add coverage for x-debug-query-nbd-client QMP command Guillaume Vincke
2026-12-01 15:39 ` Eric Blake [this message]
2026-12-01 16:57 ` guillaume vincke
2026-12-01 17:28 ` Eric Blake
2026-12-01 16:32 ` Eric Blake
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=aw7ic1JFB_UcOj2u@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=guillaume.vincke@ovhcloud.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.