From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
qemu-stable@nongnu.org, "Richard W.M. Jones" <rjones@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v3 2/2] iotests: test NBD+TLS+iothread
Date: Mon, 3 Jun 2024 12:45:00 +0100 [thread overview]
Message-ID: <Zl2svHuiX0_t2ctw@redhat.com> (raw)
In-Reply-To: <20240531180639.1392905-6-eblake@redhat.com>
On Fri, May 31, 2024 at 01:04:59PM -0500, Eric Blake wrote:
> Prevent regressions when using NBD with TLS in the presence of
> iothreads, adding coverage the fix to qio channels made in the
> previous patch.
>
> The shell function pick_unused_port() was copied from
> nbdkit.git/tests/functions.sh.in, where it had all authors from Red
> Hat, agreeing to the resulting relicensing from 2-clause BSD to GPLv2.
>
> CC: qemu-stable@nongnu.org
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++++++++++++++++++
> tests/qemu-iotests/tests/nbd-tls-iothread.out | 54 ++++++
> 2 files changed, 222 insertions(+)
> create mode 100755 tests/qemu-iotests/tests/nbd-tls-iothread
> create mode 100644 tests/qemu-iotests/tests/nbd-tls-iothread.out
> +# pick_unused_port
> +#
> +# Picks and returns an "unused" port, setting the global variable
> +# $port.
> +#
> +# This is inherently racy, but we need it because qemu does not currently
> +# permit NBD+TLS over a Unix domain socket
> +pick_unused_port ()
> +{
> + if ! (ss --version) >/dev/null 2>&1; then
> + _notrun "ss utility required, skipped this test"
> + fi
> +
> + # Start at a random port to make it less likely that two parallel
> + # tests will conflict.
> + port=$(( 50000 + (RANDOM%15000) ))
> + while ss -ltn | grep -sqE ":$port\b"; do
> + ((port++))
> + if [ $port -eq 65000 ]; then port=50000; fi
> + done
> + echo picked unused port
> +}
In retrospect I'd probably have suggested putting this into
common.qemu as its conceptually independant of this test.
That's not a blocker though so
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-06-03 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 18:04 [PATCH v3 0/2] Fix NBD+TLS regression in presence of iothread Eric Blake
2024-05-31 18:04 ` [PATCH v3 1/2] qio: Inherit follow_coroutine_ctx across TLS Eric Blake
2024-05-31 18:04 ` [PATCH v3 2/2] iotests: test NBD+TLS+iothread Eric Blake
2024-06-03 11:45 ` Daniel P. Berrangé [this message]
2024-06-03 16:15 ` Kevin Wolf
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=Zl2svHuiX0_t2ctw@redhat.com \
--to=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=rjones@redhat.com \
--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 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).