qemu/tests/functional/qemu_test
Thomas Huth b7edbbf432 tests/functional: Extract the find_free_ports() function into a helper file
We'll need this functionality in other functional tests, too, so
let's extract it into the qemu_test module.
Also add  an __enter__ and __exit__ function that can be used for
using this functionality in a locked context, so that tests that
are running in parallel don't try to compete for the same ports
later.
Also make sure to only use ports in the "Dynamic Ports" range
(see https://www.rfc-editor.org/rfc/rfc6335) and "randomize" the
start of the probed range with the PID of the test process to
further avoid possible clashes with other competing processes.

Message-ID: <20241218131439.255841-5-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-01-02 08:58:08 +01:00
..
__init__.py tests/functional: remove now unused 'run_cmd' helper 2024-12-17 19:39:53 +01:00
archive.py tests/functional: replace 'run_cmd' with subprocess helpers 2024-12-17 19:39:53 +01:00
asset.py tests/functional: ignore errors when caching assets, except for 404 2024-12-17 19:39:53 +01:00
cmd.py tests/functional: remove now unused 'run_cmd' helper 2024-12-17 19:39:53 +01:00
config.py tests/functional: Add base classes for the upcoming pytest-based tests 2024-09-04 10:52:29 +02:00
decorators.py tests/functional: introduce some helpful decorators 2024-12-17 19:39:53 +01:00
linuxkernel.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
ports.py tests/functional: Extract the find_free_ports() function into a helper file 2025-01-02 08:58:08 +01:00
tesseract.py tests/functional: replace 'run_cmd' with subprocess helpers 2024-12-17 19:39:53 +01:00
testcase.py tests/functional: skip tests if assets are not available 2024-12-17 19:39:53 +01:00
tuxruntest.py tests/functional: replace 'run_cmd' with subprocess helpers 2024-12-17 19:39:53 +01:00
uncompress.py tests/functional: add a generalized uncompress helper 2024-12-17 19:39:53 +01:00
utils.py tests/functional: Add a helper function for retrieving the hostfwd port 2024-12-17 20:33:29 +01:00