On 9/14/2026 3:34 PM, Zhuoying Cai wrote:
Add test coverage for virtio-net-pci network booting on s390x by
including it in the PXE test suite. The test verifies that PXE
network booting works correctly with virtio-net-pci devices.

Signed-off-by: Zhuoying Cai <[email protected]>
---
  tests/qtest/pxe-test.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c
index 8b6015b6cd..c29386ed4b 100644
--- a/tests/qtest/pxe-test.c
+++ b/tests/qtest/pxe-test.c
@@ -129,9 +129,16 @@ static bool s390_bios_has_net_ccw(void)
      return s390_bios_has_string("Network boot starting...");
  }
+static bool s390_bios_has_net_pci(void)
+{
+    return s390_bios_has_string("Setup failed for virtio-net-pci");
+}
+
  static testdef_t s390x_tests[] = {
      { "s390-ccw-virtio", "virtio-net-ccw",
        .boot_dev_support = s390_bios_has_net_ccw },
+    { "s390-ccw-virtio", "virtio-net-pci",
+      .boot_dev_support = s390_bios_has_net_pci },
      { NULL },
  };

Tested-by: Joshua Daley <[email protected]>

make check-qtest-s390x MTESTARGS="--setup=thorough qtest-s390x/pxe-test"

Bios with the string:

# Setup failed for virtio-net-pci found
# starting QEMU: exec ./qemu-system-s390x -qtest unix:/tmp/qtest-57259.sock 
-qtest-log /dev/null -chardev socket,path=/tmp/qtest-57259.qmp,id=char0 -object 
monitor-qmp,id=qmp0,chardev=char0 -display none -audio none -run-with 
exit-with-parent=on -accel kvm -accel tcg -machine s390-ccw-virtio -nodefaults 
-boot order=n -netdev 
user,id=net0,tftp=./,bootfile=tests/pxe-test-disk-u0HvTJ,ipv4=on,ipv6=off 
-device virtio-net-pci,bootindex=1,netdev=net0   -accel qtest
ok 2 /s390x/pxe/ipv4/s390-ccw-virtio/virtio-net-pci
...
# Setup failed for virtio-net-pci found
# starting QEMU: exec ./qemu-system-s390x -qtest unix:/tmp/qtest-57259.sock 
-qtest-log /dev/null -chardev socket,path=/tmp/qtest-57259.qmp,id=char0 -object 
monitor-qmp,id=qmp0,chardev=char0 -display none -audio none -run-with 
exit-with-parent=on -accel kvm -accel tcg -machine s390-ccw-virtio -nodefaults 
-boot order=n -netdev 
user,id=net0,tftp=./,bootfile=tests/pxe-test-disk-u0HvTJ,ipv4=off,ipv6=on 
-device virtio-net-pci,bootindex=1,netdev=net0   -accel qtest
ok 4 /s390x/pxe/ipv6/s390-ccw-virtio/virtio-net-pci

Bios without the string:

# Setup failed for virtio-net-pci not found
ok 2 /s390x/pxe/ipv4/s390-ccw-virtio/virtio-net-pci # SKIP The bios does not 
support booting this device
...
# Setup failed for virtio-net-pci not found
ok 4 /s390x/pxe/ipv6/s390-ccw-virtio/virtio-net-pci # SKIP The bios does not 
support booting this device


Reply via email to