Skip to content

Allow qtests with --without-default-devices (part 1)

Thomas Huth qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18hw/i386/Kconfig: ISAPC works fine without VGA_ISAhw/i386/Kconfig+1 -10 replies
2/18softmmu/vl.c: Check for the availability of the VGA device before using itsoftmmu/vl.c+12 -10 replies
3/18hw: Move the default NIC machine class setting from the x86 to the generic onehw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +2 more+7 -80 replies
4/18softmmu/vl.c: Disable default NIC if it has not been compiled into the binarysoftmmu/vl.c+7 -00 replies
5/18hw/ppc: Use MachineClass->default_nic in the ppc machineshw/ppc/e500.c hw/ppc/e500plat.c hw/ppc/mac_newworld.c +4 more+16 -50 replies
6/18hw/s390x: Use MachineClass->default_nic in the s390x machinehw/s390x/s390-virtio-ccw.c+3 -10 replies
7/18hw/sh4: Use MachineClass->default_nic in the sh4 r2d machinehw/sh4/r2d.c+3 -10 replies
8/18hw/char/parallel: Move TYPE_ISA_PARALLEL to the header filehw/char/parallel-isa.c hw/char/parallel.c hw/isa/isa-superio.c +1 more+5 -30 replies
9/18hw/i386: Ignore the default parallel port if it has not been compiled into QEMUhw/i386/pc_piix.c hw/i386/pc_q35.c+5 -00 replies
10/18hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallelhw/sparc64/sun4u.c+8 -30 replies
11/18tests/qtest/readconfig-test: Check for the availability of USB controllerstests/qtest/readconfig-test.c+4 -10 replies
12/18tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not availabletests/qtest/usb-hcd-uhci-test.c+5 -00 replies
13/18tests/qtest/cdrom-test: Fix the test to also work without optional devicestests/qtest/cdrom-test.c+15 -30 replies
14/18tests/qtest/virtio-ccw-test: Remove superfluous teststests/qtest/virtio-ccw-test.c+0 -230 replies
15/18tests/qtest: Check for the availability of virtio-ccw devices before using themtests/qtest/device-plug-test.c tests/qtest/virtio-ccw-test.c+21 -80 replies
16/18tests/qtest/meson.build: Run the net filter tests only with default devicestests/qtest/meson.build+4 -63 replies
17/18tests/qemu-iotests/172: Run QEMU with -vga none and -nic nonetests/qemu-iotests/172+1 -10 replies
18/18.gitlab-ci.d/buildtest.yml: Run full "make check" with --without-default-devices.gitlab-ci.d/buildtest.yml+1 -10 replies

Reviews trailers per patch

1 of 18 patches has a Reviewed-by or Acked-by.

PatchPaolo Bonzini
1/18
2/18
3/18
4/18
5/18
6/18
7/18
8/18
9/18
10/18
11/18
12/18
13/18
14/18
15/18
16/18A-b
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/18] Allow qtests with --without-default-devices (part 1)

When configuring QEMU with --without-default-devices, many qtests fail since they run QEMU without "-no-defaults", i.e. the QEMU binary tries to instantiate a default VGA and a NIC device - which fails when it has not been enabled in the config.

Here's now my attempt to fix these issues: The basic idea is to use the default_display and the new default_nic setting in the MachineClass to determine whether the default device is available in the binary or not, and in the latter case skip the instantiation. Some qtests also need some more check for optional devices on top, but then it's possible to run "make check" for --without-default-devices builds, too.

This series only tackles with x86 and the targets that are tested in the "build-without-defaults" gitlab CI pipeline. If these changes are acceptable, I can continue this cleanup for the other targets, too.

Thomas Huth (18):
hw/i386/Kconfig: ISAPC works fine without VGA_ISA softmmu/vl.c: Check for the availability of the VGA device before
using it
hw: Move the default NIC machine class setting from the x86 to the
generic one
softmmu/vl.c: Disable default NIC if it has not been compiled into the
binary
hw/ppc: Use MachineClass->default_nic in the ppc machines hw/s390x: Use MachineClass->default_nic in the s390x machine hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file hw/i386: Ignore the default parallel port if it has not been compiled
into QEMU
hw/sparc64/sun4u: Use MachineClass->default_nic and

    MachineClass->no_parallel

tests/qtest/readconfig-test: Check for the availability of USB
controllers
tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not
available
tests/qtest/cdrom-test: Fix the test to also work without optional
devices
tests/qtest/virtio-ccw-test: Remove superfluous tests tests/qtest: Check for the availability of virtio-ccw devices before
using them
tests/qtest/meson.build: Run the net filter tests only with default
devices
tests/qemu-iotests/172: Run QEMU with -vga none and -nic none .gitlab-ci.d/buildtest.yml: Run full "make check" with
--without-default-devices

 include/hw/boards.h             |  1 +
 include/hw/char/parallel.h      |  2 ++
 include/hw/i386/pc.h            |  1 -
 hw/char/parallel-isa.c          |  2 +-
 hw/char/parallel.c              |  1 -
 hw/i386/pc.c                    |  3 ++-
 hw/i386/pc_piix.c               |  7 ++++--
 hw/i386/pc_q35.c                |  8 +++---
 hw/isa/isa-superio.c            |  3 ++-
 hw/ppc/e500.c                   |  3 ++-
 hw/ppc/e500plat.c               |  1 +
 hw/ppc/mac_newworld.c           |  4 ++-
 hw/ppc/mac_oldworld.c           |  4 ++-
 hw/ppc/mpc8544ds.c              |  1 +
 hw/ppc/ppc440_bamboo.c          |  4 ++-
 hw/ppc/prep.c                   |  4 ++-
 hw/s390x/s390-virtio-ccw.c      |  4 ++-
 hw/sh4/r2d.c                    |  4 ++-
 hw/sparc64/sun4u.c              | 11 ++++++---
 softmmu/vl.c                    | 20 ++++++++++++++-
 tests/qtest/cdrom-test.c        | 18 +++++++++++---
 tests/qtest/device-plug-test.c  |  9 ++++++-
 tests/qtest/readconfig-test.c   |  5 +++-
 tests/qtest/usb-hcd-uhci-test.c |  5 ++++
 tests/qtest/virtio-ccw-test.c   | 43 ++++++++++-----------------------
 .gitlab-ci.d/buildtest.yml      |  2 +-
 hw/i386/Kconfig                 |  2 +-
 tests/qemu-iotests/172          |  2 +-
 tests/qtest/meson.build         | 10 +++-----
 29 files changed, 118 insertions(+), 66 deletions(-)
Signature · 1 line
2.31.1