Skip to content

tests/qtest: make PCI tests resilient to a compiled-out i440fx/pc machine

Rohitashv Kumar qemu-devel 1 version Applied

Status from this message: Queued, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3tests/qtest/device-plug-test: skip pc tests when 'pc' machine is unavailabletests/qtest/device-plug-test.c+8 -00 replies
2/3tests/qtest/drive_del-test: skip pc tests when 'pc' machine is unavailabletests/qtest/drive_del-test.c+16 -00 replies
3/3tests/qtest/pxe-test: skip per-row cases whose machine is unavailabletests/qtest/pxe-test.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] tests/qtest: make PCI tests resilient to a compiled-out i440fx/pc machine

From: Rohitashv Kumar <[email protected]>

QEMU can be built with the i440fx/pc machine type compiled out (for example via a custom --with-devices-<arch> configuration that only keeps the q35 machine). In that configuration a few qtests fail because they hard-code "-machine pc" instead of checking whether the machine is available.

This series makes the affected tests skip the pc-specific paths when the "pc" machine is not compiled in, using the existing qtest_has_machine() helper. There is intentionally NO behaviour change for a normal build that includes i440fx/pc: the guards only take effect when "pc" is absent, so existing CI coverage is unchanged.

For device-plug-test and drive_del-test the guard is placed inside the x86-only branch that adds "-machine pc", so coverage on other architectures (which use the default machine) is preserved, and x86 coverage is still provided by the existing q35 variants. For pxe-test the per-row check mirrors the existing per-row qtest_has_device() guard, so q35 rows keep running when pc is gone.

Tested by building QEMU with and without the i440fx/pc machine: with it present all affected tests run as before; with CONFIG_I440FX=n the pc cases skip instead of failing.

Rohitashv Kumar (3):
tests/qtest/device-plug-test: skip pc tests when 'pc' machine is
unavailable
tests/qtest/drive_del-test: skip pc tests when 'pc' machine is
unavailable
tests/qtest/pxe-test: skip per-row cases whose machine is unavailable

 tests/qtest/device-plug-test.c |  8 ++++++++
 tests/qtest/drive_del-test.c   | 16 ++++++++++++++++
 tests/qtest/pxe-test.c         |  4 ++++
 3 files changed, 28 insertions(+)
Signature · 1 line
2.47.3