From 4a722d2e8e7b01c4c07a739b8305c3704644292c Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 12 Nov 2024 12:53:02 +0100 Subject: [PATCH 1/7] docs/devel/testing/functional: Clarify that we have to use the build folder Make it clear that the commands have to be run from the folder with the build, and use the python3 from our pyvenv to make sure that the pycotap module is available. Message-ID: <20241112115302.470527-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/functional.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst index b8ad7b0bf7..ae238ed3fc 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -59,11 +59,12 @@ To run a single test file without the meson test runner, you can also execute the file directly by specifying two environment variables first, the PYTHONPATH that has to include the python folder and the tests/functional folder of the source tree, and QEMU_TEST_QEMU_BINARY that has to point -to the QEMU binary that should be used for the test, for example:: +to the QEMU binary that should be used for the test. The current working +directory should be your build folder. For example:: $ export PYTHONPATH=../python:../tests/functional $ export QEMU_TEST_QEMU_BINARY=$PWD/qemu-system-x86_64 - $ python3 ../tests/functional/test_file.py + $ pyvenv/bin/python3 ../tests/functional/test_file.py The test framework will automatically purge any scratch files created during the tests. If needing to debug a failed test, it is possible to keep these From 16595bcd0e2222f51537f57200176c05f7d988ed Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 27 Nov 2024 16:14:38 +0900 Subject: [PATCH 2/7] docs: Document that hvf on Arm is supported hvf on Arm is supported since commit a1477da3ddeb ("hvf: Add Apple Silicon support"). Signed-off-by: Akihiko Odaki Reviewed-by: Alexander Graf Message-ID: <20241127-build-v1-1-65b8162733f0@daynix.com> Signed-off-by: Thomas Huth --- docs/about/build-platforms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index 6102f00aec..d8b0445157 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -40,7 +40,7 @@ Those hosts are officially supported, with various accelerators: * - CPU Architecture - Accelerators * - Arm - - kvm (64 bit only), tcg, xen + - hvf (64 bit only), kvm (64 bit only), tcg, xen * - MIPS (64 bit little endian only) - kvm, tcg * - PPC From 804675920158a290d3cda5caddf5a77ac29dad8c Mon Sep 17 00:00:00 2001 From: Xianglai Li Date: Wed, 27 Nov 2024 09:34:38 +0800 Subject: [PATCH 3/7] tests/functional: Fix the running test case causes loongarch64 to hang There is a bug in the process of resolving the serial port base address in the fdt of the loongarch VM UEFI. When both serial port information and rng-seed information are chosen in the fdt, there is a probability that the serial port base address cannot be resolved correctly. This problem can be fixed by updating UEFI. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2686 Signed-off-by: Xianglai Li Message-ID: <20241127013438.2206426-1-lixianglai@loongson.cn> Tested-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/functional/test_loongarch64_virt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_loongarch64_virt.py b/tests/functional/test_loongarch64_virt.py index 2b8baa2c2a..b7d9abf933 100755 --- a/tests/functional/test_loongarch64_virt.py +++ b/tests/functional/test_loongarch64_virt.py @@ -18,16 +18,16 @@ class LoongArchMachine(QemuSystemTest): ASSET_KERNEL = Asset( ('https://github.com/yangxiaojuan-loongson/qemu-binary/' - 'releases/download/2024-05-30/vmlinuz.efi'), + 'releases/download/2024-11-26/vmlinuz.efi'), '08b88a45f48a5fd92260bae895be4e5175be2397481a6f7821b9f39b2965b79e') ASSET_INITRD = Asset( ('https://github.com/yangxiaojuan-loongson/qemu-binary/' - 'releases/download/2024-05-30/ramdisk'), + 'releases/download/2024-11-26/ramdisk'), '03d6fb6f8ee64ecac961120a0bdacf741f17b3bee2141f17fa01908c8baf176a') ASSET_BIOS = Asset( ('https://github.com/yangxiaojuan-loongson/qemu-binary/' - 'releases/download/2024-05-30/QEMU_EFI.fd'), - '937c1e7815e2340150c194a9f8f0474259038a3d7b8845ed62cc08163c46bea1') + 'releases/download/2024-11-26/QEMU_EFI.fd'), + 'f55fbf5d92e885844631ae9bfa8887f659bbb4f6ef2beea9e9ff8bc0603b6697') def wait_for_console_pattern(self, success_message, vm=None): wait_for_console_pattern(self, success_message, From 4e035201b961cd545b6801f6656908ecc3055c69 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 26 Nov 2024 09:10:54 +0100 Subject: [PATCH 4/7] meson.build: Refuse XCode versions < v15.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to our support policy, we only support the two latest major versions of macOS, and we already removed compatibility code for older versions. However, it's still possible that people install an older version of XCode on a recent version of macOS - which won't be able to compile QEMU anymore, see for example the ticket here: https://gitlab.com/qemu-project/qemu/-/issues/2694 Thus let's set the expectations right and refuse older versions of XCode that do not match the two latest versions of macOS anymore. Message-ID: <20241126081054.244365-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index e0b880e4e1..a290dbfa33 100644 --- a/meson.build +++ b/meson.build @@ -315,8 +315,8 @@ foreach lang : all_languages # ok elif compiler.get_id() == 'clang' and compiler.compiles(''' #ifdef __apple_build_version__ - # if __clang_major__ < 12 || (__clang_major__ == 12 && __clang_minor__ < 0) - # error You need at least XCode Clang v12.0 to compile QEMU + # if __clang_major__ < 15 || (__clang_major__ == 15 && __clang_minor__ < 0) + # error You need at least XCode Clang v15.0 to compile QEMU # endif #else # if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0) @@ -325,7 +325,7 @@ foreach lang : all_languages #endif''') # ok else - error('You either need GCC v7.4 or Clang v10.0 (or XCode Clang v12.0) to compile QEMU') + error('You either need GCC v7.4 or Clang v10.0 (or XCode Clang v15.0) to compile QEMU') endif endforeach From 0218f6c3b32de6ab587a6800671a50745ce676b6 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 25 Nov 2024 13:43:42 +0100 Subject: [PATCH 5/7] .gitlab-ci.d/cirrus: Remove the wrong CPU and RAM settings from the macOS job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macOS runner ignores them and always uses 4 CPUs and 12 GiB of RAM, so remove our setting to avoid wrong expectations. Message-ID: <20241125124342.187594-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- .gitlab-ci.d/cirrus.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index 9427302383..a9e43e21d0 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -67,8 +67,6 @@ aarch64-macos-build: CIRRUS_VM_INSTANCE_TYPE: macos_instance CIRRUS_VM_IMAGE_SELECTOR: image CIRRUS_VM_IMAGE_NAME: ghcr.io/cirruslabs/macos-runner:sonoma - CIRRUS_VM_CPUS: 12 - CIRRUS_VM_RAM: 24G UPDATE_COMMAND: brew update INSTALL_COMMAND: brew install PATH_EXTRA: /opt/homebrew/ccache/libexec:/opt/homebrew/gettext/bin From c00989aae88544b96841ad0c4dc2737b003c2c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Fri, 22 Nov 2024 15:18:27 +0100 Subject: [PATCH 6/7] tests/functional: Remove sleep workarounds from sh4 test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were introduced in the avocado tests to workaround read issues when interacting with console. They are no longer necessary and we can use the expected login string instead. Test always passes now. Remove skipUnless test on QEMU_TEST_FLAKY_TESTS. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Message-ID: <20241122141827.2039984-1-clg@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/test_sh4_tuxrun.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py index 352cb360ef..b33533fc7e 100755 --- a/tests/functional/test_sh4_tuxrun.py +++ b/tests/functional/test_sh4_tuxrun.py @@ -15,7 +15,7 @@ import os import time from unittest import skipUnless -from qemu_test import Asset, exec_command_and_wait_for_pattern, exec_command +from qemu_test import Asset, exec_command_and_wait_for_pattern from qemu_test.tuxruntest import TuxRunBaselineTest class TuxRunSh4Test(TuxRunBaselineTest): @@ -27,8 +27,6 @@ class TuxRunSh4Test(TuxRunBaselineTest): 'https://storage.tuxboot.com/20230331/sh4/rootfs.ext4.zst', '3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd') - # Note: some segfaults caused by unaligned userspace access - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable') def test_sh4(self): self.set_machine('r2d') self.cpu='sh7785' @@ -46,10 +44,8 @@ class TuxRunSh4Test(TuxRunBaselineTest): console_index=1) self.vm.launch() - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.1) - exec_command(self, 'root') - time.sleep(0.1) + self.wait_for_console_pattern("tuxtest login:") + exec_command_and_wait_for_pattern(self, 'root', 'root@tuxtest:~#') exec_command_and_wait_for_pattern(self, 'halt', "reboot: System halted") From ef45f46f382a5e2c41c39c71fd3364cff4f41bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 22 Nov 2024 11:34:18 +0100 Subject: [PATCH 7/7] hw/pci: Remove unused pci_irq_pulse() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Last use of pci_irq_pulse() was removed 7 years ago in commit 5e9aa92eb1 ("hw/block: Fix pin-based interrupt behaviour of NVMe"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-ID: <20241122103418.539-1-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/pci/pci.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 135695c551..c0717e3121 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -670,16 +670,6 @@ static inline void pci_irq_deassert(PCIDevice *pci_dev) pci_set_irq(pci_dev, 0); } -/* - * FIXME: PCI does not work this way. - * All the callers to this method should be fixed. - */ -static inline void pci_irq_pulse(PCIDevice *pci_dev) -{ - pci_irq_assert(pci_dev); - pci_irq_deassert(pci_dev); -} - MSIMessage pci_get_msi_message(PCIDevice *dev, int vector); void pci_set_power(PCIDevice *pci_dev, bool state);