Hi Shivang, Thanks for the patch. Please find my comments below:
On 2026/07/24 02:24 PM, Shivang Upadhyay wrote: > While running remote interrupts test, without libslirp-devel installed, > facing the following panic logs. > > File > ... > raise VMLaunchFailure( > ...<3 lines>... > ) from exc > ... > Output: qemu-system-ppc64: -netdev user,id=net0: network backend > 'user' is not compiled into this binary > > Skipping the test if vm fails to launch. > > Signed-off-by: Shivang Upadhyay <[email protected]> > --- > tests/functional/ppc64/test_powernv.py | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/tests/functional/ppc64/test_powernv.py > b/tests/functional/ppc64/test_powernv.py > index bac2017e18..73ba4e7221 100755 > --- a/tests/functional/ppc64/test_powernv.py > +++ b/tests/functional/ppc64/test_powernv.py > @@ -11,6 +11,8 @@ > from qemu_test import wait_for_console_pattern > from qemu_test import exec_command_and_wait_for_pattern > > +from qemu.machine.machine import VMLaunchFailure > + > class PowernvMachine(LinuxKernelTest): > > timeout = 90 > @@ -112,7 +114,11 @@ def test_linux_remote_interrupts(self): > f'file={rootfs_path},format=raw,if=none,id=drive0,readonly=on', > '-append', 'root=/dev/nvme0n1 console=hvc0', > '-device', 'nvme,drive=drive0,bus=pcie.2,addr=0x0,serial=1234') > - self.vm.launch() > + try: > + self.vm.launch() > + except VMLaunchFailure: > + # Maybe not compiled with netuser backend > + self.skipTest(f'Could not find -net user') I think VMLaunchFailure would be raised for any VM launch failure — not just a missing netdev backend. This bare catch will silently skip the test even when the VM fails for completely unrelated reasons which may mask real regressions. The framework already has require_netdev() which probes the binary before launching the VM using qemu-system-ppc64 -M none -netdev help. Catching a post-launch failure to work around a pre-launch condition is the wrong layering entirely. Below change should be enough to achieve what you are trying. diff --git a/tests/functional/ppc64/test_powernv.py b/tests/functional/ppc64/test_powernv.py index bac2017e18df..f3e05e4d3810 100755 --- a/tests/functional/ppc64/test_powernv.py +++ b/tests/functional/ppc64/test_powernv.py @@ -90,6 +90,7 @@ def test_linux_smt_boot(self): def test_linux_remote_interrupts(self): self.require_accelerator("tcg") + self.require_netdev('user') self.set_machine('powernv') # Have below setup in this test: Thanks, Amit > > # Wait for boot to complete > console_pattern = 'CPU maps initialized for 1 thread per core' > -- > 2.54.0 > >
