From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>
Cc: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
Subject: [PATCH v2 0/5] tests/functional: Convert tests with find_free_ports()
Date: Wed, 18 Dec 2024 14:14:34 +0100 [thread overview]
Message-ID: <20241218131439.255841-1-thuth@redhat.com> (raw)
Convert the vnc and migration test that use a find_free_ports()
function to look for a free port. Since the functional tests can
be run in parallel with other tests that might look for free ports,
we extract the find_free_ports() function into a helper and provide
a locking mechanism so that the tests don't race for the free ports.
v2:
- Use "-vnc ...,to=XYZ" in the "Do not use a hard-coded VNC port"
to avoid that we have to take the lock of find_free_ports() here.
- Put the lock file into the build directory (as suggested by Daniel)
- Limit the port range to dynamic ports (see RFC 6335) and
"randomize" the start address via the PID of the test program
==> This should make clashes much less likely
Thomas Huth (5):
tests/functional: Convert the vnc test
tests/functional/test_vnc: Remove the test_no_vnc test
tests/functional/test_vnc: Do not use a hard-coded VNC port
tests/functional: Extract the find_free_ports() function into a helper
file
tests/functional: Convert the migration avocado test
MAINTAINERS | 1 +
tests/functional/meson.build | 20 +++
tests/functional/qemu_test/ports.py | 56 ++++++++
.../test_migration.py} | 121 +++++-------------
.../vnc.py => functional/test_vnc.py} | 55 +++-----
5 files changed, 127 insertions(+), 126 deletions(-)
create mode 100644 tests/functional/qemu_test/ports.py
rename tests/{avocado/migration.py => functional/test_migration.py} (41%)
mode change 100644 => 100755
rename tests/{avocado/vnc.py => functional/test_vnc.py} (74%)
mode change 100644 => 100755
--
2.47.1
next reply other threads:[~2024-12-18 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 13:14 Thomas Huth [this message]
2024-12-18 13:14 ` [PATCH v2 1/5] tests/functional: Convert the vnc test Thomas Huth
2024-12-18 13:14 ` [PATCH v2 2/5] tests/functional/test_vnc: Remove the test_no_vnc test Thomas Huth
2024-12-18 13:14 ` [PATCH v2 3/5] tests/functional/test_vnc: Do not use a hard-coded VNC port Thomas Huth
2024-12-18 13:14 ` [PATCH v2 4/5] tests/functional: Extract the find_free_ports() function into a helper file Thomas Huth
2024-12-18 13:14 ` [PATCH v2 5/5] tests/functional: Convert the migration avocado test Thomas Huth
2024-12-18 13:51 ` Fabiano Rosas
2024-12-18 15:51 ` Thomas Huth
2024-12-18 16:00 ` Daniel P. Berrangé
2024-12-18 16:11 ` Thomas Huth
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=20241218131439.255841-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=peterx@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 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.