* [PATCH-for-10.0 v3 1/5] tests/functional/test_aarch64_rme_virt: fix sporadic failure
2025-04-03 20:32 [PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0 Philippe Mathieu-Daudé
@ 2025-04-03 20:32 ` Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 2/5] tests/functional: Add a decorator for skipping tests on particular OS Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-03 20:32 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini, Alex Bennée,
Alexander Graf, Phil Dennis-Jordan, Philippe Mathieu-Daudé,
Fabiano Rosas, Daniel P. Berrangé, Pierrick Bouvier,
Richard Henderson, Michael S. Tsirkin
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This test was randomly failing on our CI, and on dev machines,
especially with QEMU debug builds.
From the information collected, it's related to an implementation choice
in edk2 QEMU virt support. The workaround is to disable KASLR, to avoid
accessing protected memory.
Note: this is *not* needed for the similar test_aarch64_rme_sbsaref.
More information is available on the associated GitLab issue.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2823
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250328183816.2687925-1-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/functional/test_aarch64_rme_virt.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/functional/test_aarch64_rme_virt.py b/tests/functional/test_aarch64_rme_virt.py
index f4ad4d33d58..a1abf584f0e 100755
--- a/tests/functional/test_aarch64_rme_virt.py
+++ b/tests/functional/test_aarch64_rme_virt.py
@@ -87,7 +87,9 @@ def test_aarch64_rme_virt(self):
self.vm.add_args('-fsdev', f'local,security_model=none,path={rme_stack},id=shr0')
self.vm.add_args('-device', 'virtio-net-pci,netdev=net0')
self.vm.add_args('-netdev', 'user,id=net0')
- self.vm.add_args('-append', 'root=/dev/vda')
+ # We need to add nokaslr to avoid triggering this sporadic bug:
+ # https://gitlab.com/qemu-project/qemu/-/issues/2823
+ self.vm.add_args('-append', 'root=/dev/vda nokaslr')
self.vm.launch()
# Wait for host VM boot to complete.
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH-for-10.0 v3 2/5] tests/functional: Add a decorator for skipping tests on particular OS
2025-04-03 20:32 [PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0 Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 1/5] tests/functional/test_aarch64_rme_virt: fix sporadic failure Philippe Mathieu-Daudé
@ 2025-04-03 20:32 ` Philippe Mathieu-Daudé
2025-04-04 5:26 ` Thomas Huth
2025-04-03 20:32 ` [PATCH-for-10.0 v3 3/5] tests/functional: Skip aarch64_replay test on macOS Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-03 20:32 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini, Alex Bennée,
Alexander Graf, Phil Dennis-Jordan, Philippe Mathieu-Daudé,
Fabiano Rosas, Daniel P. Berrangé, Michael S. Tsirkin,
Richard Henderson
Since tests might be failing on some operating systems,
introduce the skipIfOperatingSystem() decorator.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tests/functional/qemu_test/__init__.py | 2 +-
tests/functional/qemu_test/decorators.py | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
index 45f7befa374..af41c2c6a22 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -15,6 +15,6 @@
from .linuxkernel import LinuxKernelTest
from .decorators import skipIfMissingCommands, skipIfNotMachine, \
skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \
- skipIfMissingImports
+ skipIfMissingImports, skipIfOperatingSystem
from .archive import archive_extract
from .uncompress import uncompress
diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qemu_test/decorators.py
index 1651eb739a7..50d29de533d 100644
--- a/tests/functional/qemu_test/decorators.py
+++ b/tests/functional/qemu_test/decorators.py
@@ -5,7 +5,7 @@
import importlib
import os
import platform
-from unittest import skipUnless
+from unittest import skipIf, skipUnless
from .cmd import which
@@ -26,6 +26,19 @@ def skipIfMissingCommands(*args):
return skipUnless(has_cmds, 'required command(s) "%s" not installed' %
", ".join(args))
+'''
+Decorator to skip execution of a test if the current
+host operating system does match one of the prohibited
+ones.
+Example
+
+ @skipIfOperatingSystem("Linux", "Darwin")
+'''
+def skipIfOperatingSystem(*args):
+ return skipIf(platform.system() in args,
+ 'running on an OS (%s) that is not able to run this test' %
+ ", ".join(args))
+
'''
Decorator to skip execution of a test if the current
host machine does not match one of the permitted
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH-for-10.0 v3 2/5] tests/functional: Add a decorator for skipping tests on particular OS
2025-04-03 20:32 ` [PATCH-for-10.0 v3 2/5] tests/functional: Add a decorator for skipping tests on particular OS Philippe Mathieu-Daudé
@ 2025-04-04 5:26 ` Thomas Huth
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2025-04-04 5:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Alex Bennée, Alexander Graf,
Phil Dennis-Jordan, Fabiano Rosas, Daniel P. Berrangé,
Michael S. Tsirkin, Richard Henderson
On 03/04/2025 22.32, Philippe Mathieu-Daudé wrote:
> Since tests might be failing on some operating systems,
> introduce the skipIfOperatingSystem() decorator.
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> tests/functional/qemu_test/__init__.py | 2 +-
> tests/functional/qemu_test/decorators.py | 15 ++++++++++++++-
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
> index 45f7befa374..af41c2c6a22 100644
> --- a/tests/functional/qemu_test/__init__.py
> +++ b/tests/functional/qemu_test/__init__.py
> @@ -15,6 +15,6 @@
> from .linuxkernel import LinuxKernelTest
> from .decorators import skipIfMissingCommands, skipIfNotMachine, \
> skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \
> - skipIfMissingImports
> + skipIfMissingImports, skipIfOperatingSystem
> from .archive import archive_extract
> from .uncompress import uncompress
> diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qemu_test/decorators.py
> index 1651eb739a7..50d29de533d 100644
> --- a/tests/functional/qemu_test/decorators.py
> +++ b/tests/functional/qemu_test/decorators.py
> @@ -5,7 +5,7 @@
> import importlib
> import os
> import platform
> -from unittest import skipUnless
> +from unittest import skipIf, skipUnless
>
> from .cmd import which
>
> @@ -26,6 +26,19 @@ def skipIfMissingCommands(*args):
> return skipUnless(has_cmds, 'required command(s) "%s" not installed' %
> ", ".join(args))
>
> +'''
> +Decorator to skip execution of a test if the current
> +host operating system does match one of the prohibited
> +ones.
> +Example
> +
> + @skipIfOperatingSystem("Linux", "Darwin")
> +'''
> +def skipIfOperatingSystem(*args):
> + return skipIf(platform.system() in args,
> + 'running on an OS (%s) that is not able to run this test' %
> + ", ".join(args))
> +
> '''
> Decorator to skip execution of a test if the current
> host machine does not match one of the permitted
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH-for-10.0 v3 3/5] tests/functional: Skip aarch64_replay test on macOS
2025-04-03 20:32 [PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0 Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 1/5] tests/functional/test_aarch64_rme_virt: fix sporadic failure Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 2/5] tests/functional: Add a decorator for skipping tests on particular OS Philippe Mathieu-Daudé
@ 2025-04-03 20:32 ` Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 4/5] tests/qtest: Skip Aarch64 VMapple machine Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 5/5] hw/arm: Do not build VMapple machine by default Philippe Mathieu-Daudé
4 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-03 20:32 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini, Alex Bennée,
Alexander Graf, Phil Dennis-Jordan, Philippe Mathieu-Daudé,
Fabiano Rosas, Daniel P. Berrangé, Michael S. Tsirkin,
Richard Henderson
As of v10.0.0-rc2 this test is still failing on macos:
$ make check-functional-aarch64 V=1
...
ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked())
Bail out! ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked())
This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2907
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/functional/test_aarch64_replay.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/functional/test_aarch64_replay.py b/tests/functional/test_aarch64_replay.py
index 04cde433bcf..029fef3cbf8 100755
--- a/tests/functional/test_aarch64_replay.py
+++ b/tests/functional/test_aarch64_replay.py
@@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
-from qemu_test import Asset
+from qemu_test import Asset, skipIfOperatingSystem
from replay_kernel import ReplayKernelBase
@@ -16,6 +16,8 @@ class Aarch64Replay(ReplayKernelBase):
'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'),
'7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7')
+ # Failing on Darwin: https://gitlab.com/qemu-project/qemu/-/issues/2907
+ @skipIfOperatingSystem('Darwin')
def test_aarch64_virt(self):
self.set_machine('virt')
self.cpu = 'cortex-a53'
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH-for-10.0 v3 4/5] tests/qtest: Skip Aarch64 VMapple machine
2025-04-03 20:32 [PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0 Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2025-04-03 20:32 ` [PATCH-for-10.0 v3 3/5] tests/functional: Skip aarch64_replay test on macOS Philippe Mathieu-Daudé
@ 2025-04-03 20:32 ` Philippe Mathieu-Daudé
2025-04-03 20:32 ` [PATCH-for-10.0 v3 5/5] hw/arm: Do not build VMapple machine by default Philippe Mathieu-Daudé
4 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-03 20:32 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini, Alex Bennée,
Alexander Graf, Phil Dennis-Jordan, Philippe Mathieu-Daudé,
Fabiano Rosas, Daniel P. Berrangé, Michael S. Tsirkin,
Richard Henderson
First, the VMapple machine only works with the ARM 'host' CPU
type, which isn't accepted for QTest:
$ qemu-system-aarch64 -M vmapple -accel qtest
qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF
Second, the QTest framework expects machines to be createable
without specifying optional arguments, however the VMapple
machine requires few of them:
$ qemu-system-aarch64 -M vmapple -accel qtest
qemu-system-aarch64: No firmware specified
$ qemu-system-aarch64 -M vmapple -accel qtest -bios /dev/null
qemu-system-aarch64: No AUX device. Please specify one as pflash drive.
Restrict this machine with QTest so we can at least run check-qtest,
otherwise we get:
$ make check-qtest-aarch64
qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF
Broken pipe
../tests/qtest/libqtest.c:199: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
...
7/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/test-hmp ERROR 24.71s killed by signal 6 SIGABRT
2/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/qom-test ERROR 71.23s killed by signal 6 SIGABRT
Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/libqtest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 2750067861e..fad307d125a 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1788,6 +1788,7 @@ void qtest_cb_for_every_machine(void (*cb)(const char *machine),
if (!strncmp("xenfv", machines[i].name, 5) ||
g_str_equal("xenpv", machines[i].name) ||
g_str_equal("xenpvh", machines[i].name) ||
+ g_str_equal("vmapple", machines[i].name) ||
g_str_equal("nitro-enclave", machines[i].name)) {
continue;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH-for-10.0 v3 5/5] hw/arm: Do not build VMapple machine by default
2025-04-03 20:32 [PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0 Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2025-04-03 20:32 ` [PATCH-for-10.0 v3 4/5] tests/qtest: Skip Aarch64 VMapple machine Philippe Mathieu-Daudé
@ 2025-04-03 20:32 ` Philippe Mathieu-Daudé
4 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-03 20:32 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini, Alex Bennée,
Alexander Graf, Phil Dennis-Jordan, Philippe Mathieu-Daudé,
Fabiano Rosas, Daniel P. Berrangé, Richard Henderson
Unfortunately as of v10.0.0-rc2 the VMapple machine is unusable:
$ qemu-system-aarch64 -M vmapple [...]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[PGIOSurfaceHostDeviceDescriptor setMapMemory:]: unrecognized selector sent to instance 0x600001ede820'
*** First throw call stack:
(
0 CoreFoundation 0x000000019c759df0 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019c21eb60 objc_exception_throw + 88
2 CoreFoundation 0x000000019c816ce0 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x000000019c6c7efc ___forwarding___ + 1500
4 CoreFoundation 0x000000019c6c7860 _CF_forwarding_prep_0 + 96
5 qemu-system-aarch64 0x000000010486dbd0 apple_gfx_mmio_realize + 200
6 qemu-system-aarch64 0x0000000104e6ab5c device_set_realized + 352
7 qemu-system-aarch64 0x0000000104e7250c property_set_bool + 100
8 qemu-system-aarch64 0x0000000104e7023c object_property_set + 136
9 qemu-system-aarch64 0x0000000104e74870 object_property_set_qobject + 60
10 qemu-system-aarch64 0x0000000104e70748 object_property_set_bool + 60
11 qemu-system-aarch64 0x0000000104e69bd8 qdev_realize_and_unref + 20
12 qemu-system-aarch64 0x0000000104e258e0 mach_vmapple_init + 1728
13 qemu-system-aarch64 0x000000010481b0ac machine_run_board_init + 1892
14 qemu-system-aarch64 0x0000000104a4def8 qmp_x_exit_preconfig + 260
15 qemu-system-aarch64 0x0000000104a51ba8 qemu_init + 14460
16 qemu-system-aarch64 0x0000000104f7cef8 main + 36
17 dyld 0x000000019c25eb4c start + 6000
)
libc++abi: terminating due to uncaught exception of type NSException
Abort trap: 6
Disable the machine so it isn't built by default.
This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2913
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
configs/devices/aarch64-softmmu/default.mak | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/devices/aarch64-softmmu/default.mak b/configs/devices/aarch64-softmmu/default.mak
index 93f4022ad62..ad8028cfd48 100644
--- a/configs/devices/aarch64-softmmu/default.mak
+++ b/configs/devices/aarch64-softmmu/default.mak
@@ -9,3 +9,4 @@ include ../arm-softmmu/default.mak
# CONFIG_XLNX_VERSAL=n
# CONFIG_SBSA_REF=n
# CONFIG_NPCM8XX=n
+CONFIG_VMAPPLE=n
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread