testing/next: gdb-multiarch, check-tcg, docker, vbsa tests (pre-PR)
v3 cover testing/next: gdb-multiarch, check-tcg, docker, vbsa tests (pre-PR)
This is the current status of my testing tree. The gdb-multiarch and filtering changes should be pretty uncontroversial. I've also picked up some stray testing patches that where hanging around on the list.
I'll roll the PR on Monday.
v3
- gdb-multiarch tests should work now Phillipe's stuff is merged
- grabbed Thomas' ncat and opensuse patches
v2
- mostly tweaks to the vbsa test (see inline comments on commit)
- dropped the zip and send_key patches
Alex.
Alex Bennée (3):
tests/tcg: allow filtering of TCG tests tests/functional: allow tests to define decompression target tests/functional: add VBSA linux tests
Matheus Tavares Bernardino (1):
tests/tcg/multiarch/linux-test: use portable alternative for dirent64
Thomas Huth (4):
tests/lcitool: Remove python3-sqlite3 from the list of needed packages tests/lcitool: Update openSUSE to version 16
tests/docker: Update the opensuse-leap container file to version 16
tests: Replace ncat with socat in migration test and drop ncat from
containers
configure | 1 - tests/tcg/multiarch/linux/linux-test.c | 5 +- .../ci/setup/debian/debian-13-ppc64le.yaml | 1 - .../ci/setup/ubuntu/ubuntu-2404-aarch64.yaml | 1 - .../ci/setup/ubuntu/ubuntu-2404-s390x.yaml | 1 - tests/Makefile.include | 8 +- tests/docker/dockerfiles/alpine.docker | 1 - tests/docker/dockerfiles/centos9.docker | 1 - .../dockerfiles/debian-amd64-cross.docker | 1 - .../dockerfiles/debian-arm64-cross.docker | 1 - .../dockerfiles/debian-armhf-cross.docker | 1 - .../dockerfiles/debian-i686-cross.docker | 1 - .../dockerfiles/debian-mips64el-cross.docker | 1 - .../dockerfiles/debian-mipsel-cross.docker | 1 - .../dockerfiles/debian-ppc64el-cross.docker | 1 - .../dockerfiles/debian-riscv64-cross.docker | 1 - .../dockerfiles/debian-s390x-cross.docker | 1 - tests/docker/dockerfiles/debian.docker | 1 - .../dockerfiles/fedora-rust-nightly.docker | 1 - .../dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/opensuse-leap.docker | 35 +++-- tests/docker/dockerfiles/ubuntu2204.docker | 1 - tests/functional/aarch64/test_virt_vbsa.py | 122 ++++++++++++++++-- tests/functional/migration.py | 4 +- tests/functional/qemu_test/testcase.py | 9 +- tests/lcitool/mappings.yml | 58 --------- tests/lcitool/projects/qemu.yml | 2 - tests/lcitool/refresh | 2 +- tests/tcg/Makefile.target | 12 +- 30 files changed, 156 insertions(+), 121 deletions(-)
Signature · 1 line
2.47.3
PATCH v3 1/8 tests/tcg: allow filtering of TCG tests
We have a lot of TCG tests now which can be fiddly if we just want to check one particular test type across the targets. Introduce TCG_TEST_FILTER to allow this:
make check-tcg TCG_TEST_FILTER=gdb
to run all the gdb tests across the suites.
--- tests/Makefile.include | 8 +++++--- tests/tcg/Makefile.target | 12 +++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-)
tests/Makefile.include +5 -3
@@ -16,9 +16,11 @@ check-help: @echo " $(MAKE) check-tracetool Run tracetool generator tests" @echo " $(MAKE) check-block Run block tests" ifneq ($(filter $(all-check-targets), check-softfloat),) - @echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-softfloat Run FPU emulation tests" - @echo " $(MAKE) run-tcg-tests-TARGET-softmmu Run TCG tests for a given target" + @echo " $(MAKE) check-tcg Run TCG tests" + @echo " $(MAKE) run-tcg-tests-TARGET Run TCG tests for a given target" + @echo + @echo "The variable TCG_TEST_FILTER will select the subset of matching tests." endif @echo @echo " $(MAKE) check-report.junit.xml Generates an aggregated XML test report"
@@ -64,7 +66,7 @@ $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/ .PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%) $(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-% $(call quiet-command, \ - $(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) run, \ + $(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) TCG_TEST_FILTER=$(TCG_TEST_FILTER) run, \ "RUN", "$* guest-tests") .PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%)
tests/tcg/Makefile.target +11 -1
@@ -254,8 +254,15 @@ endif gdb-%: % gdb --args $(QEMU) $(QEMU_OPTS) $< +# Filter tests based on TCG_TEST_FILTER if set +ifdef TCG_TEST_FILTER +FILTERED_RUN_TESTS=$(foreach test,$(RUN_TESTS),$(if $(findstring $(TCG_TEST_FILTER),$(test)),$(test))) +else +FILTERED_RUN_TESTS=$(RUN_TESTS) +endif + .PHONY: run -run: $(RUN_TESTS) +run: $(FILTERED_RUN_TESTS) clean: rm -f $(TESTS) *.o $(CLEANFILES)
@@ -269,3 +276,6 @@ help: @echo "Built with $(CC)" @echo "Available tests:" @$(foreach t,$(RUN_TESTS),echo " $t";) + @echo "" + @echo "Environment variables:" + @echo " TCG_TEST_FILTER=<pattern> Filter tests matching pattern"
Signature · 1 line
2.47.3
PATCH v3 2/8 tests/tcg/multiarch/linux-test: use portable alternative for dirent64
In reply to Alex BennéeFrom: Matheus Tavares Bernardino <[email protected]>
dirent64 and readdir64 are glibc-specific and not portable to other C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which portably instructs all libc implementations to use 64-bit file offsets, making readdir() and struct dirent equivalent to their 64-bit variants.
Message-ID: <af31d21c4d668cfb940ba4159f584fa6454c3d82.1772107448.git.matheus.bernardino@oss.qualcomm.com>
--- tests/tcg/multiarch/linux/linux-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/tcg/multiarch/linux/linux-test.c +3 -2
@@ -16,6 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#define _FILE_OFFSET_BITS 64#define _GNU_SOURCE#include <stdarg.h> #include <stdlib.h>
@@ -83,7 +84,7 @@ static void test_file(void)struct utimbuf tbuf;struct iovec vecs[2 ];DIR *dir; -struct dirent64 *de; +struct dirent *de;/* TODO: make common tempdir creation for tcg tests */ char template[] ="/tmp/linux-test-XXXXXX" ;char *tmpdir =mkdtemp (template);
@@ -191,7 +192,7 @@ static void test_file(void)error ("opendir" ); len =0 ;for (;;) { - de =readdir64 (dir); + de =readdir (dir);if (!de)break ; if (strcmp(de->d_name, ".") != 0 &&
Signature · 1 line
2.47.3
Re: [PATCH v3 2/8] tests/tcg/multiarch/linux-test: use portable alternative for dirent64
Quoted 11 lines · Alex Bennée
From: Matheus Tavares Bernardino <[email protected]>
dirent64 and readdir64 are glibc-specific and not portable to other C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which portably instructs all libc implementations to use 64-bit file offsets, making
readdir()and struct dirent equivalent to their 64-bit variants.
tests/tcg/multiarch/linux/linux-test.c line 19
Quoted 4 lines
tests/tcg/multiarch/linux/linux-test.c +1
-0@@ -16,6 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#define _FILE_OFFSET_BITS 64
Afiacs, qemu has always been built with file_offset_bits=64, one way or another:
meson.build:
'-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
Now, with only 64bit host support, defining _FILE_OFFSET_BITS to 64 makes no difference, since it is already 64 by default. So it looks like this change is unnecessary. The only change needed there was to drop 64 from readdir/dirent.
FWIW.
/mjt
Re: [PATCH v3 2/8] tests/tcg/multiarch/linux-test: use portable alternative for dirent64
Quoted 21 lines · Michael Tokarev
Quoted 11 lines · Alex Bennée
From: Matheus Tavares Bernardino <[email protected]>
dirent64 and readdir64 are glibc-specific and not portable to other C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which portably instructs all libc implementations to use 64-bit file offsets, making
readdir()and struct dirent equivalent to their 64-bit variants.tests/tcg/multiarch/linux/linux-test.c line 19
Quoted 4 lines
tests/tcg/multiarch/linux/linux-test.c +1
-0@@ -16,6 +16,7 @@* You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#define _FILE_OFFSET_BITS 64Afiacs, qemu has always been built with file_offset_bits=64, one way or another:
Quoted 2 lines
meson.build:
'-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
Those control the compiler flags for QEMU itself. This is a standalone test program built for the guest, and it isn't built directly by meson.
Quoted 2 lines
Now, with only 64bit host support, defining
_FILE_OFFSET_BITSto 64 makes no difference, since it is already 64 by default.
We still support 32-bit guests, though, and this is being built for the guest architecture.
thanks
-- PMM
PATCH v3 3/8 tests/functional: allow tests to define decompression target
In reply to Alex BennéeWhen dealing with multi-stage decompression we want to specify the target file name lest we just overload the cache name. It also allows for something is little more friendly than the cache hash.
--- tests/functional/qemu_test/testcase.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
tests/functional/qemu_test/testcase.py +6 -3
@@ -35,7 +35,7 @@ class QemuBaseTest(unittest.TestCase): - def uncompress(self, compressed, format=None): + def uncompress(self, compressed, target=None, format=None): ''' @params compressed: filename, Asset, or file-like object to uncompress @params format: optional compression format (gzip, lzma)
@@ -52,8 +52,11 @@ def uncompress(self, compressed, format=None): if isinstance(compressed, Asset): compressed.fetch() - (name, _ext) = os.path.splitext(str(compressed)) - uncompressed = self.scratch_file(os.path.basename(name)) + if target is not None: + uncompressed = self.scratch_file(target) + else: + (name, _ext) = os.path.splitext(str(compressed)) + uncompressed = self.scratch_file(os.path.basename(name)) uncompress(compressed, uncompressed, format)
Signature · 1 line
2.47.3
PATCH v3 4/8 tests/functional: add VBSA linux tests
In reply to Alex BennéeThis extends the VBSA test to run the linux tests. The sysarch-acs test suite does provide some pre-built images which is good because the tests require a patched kernel. However due to the structure of the image we need to jump one or two hoops to get something useful:
- download and double decompress (zip then xz) the image
- navigate grub to launch the Linux Execution Environment
- shutdown the system once tests are done
- extract the logs from the MSDOS file system and parse them
It does make the code a bit ugly but it works for me at least. So far the subset of tests run is limited but that might be solved by adding some more devices to the PCIe bus to exercise the SMMU behaviour.
---
v2
- dropped unused imports
- use archive_extract for the zip step
- drop virtuilization=on and smmu=max lines from config
- use utf8 encodings for file access
- don't use f"" strings when not needed
- hack grub.cfg rather than using key presses
--- tests/functional/aarch64/test_virt_vbsa.py | 122 +++++++++++++++++++-- 1 file changed, 111 insertions(+), 11 deletions(-)
tests/functional/aarch64/test_virt_vbsa.py +111 -11
@@ -10,7 +10,8 @@ # SPDX-License-Identifier: GPL-2.0-or-later import shutil -from subprocess import check_call, DEVNULL +import re +from subprocess import check_call, check_output, DEVNULL from qemu_test import QemuSystemTest, Asset from qemu_test import get_qemu_img, skipIfMissingCommands
@@ -28,6 +29,20 @@ def wait_for_console_pattern(self, success_message, vm=None): failure_message='FAILED', vm=vm) + def append_firmware_blobs(self): + """ + Setup QEMU firmware blobs for boot. + """ + code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd') + vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd') + vars_path = self.scratch_file('vars.fd') + shutil.copy(vars_source, vars_path) + + self.vm.add_args('-drive', + f'if=pflash,format=raw,readonly=on,file={code_path}') + self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}') + + ASSET_VBSA_EFI = Asset( 'https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main' '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Vbsa.efi',
@@ -45,20 +60,12 @@ def test_aarch64_vbsa_uefi_tests(self): self.vm.set_console() - # virt machine wi + # virt machine self.set_machine('virt') self.vm.add_args('-M', 'virt,gic-version=max,virtualization=on') self.vm.add_args('-cpu', 'max', '-m', '1024') - # We will use the QEMU firmware blobs to boot - code_path = self.build_file('pc-bios', 'edk2-aarch64-code.fd') - vars_source = self.build_file('pc-bios', 'edk2-arm-vars.fd') - vars_path = self.scratch_file('vars.fd') - shutil.copy(vars_source, vars_path) - - self.vm.add_args('-drive', - f'if=pflash,format=raw,readonly=on,file={code_path}') - self.vm.add_args('-drive', f'if=pflash,format=raw,file={vars_path}') + self.append_firmware_blobs() # Build an EFI FAT32 file-system for the UEFI tests vbsa_efi = self.ASSET_VBSA_EFI.fetch()
@@ -102,5 +109,98 @@ def test_aarch64_vbsa_uefi_tests(self): self.wait_for_console_pattern('VBSA tests complete. Reset the system.') + ASSET_SYSREADY_IMAGE = Asset( + 'https://github.com/ARM-software/arm-systemready/' + 'releases/download/v25.10_SR_3.1.0/systemready_acs_live_image.img.xz.zip', + 'df2c359de15784b1da6a8e6f3c98a053ee38ac0b3f241ccea62e17db092eb03a') + + ROOT_PROMPT = '/ # ' + + @skipIfMissingCommands("sfdisk", "jq", "sed") + def test_aarch64_vbsa_linux_tests(self): + """ + Launch the Linux based VBSA test from the ACS prebuilt images. + + We can use the pre-built images and then trigger the Linux + build and run the tests. We then need to slurp the results + from the partition. + """ + + self.vm.set_console() + + # Plain virt machine + self.set_machine('virt') + self.vm.add_args('-M', 'virt,gic-version=max') + self.vm.add_args('-cpu', 'max', '-m', '1024', '-smp', '4') + + self.append_firmware_blobs() + + # First fetch, decompress (twice) and prepare the disk image + # on an NVME device (the kernel only has drivers for that). + self.archive_extract(self.ASSET_SYSREADY_IMAGE, format="zip") + disk_image_xz = self.scratch_file("systemready_acs_live_image.img.xz") + disk_image = self.uncompress(disk_image_xz) + + self.vm.add_args('-device', + 'nvme,drive=hd,serial=QEMU_ROOT_SSD') + self.vm.add_args('-blockdev', + f'driver=raw,node-name=hd,file.driver=file,file.filename={disk_image}') + + # Tweak grub.cfg default to avoid manually navigating grub + grub_cfg = self.scratch_file("grub.cfg") + offset = int(check_output(f"sfdisk --json {disk_image} |" + "jq '.partitiontable.partitions[0].start * 512'", + shell=True)) + check_call(["mcopy", "-i", f"{disk_image}@@{offset}", + "::/EFI/BOOT/grub.cfg", grub_cfg]) + + with open(grub_cfg, 'a', encoding="utf8") as f: + f.write("set default='Linux Execution Enviroment'") + + check_call(["mcopy", "-D", "o", "-i", f"{disk_image}@@{offset}", + grub_cfg, "::/EFI/BOOT/grub.cfg"]) + + # Launch QEMU and wait for grub and select the "Linux + # Execution Environment" so we can launch the test. + + self.vm.launch() + self.wait_for_console_pattern(self.ROOT_PROMPT) + ec_and_wait(self, "/usr/bin/bsa.sh --skip " + "B_REP_1,B_IEP_1,B_PCIe_11,B_MEM_06", + self.ROOT_PROMPT) + + # Now we can shutdown + ec_and_wait(self, "halt -f", "reboot: System halted") + self.vm.shutdown() + + # and extract the test logs + bsa_app_res = self.scratch_file("BsaResultsApp.log") + bsa_kern_res = self.scratch_file("BsaResultsKernel.log") + + check_call(["mcopy", "-i", f"{disk_image}@@{offset}", + "::acs_results/Linux/BsaResultsApp.log", bsa_app_res]) + check_call(["mcopy", "-i", f"{disk_image}@@{offset}", + "::acs_results/Linux/BsaResultsKernel.log", bsa_kern_res]) + + # for now just check the kernel log for the result summary + test_result_re = re.compile(r"\[.*\]\s+(.+): Result:\s+(\w+)") + summary_re = re.compile(r"Total Tests Run =\s*(\d+), Tests Passed =\s*(\d+), Tests Failed =\s*(\d+)") + + with open(bsa_kern_res, 'r', encoding="utf8") as f: + for line in f: + test_match = test_result_re.search(line) + if test_match: + desc = test_match.group(1) + status = test_match.group(2) + self.log.info(f"Test: {desc} status: {status}") + + match = summary_re.search(line) + if match: + total, passed, failed = match.groups() + + if int(failed) > 0: + self.fail(f"{failed} tests failed ({total})") + + if __name__ == '__main__': QemuSystemTest.main()
Signature · 1 line
2.47.3
PATCH v3 5/8 tests/lcitool: Remove python3-sqlite3 from the list of needed packages
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
According to commit 7485508341f4 ("tests/docker: Add sqlite3 module to openSUSE Leap container") that introduced this line, the sqlite3 package was only required for Avocado. We don't use Avocado in QEMU anymore since a while, so we can drop this package now from our list again.
Message-ID: <[email protected]>
--- tests/lcitool/projects/qemu.yml | 1 - 1 file changed, 1 deletion(-)
tests/lcitool/projects/qemu.yml +0 -1
@@ -101,7 +101,6 @@ packages: - python3-setuptools - python3-sphinx - python3-sphinx-rtd-theme - - python3-sqlite3 - python3-tomli - python3-venv - python3-wheel
Signature · 1 line
2.47.3
PATCH v3 6/8 tests/lcitool: Update openSUSE to version 16
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
The first version of openSUSE 15 has been released in 2018, and according to our support policy, we "support the most recent major version at all times for up to five years after its initial release."
Since openSUSE 16 has been released a while ago, and openSUSE is clearly older than 5 years already, it's time to update to version 16 now.
Message-ID: <[email protected]>
--- configure | 1 - tests/lcitool/mappings.yml | 58 -------------------------------------- tests/lcitool/refresh | 2 +- 3 files changed, 1 insertion(+), 60 deletions(-)
configure +0 -1
@@ -929,7 +929,6 @@ if ! check_py_version "$python"; then error_exit "Cannot use '$python', Python >= 3.9 is required." \ "Use --python=/path/to/python to specify a supported Python." \ "Maybe try:" \ - " openSUSE Leap 15.3+: zypper install python39" \ " CentOS: dnf install python3.12" fi
tests/lcitool/mappings.yml +0 -58
82 lines not on this page · raw message
tests/lcitool/refresh +1 -1
@@ -226,7 +226,7 @@ try: generate_dockerfile("debian", "debian-13", trailer="".join(debian13_extras)) generate_dockerfile("fedora", "fedora-43") - generate_dockerfile("opensuse-leap", "opensuse-leap-15") + generate_dockerfile("opensuse-leap", "opensuse-leap-16") generate_dockerfile("ubuntu2204", "ubuntu-2204", trailer="".join(ubuntu2204_rust_extras), # https://bugs.launchpad.net/ubuntu/+source/rustc-1.83/+bug/2120318
Signature · 1 line
2.47.3
PATCH v3 7/8 tests/docker: Update the opensuse-leap container file to version 16
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
Run "make lcitool-refresh" to update the container file to the latest version of openSUSE.
Message-ID: <[email protected]>
--- tests/docker/dockerfiles/opensuse-leap.docker | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-)
tests/docker/dockerfiles/opensuse-leap.docker +17 -18
@@ -1,13 +1,12 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all opensuse-leap-15 qemu +# $ lcitool dockerfile --layers all opensuse-leap-16 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.opensuse.org/opensuse/leap:15.6 +FROM registry.opensuse.org/opensuse/leap:16.0 RUN zypper update -y && \ - zypper addrepo -fc https://download.opensuse.org/update/leap/15.6/backports/openSUSE:Backports:SLE-15-SP6:Update.repo && \ zypper install -y \ Mesa-devel \ alsa-lib-devel \
@@ -80,13 +79,14 @@ RUN zypper update -y && \ libudev-devel \ liburing-devel \ libusb-1_0-devel \ + libxdp-devel \ libzstd-devel \ llvm \ lttng-ust-devel \ lzo-devel \ make \ + meson \ mtools \ - ncat \ ncurses-devel \ ninja \ openssh \
@@ -94,11 +94,17 @@ RUN zypper update -y && \ pcre2-devel-static \ pipewire-devel \ pkgconfig \ - python311 \ - python311-base \ - python311-pip \ - python311-setuptools \ - python311-wheel \ + python3-Pillow \ + python3-PyYAML \ + python3-Sphinx \ + python3-base \ + python3-numpy \ + python3-opencv \ + python3-pip \ + python3-setuptools \ + python3-sphinx_rtd_theme \ + python3-tomli \ + python3-wheel \ rdma-core-devel \ rust \ rust-bindgen \
@@ -110,7 +116,7 @@ RUN zypper update -y && \ spice-protocol-devel \ swtpm \ systemd-devel \ - systemtap-sdt-devel \ + systemtap-dtrace \ tar \ tesseract-ocr \ tesseract-ocr-traineddata-english \
@@ -133,18 +139,11 @@ RUN zypper update -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN /usr/bin/pip3.11 install \ - PyYAML \ - meson==1.8.1 \ - pillow \ - sphinx \ - sphinx-rtd-theme - ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" ENV LANG="en_US.UTF-8" ENV MAKE="/usr/bin/make" ENV NINJA="/usr/bin/ninja" -ENV PYTHON="/usr/bin/python3.11" +ENV PYTHON="/usr/bin/python3" # As a final step configure the user (if env is defined) ARG USER ARG UID
Signature · 1 line
2.47.3
PATCH v3 8/8 tests: Replace ncat with socat in migration test and drop ncat from containers
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
nmap / ncat has a somewhat problematic license (e.g. saying claiming that derived work is also considered for software that "is designed specifically to execute Covered Software and parse the results", e.g. by executing ncat from your own program, you might already fall into this category) - so for example in openSUSE 16, you can only find it in the "non-OSS" repository.
We are currently only using it in the migration functional test, and that likely does not fall into this "derived work" category yet (since it is also doing some other stuff), but still, to be safe, we should move away from using it now.
Unfortunately, switching to one of the other flavors of netcat is also not a real option (see commit f700abbbeb6ab68a3446d1fb168a934d), but socat should be a solid replacement here instead.
To avoid that someone else easily uses ncat again, let's also remove it from our container files now.
Message-ID: <[email protected]>
--- scripts/ci/setup/debian/debian-13-ppc64le.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml | 1 - tests/docker/dockerfiles/alpine.docker | 1 - tests/docker/dockerfiles/centos9.docker | 1 - tests/docker/dockerfiles/debian-amd64-cross.docker | 1 - tests/docker/dockerfiles/debian-arm64-cross.docker | 1 - tests/docker/dockerfiles/debian-armhf-cross.docker | 1 - tests/docker/dockerfiles/debian-i686-cross.docker | 1 - tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 - tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 - tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 - tests/docker/dockerfiles/debian-riscv64-cross.docker | 1 - tests/docker/dockerfiles/debian-s390x-cross.docker | 1 - tests/docker/dockerfiles/debian.docker | 1 - tests/docker/dockerfiles/fedora-rust-nightly.docker | 1 - tests/docker/dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/ubuntu2204.docker | 1 - tests/functional/migration.py | 4 ++-- tests/lcitool/projects/qemu.yml | 1 - 21 files changed, 2 insertions(+), 22 deletions(-)
scripts/ci/setup/debian/debian-13-ppc64le.yaml +0 -1
@@ -101,7 +101,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml +0 -1
@@ -102,7 +102,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml +0 -1
@@ -100,7 +100,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
tests/docker/dockerfiles/alpine.docker +0 -1
@@ -76,7 +76,6 @@ RUN apk update && \ ndctl-dev \ net-tools \ nettle-dev \ - nmap-ncat \ numactl-dev \ openssh-client \ pcre2-dev \
tests/docker/dockerfiles/centos9.docker +0 -1
@@ -87,7 +87,6 @@ RUN dnf --quiet distro-sync -y && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/debian-amd64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-arm64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-armhf-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-i686-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-mips64el-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-mipsel-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-riscv64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-s390x-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian.docker +0 -1
@@ -109,7 +109,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ make \ mtools \ multipath-tools \ - ncat \ nettle-dev \ ninja-build \ openssh-client \
tests/docker/dockerfiles/fedora-rust-nightly.docker +0 -1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/fedora-win64-cross.docker +0 -1
@@ -42,7 +42,6 @@ exec "$@"\n' > /usr/bin/nosync && \ make \ mtools \ ninja-build \ - nmap-ncat \ openssh-clients \ python3 \ python3-PyYAML \
tests/docker/dockerfiles/fedora.docker +0 -1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/ubuntu2204.docker +0 -1
@@ -107,7 +107,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ make \ mtools \ multipath-tools \ - ncat \ nettle-dev \ ninja-build \ openssh-client \
tests/functional/migration.py +2 -2
@@ -84,6 +84,6 @@ def migration_with_exec(self): self.skipTest('ncat is not available') with Ports() as ports: free_port = self._get_free_port(ports) - dst_uri = 'exec:ncat -l localhost %u' % free_port - src_uri = 'exec:ncat localhost %u' % free_port + dst_uri = 'exec:socat TCP-LISTEN:%u -' % free_port + src_uri = 'exec:socat - TCP:localhost:%u' % free_port self.migrate(dst_uri, src_uri)
tests/lcitool/projects/qemu.yml +0 -1
@@ -83,7 +83,6 @@ packages: - meson - mtools - ncursesw - - netcat - nettle - ninja - nsis
Signature · 1 line
2.47.3