* [PULL 01/10] hw/s390x: Fix a possible crash with passed-through virtio devices
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 02/10] tests/functional/arm/test_aspeed_ast2600_buildroot: Fix pylint warnings Thomas Huth
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel
Cc: Richard Henderson, Halil Pasic, Eric Farman, Cornelia Huck,
Christian Borntraeger
From: Thomas Huth <thuth@redhat.com>
Consider the following nested setup: An L1 host uses some virtio device
(e.g. virtio-keyboard) for the L2 guest, and this L2 guest passes this
device through to the L3 guest. Since the L3 guest sees a virtio device,
it might send virtio notifications to the QEMU in L2 for that device.
But since the QEMU in L2 defined this device as vfio-ccw, the function
handle_virtio_ccw_notify() cannot handle this and crashes: It calls
virtio_ccw_get_vdev() that casts sch->driver_data into a VirtioCcwDevice,
but since "sch" belongs to a vfio-ccw device, that driver_data rather
points to a CcwDevice instead. So as soon as QEMU tries to use some
VirtioCcwDevice specific data from that device, we've lost.
We must not take virtio notifications for such devices. Thus fix the
issue by adding a check to the handle_virtio_ccw_notify() handler to
refuse all devices that are not our own virtio devices. Like in the
other branches that detect wrong settings, we return -EINVAL from the
function, which will later be placed in GPR2 to inform the guest about
the error.
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251118174047.73103-1-thuth@redhat.com>
---
hw/s390x/s390-hypercall.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/s390x/s390-hypercall.c b/hw/s390x/s390-hypercall.c
index ac1b08b2cd5..508dd97ca0d 100644
--- a/hw/s390x/s390-hypercall.c
+++ b/hw/s390x/s390-hypercall.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "cpu.h"
#include "hw/s390x/s390-virtio-ccw.h"
#include "hw/s390x/s390-hypercall.h"
@@ -42,6 +43,19 @@ static int handle_virtio_ccw_notify(uint64_t subch_id, uint64_t data)
if (!sch || !css_subch_visible(sch)) {
return -EINVAL;
}
+ if (sch->id.cu_type != VIRTIO_CCW_CU_TYPE) {
+ /*
+ * This might happen in nested setups: If the L1 host defined the
+ * L2 guest with a virtio device (e.g. virtio-keyboard), and the
+ * L2 guest passes this device through to the L3 guest, the L3 guest
+ * might send virtio notifications to the QEMU in L2 for that device.
+ * But since the QEMU in L2 defined this device as vfio-ccw, it's not
+ * a VirtIODevice that we can handle here!
+ */
+ warn_report_once("Got virtio notification for unsupported device "
+ "on subchannel %02x.%1x.%04x!", cssid, ssid, schid);
+ return -EINVAL;
+ }
vdev = virtio_ccw_get_vdev(sch);
if (vq_idx >= VIRTIO_QUEUE_MAX || !virtio_queue_get_num(vdev, vq_idx)) {
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 02/10] tests/functional/arm/test_aspeed_ast2600_buildroot: Fix pylint warnings
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
2025-11-21 9:38 ` [PULL 01/10] hw/s390x: Fix a possible crash with passed-through virtio devices Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 03/10] tests/functional/x86_64/test_virtio_gpu: Fix various issues reported by pylint Thomas Huth
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Cédric Le Goater
From: Thomas Huth <thuth@redhat.com>
Pylint recommends to use a "with" context for tempfile.TemporaryDirectory()
to make sure that the directory is deleted once it is not needed anymore,
and it recommends to use the "check" parameter for subprocess.run().
For style reasons, the imports at the beginning of the file should be
grouped by module.
Message-Id: <20251113100601.476900-1-thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-4-thuth@redhat.com>
---
.../arm/test_aspeed_ast2600_buildroot.py | 21 +++++++++++--------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/tests/functional/arm/test_aspeed_ast2600_buildroot.py b/tests/functional/arm/test_aspeed_ast2600_buildroot.py
index 51f2676c906..575a5f64143 100755
--- a/tests/functional/arm/test_aspeed_ast2600_buildroot.py
+++ b/tests/functional/arm/test_aspeed_ast2600_buildroot.py
@@ -9,8 +9,8 @@
import tempfile
import subprocess
-from qemu_test import Asset
from aspeed import AspeedTest
+from qemu_test import Asset
from qemu_test import exec_command_and_wait_for_pattern, skipIfMissingCommands
@@ -66,21 +66,18 @@ def test_arm_ast2600_evb_buildroot(self):
'images/ast2600-evb/buildroot-2023.02-tpm/flash.img'),
'a46009ae8a5403a0826d607215e731a8c68d27c14c41e55331706b8f9c7bd997')
- @skipIfMissingCommands('swtpm')
- def test_arm_ast2600_evb_buildroot_tpm(self):
- self.set_machine('ast2600-evb')
-
+ def _test_arm_ast2600_evb_buildroot_tpm(self, tpmstate_dir):
image_path = self.ASSET_BR2_202302_AST2600_TPM_FLASH.fetch()
- tpmstate_dir = tempfile.TemporaryDirectory(prefix="qemu_")
- socket = os.path.join(tpmstate_dir.name, 'swtpm-socket')
+ socket = os.path.join(tpmstate_dir, 'swtpm-socket')
# We must put the TPM state dir in /tmp/, not the build dir,
# because some distros use AppArmor to lock down swtpm and
# restrict the set of locations it can access files in.
subprocess.run(['swtpm', 'socket', '-d', '--tpm2',
- '--tpmstate', f'dir={tpmstate_dir.name}',
- '--ctrl', f'type=unixio,path={socket}'])
+ '--tpmstate', f'dir={tpmstate_dir}',
+ '--ctrl', f'type=unixio,path={socket}'],
+ check=True)
self.vm.add_args('-chardev', f'socket,id=chrtpm,path={socket}')
self.vm.add_args('-tpmdev', 'emulator,id=tpm0,chardev=chrtpm')
@@ -97,6 +94,12 @@ def test_arm_ast2600_evb_buildroot_tpm(self):
self.do_test_arm_aspeed_buildroot_poweroff()
+ @skipIfMissingCommands('swtpm')
+ def test_arm_ast2600_evb_buildroot_tpm(self):
+ self.set_machine('ast2600-evb')
+ with tempfile.TemporaryDirectory(prefix="qemu_") as tpmstate_dir:
+ self._test_arm_ast2600_evb_buildroot_tpm(tpmstate_dir)
+
if __name__ == '__main__':
AspeedTest.main()
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 03/10] tests/functional/x86_64/test_virtio_gpu: Fix various issues reported by pylint
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
2025-11-21 9:38 ` [PULL 01/10] hw/s390x: Fix a possible crash with passed-through virtio devices Thomas Huth
2025-11-21 9:38 ` [PULL 02/10] tests/functional/arm/test_aspeed_ast2600_buildroot: Fix pylint warnings Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 04/10] tests/functional/x86_64/test_reverse_debug: Silence pylint warning Thomas Huth
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Akihiko Odaki, Zhao Liu, Alex Bennée
From: Thomas Huth <thuth@redhat.com>
Use the recommended order for import statements, specify the kind of
exceptions that we try to catch, use f-strings where it makes sense,
rewrite the vug_log_file part with a proper "with" statement and
fix some FIXMEs by checking for the availability of the devices, etc.
Message-Id: <20251113114015.490303-1-thuth@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-5-thuth@redhat.com>
---
tests/functional/x86_64/test_virtio_gpu.py | 56 +++++++++++-----------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/tests/functional/x86_64/test_virtio_gpu.py b/tests/functional/x86_64/test_virtio_gpu.py
index be96de24da2..58b0f72ba42 100755
--- a/tests/functional/x86_64/test_virtio_gpu.py
+++ b/tests/functional/x86_64/test_virtio_gpu.py
@@ -5,22 +5,23 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
+import os
+import socket
+import subprocess
from qemu_test import QemuSystemTest, Asset
from qemu_test import wait_for_console_pattern
from qemu_test import exec_command_and_wait_for_pattern
from qemu_test import is_readable_executable_file
-
-import os
-import socket
-import subprocess
+from qemu.machine.machine import VMLaunchFailure
def pick_default_vug_bin(test):
bld_dir_path = test.build_file("contrib", "vhost-user-gpu", "vhost-user-gpu")
if is_readable_executable_file(bld_dir_path):
return bld_dir_path
+ return None
class VirtioGPUx86(QemuSystemTest):
@@ -46,8 +47,8 @@ def wait_for_console_pattern(self, success_message, vm=None):
)
def test_virtio_vga_virgl(self):
- # FIXME: should check presence of virtio, virgl etc
self.require_accelerator('kvm')
+ self.require_device('virtio-vga-gl')
kernel_path = self.ASSET_KERNEL.fetch()
initrd_path = self.ASSET_INITRD.fetch()
@@ -68,7 +69,7 @@ def test_virtio_vga_virgl(self):
)
try:
self.vm.launch()
- except:
+ except VMLaunchFailure:
# TODO: probably fails because we are missing the VirGL features
self.skipTest("VirGL not enabled?")
@@ -78,8 +79,8 @@ def test_virtio_vga_virgl(self):
)
def test_vhost_user_vga_virgl(self):
- # FIXME: should check presence of vhost-user-gpu, virgl, memfd etc
self.require_accelerator('kvm')
+ self.require_device('vhost-user-vga')
vug = pick_default_vug_bin(self)
if not vug:
@@ -95,27 +96,29 @@ def test_vhost_user_vga_virgl(self):
os.set_inheritable(qemu_sock.fileno(), True)
os.set_inheritable(vug_sock.fileno(), True)
- self._vug_log_path = self.log_file("vhost-user-gpu.log")
- self._vug_log_file = open(self._vug_log_path, "wb")
- self.log.info('Complete vhost-user-gpu.log file can be '
- 'found at %s', self._vug_log_path)
-
- vugp = subprocess.Popen(
- [vug, "--virgl", "--fd=%d" % vug_sock.fileno()],
- stdin=subprocess.DEVNULL,
- stdout=self._vug_log_file,
- stderr=subprocess.STDOUT,
- shell=False,
- close_fds=False,
- )
- self._vug_log_file.close()
-
+ vug_log_path = self.log_file("vhost-user-gpu.log")
+ self.log.info('Complete vhost-user-gpu.log file can be found at %s',
+ vug_log_path)
+ with open(vug_log_path, "wb") as vug_log_file:
+ with subprocess.Popen([vug, "--virgl", f"--fd={vug_sock.fileno()}"],
+ stdin=subprocess.DEVNULL,
+ stdout=vug_log_file,
+ stderr=subprocess.STDOUT,
+ shell=False,
+ close_fds=False) as vugp:
+ self._test_vhost_user_vga_virgl(qemu_sock,
+ kernel_path, initrd_path)
+ qemu_sock.close()
+ vug_sock.close()
+ vugp.terminate()
+
+ def _test_vhost_user_vga_virgl(self, qemu_sock, kernel_path, initrd_path):
self.vm.set_console()
self.vm.add_args("-cpu", "host")
self.vm.add_args("-m", "2G")
self.vm.add_args("-object", "memory-backend-memfd,id=mem,size=2G")
self.vm.add_args("-machine", "pc,memory-backend=mem,accel=kvm")
- self.vm.add_args("-chardev", "socket,id=vug,fd=%d" % qemu_sock.fileno())
+ self.vm.add_args("-chardev", f"socket,id=vug,fd={qemu_sock.fileno()}")
self.vm.add_args("-device", "vhost-user-vga,chardev=vug")
self.vm.add_args("-display", "egl-headless")
self.vm.add_args(
@@ -128,17 +131,14 @@ def test_vhost_user_vga_virgl(self):
)
try:
self.vm.launch()
- except:
+ except VMLaunchFailure:
# TODO: probably fails because we are missing the VirGL features
self.skipTest("VirGL not enabled?")
self.wait_for_console_pattern("as init process")
exec_command_and_wait_for_pattern(self, "/usr/sbin/modprobe virtio_gpu",
"features: +virgl +edid")
self.vm.shutdown()
- qemu_sock.close()
- vug_sock.close()
- vugp.terminate()
- vugp.wait()
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 04/10] tests/functional/x86_64/test_reverse_debug: Silence pylint warning
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (2 preceding siblings ...)
2025-11-21 9:38 ` [PULL 03/10] tests/functional/x86_64/test_virtio_gpu: Fix various issues reported by pylint Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 05/10] tests/functional/x86_64/test_memlock: Silence pylint warnings Thomas Huth
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Zhao Liu, Philippe Mathieu-Daudé
From: Thomas Huth <thuth@redhat.com>
Pylint does not like the underscores in the class name here, so
rename the class accordingly to make pylint happy here.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-8-thuth@redhat.com>
---
tests/functional/x86_64/test_reverse_debug.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/functional/x86_64/test_reverse_debug.py b/tests/functional/x86_64/test_reverse_debug.py
index 2b31ae87243..ab5dac98386 100755
--- a/tests/functional/x86_64/test_reverse_debug.py
+++ b/tests/functional/x86_64/test_reverse_debug.py
@@ -18,7 +18,7 @@
from reverse_debugging import ReverseDebugging
-class ReverseDebugging_X86_64(ReverseDebugging):
+class ReverseDebuggingX86(ReverseDebugging):
@skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2922")
def test_x86_64_pc(self):
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 05/10] tests/functional/x86_64/test_memlock: Silence pylint warnings
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (3 preceding siblings ...)
2025-11-21 9:38 ` [PULL 04/10] tests/functional/x86_64/test_reverse_debug: Silence pylint warning Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 06/10] tests/functional/ppc/test_amiga: Fix issues reported by pylint and flake8 Thomas Huth
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Zhao Liu, Philippe Mathieu-Daudé
From: Thomas Huth <thuth@redhat.com>
Pylint complains about a missing "encoding" parameter for the open()
function here, and about a missing return statement in the "except"
block (which cannot happen since skipTest() never returns). Rework
the code a little bit to silence the warnings.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-9-thuth@redhat.com>
---
tests/functional/x86_64/test_memlock.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/functional/x86_64/test_memlock.py b/tests/functional/x86_64/test_memlock.py
index 81bce80b0c4..f970a2c3095 100755
--- a/tests/functional/x86_64/test_memlock.py
+++ b/tests/functional/x86_64/test_memlock.py
@@ -69,11 +69,13 @@ def get_process_status_values(self, pid: int) -> Dict[str, int]:
return result
def _get_raw_process_status(self, pid: int) -> str:
+ status = None
try:
- with open(f'/proc/{pid}/status', 'r') as f:
- return f.read()
+ with open(f'/proc/{pid}/status', 'r', encoding="ascii") as f:
+ status = f.read()
except FileNotFoundError:
self.skipTest("Can't open status file of the process")
+ return status
if __name__ == '__main__':
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 06/10] tests/functional/ppc/test_amiga: Fix issues reported by pylint and flake8
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (4 preceding siblings ...)
2025-11-21 9:38 ` [PULL 05/10] tests/functional/x86_64/test_memlock: Silence pylint warnings Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 07/10] tests/functional/ppc/test_ppe42: Fix style issues reported by pylint Thomas Huth
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé
From: Thomas Huth <thuth@redhat.com>
Pylint complains about unused variable "tar_name" and a missing "check"
for subprocess.run(), and flake8 suggest a second empty line after the
class. While we're at it, also remove the unused "timeout" class variable
(that was only necessary for the avocado framework which we don't use
anymore).
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-10-thuth@redhat.com>
---
tests/functional/ppc/test_amiga.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/functional/ppc/test_amiga.py b/tests/functional/ppc/test_amiga.py
index 8600e2e9633..36378fb6972 100755
--- a/tests/functional/ppc/test_amiga.py
+++ b/tests/functional/ppc/test_amiga.py
@@ -15,8 +15,6 @@
class AmigaOneMachine(QemuSystemTest):
- timeout = 90
-
ASSET_IMAGE = Asset(
('https://www.hyperion-entertainment.com/index.php/'
'downloads?view=download&format=raw&file=25'),
@@ -25,19 +23,19 @@ class AmigaOneMachine(QemuSystemTest):
def test_ppc_amigaone(self):
self.require_accelerator("tcg")
self.set_machine('amigaone')
- tar_name = 'A1Firmware_Floppy_05-Mar-2005.zip'
self.archive_extract(self.ASSET_IMAGE, format="zip")
bios = self.scratch_file("u-boot-amigaone.bin")
with open(bios, "wb") as bios_fh:
subprocess.run(['tail', '-c', '524288',
self.scratch_file("floppy_edition",
"updater.image")],
- stdout=bios_fh)
+ stdout=bios_fh, check=True)
self.vm.set_console()
self.vm.add_args('-bios', bios)
self.vm.launch()
wait_for_console_pattern(self, 'FLASH:')
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 07/10] tests/functional/ppc/test_ppe42: Fix style issues reported by pylint
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (5 preceding siblings ...)
2025-11-21 9:38 ` [PULL 06/10] tests/functional/ppc/test_amiga: Fix issues reported by pylint and flake8 Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 08/10] tests/functional/aarch64/test_reverse_debug: Fix " Thomas Huth
2025-11-21 9:38 ` [PULL 09/10] tests/functional/aarch64/test_rme_sbsaref: Silence " Thomas Huth
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé, Glenn Miles
From: Thomas Huth <thuth@redhat.com>
Pylint suggests to write some parts of the code in a slightly different
way ... thus rework the code to make the linter happy.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-11-thuth@redhat.com>
---
tests/functional/ppc/test_ppe42.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/functional/ppc/test_ppe42.py b/tests/functional/ppc/test_ppe42.py
index 26bbe11b2d3..7b360a40a54 100644
--- a/tests/functional/ppc/test_ppe42.py
+++ b/tests/functional/ppc/test_ppe42.py
@@ -6,8 +6,9 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
-from qemu_test import QemuSystemTest, Asset
import asyncio
+from qemu_test import QemuSystemTest, Asset
+
class Ppe42Machine(QemuSystemTest):
@@ -30,13 +31,13 @@ def _test_completed(self):
raise
self.log.info(output)
- if "NIP fff80200" in output:
- self.log.info("<test completed>")
- return True
- else:
+ if "NIP fff80200" not in output:
self.log.info("<test not completed>")
return False
+ self.log.info("<test completed>")
+ return True
+
def _wait_pass_fail(self, timeout):
while not self._test_completed():
if timeout >= self.poll_period:
@@ -49,14 +50,13 @@ def _wait_pass_fail(self, timeout):
except asyncio.TimeoutError:
self.log.info("Poll period ended.")
- pass
except Exception as err:
self.log.debug(f"event_wait() failed due to {err=},"
" {type(err)=}")
raise
- if e != None:
+ if e is not None:
self.log.debug(f"Execution stopped: {e}")
self.log.debug("Exiting due to test failure")
self.fail("Failure detected!")
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 08/10] tests/functional/aarch64/test_reverse_debug: Fix issues reported by pylint
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (6 preceding siblings ...)
2025-11-21 9:38 ` [PULL 07/10] tests/functional/ppc/test_ppe42: Fix style issues reported by pylint Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
2025-11-21 9:38 ` [PULL 09/10] tests/functional/aarch64/test_rme_sbsaref: Silence " Thomas Huth
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé
From: Thomas Huth <thuth@redhat.com>
Don't use underscores in CamelCase names and drop an unused import.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-13-thuth@redhat.com>
---
tests/functional/aarch64/test_reverse_debug.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/functional/aarch64/test_reverse_debug.py b/tests/functional/aarch64/test_reverse_debug.py
index ec3348c96d8..e9fa4479d73 100755
--- a/tests/functional/aarch64/test_reverse_debug.py
+++ b/tests/functional/aarch64/test_reverse_debug.py
@@ -14,11 +14,11 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import Asset, skipFlakyTest
+from qemu_test import Asset
from reverse_debugging import ReverseDebugging
-class ReverseDebugging_AArch64(ReverseDebugging):
+class ReverseDebuggingAArch64(ReverseDebugging):
ASSET_KERNEL = Asset(
('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PULL 09/10] tests/functional/aarch64/test_rme_sbsaref: Silence issues reported by pylint
2025-11-21 9:38 [PULL 00/10] Fixes for QEMU v10.2rc2 Thomas Huth
` (7 preceding siblings ...)
2025-11-21 9:38 ` [PULL 08/10] tests/functional/aarch64/test_reverse_debug: Fix " Thomas Huth
@ 2025-11-21 9:38 ` Thomas Huth
8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2025-11-21 9:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé
From: Thomas Huth <thuth@redhat.com>
Drop unused import and use an encoding for open().
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-15-thuth@redhat.com>
---
tests/functional/aarch64/test_rme_sbsaref.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/functional/aarch64/test_rme_sbsaref.py b/tests/functional/aarch64/test_rme_sbsaref.py
index 6f92858397a..4845c824960 100755
--- a/tests/functional/aarch64/test_rme_sbsaref.py
+++ b/tests/functional/aarch64/test_rme_sbsaref.py
@@ -14,7 +14,6 @@
import shutil
from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
-from qemu_test import exec_command_and_wait_for_pattern
class Aarch64RMESbsaRefMachine(QemuSystemTest):
@@ -48,7 +47,7 @@ def test_aarch64_rme_sbsaref(self):
efi = join(rme_stack, 'out', 'EFI')
os.makedirs(efi, exist_ok=True)
shutil.copyfile(join(rme_stack, 'out', 'Image'), join(efi, 'Image'))
- with open(join(efi, 'startup.nsh'), 'w') as startup:
+ with open(join(efi, 'startup.nsh'), 'w', encoding='ascii') as startup:
startup.write('fs0:Image nokaslr root=/dev/vda rw init=/init --'
' /host/out/lkvm run --realm'
' -m 256m'
--
2.51.1
^ permalink raw reply related [flat|nested] 10+ messages in thread