qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] Allow qtests with --without-default-devices (part 1)
@ 2023-05-12 12:40 Thomas Huth
  2023-05-12 12:40 ` [PATCH 01/18] hw/i386/Kconfig: ISAPC works fine without VGA_ISA Thomas Huth
                   ` (17 more replies)
  0 siblings, 18 replies; 22+ messages in thread
From: Thomas Huth @ 2023-05-12 12:40 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée, Fabiano Rosas
  Cc: Philippe Mathieu-Daudé

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(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-05-15 10:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 12:40 [PATCH 00/18] Allow qtests with --without-default-devices (part 1) Thomas Huth
2023-05-12 12:40 ` [PATCH 01/18] hw/i386/Kconfig: ISAPC works fine without VGA_ISA Thomas Huth
2023-05-12 12:40 ` [PATCH 02/18] softmmu/vl.c: Check for the availability of the VGA device before using it Thomas Huth
2023-05-12 12:40 ` [PATCH 03/18] hw: Move the default NIC machine class setting from the x86 to the generic one Thomas Huth
2023-05-12 12:40 ` [PATCH 04/18] softmmu/vl.c: Disable default NIC if it has not been compiled into the binary Thomas Huth
2023-05-12 12:40 ` [PATCH 05/18] hw/ppc: Use MachineClass->default_nic in the ppc machines Thomas Huth
2023-05-12 12:40 ` [PATCH 06/18] hw/s390x: Use MachineClass->default_nic in the s390x machine Thomas Huth
2023-05-12 12:40 ` [PATCH 07/18] hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine Thomas Huth
2023-05-12 12:40 ` [PATCH 08/18] hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file Thomas Huth
2023-05-12 12:40 ` [PATCH 09/18] hw/i386: Ignore the default parallel port if it has not been compiled into QEMU Thomas Huth
2023-05-12 12:40 ` [PATCH 10/18] hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallel Thomas Huth
2023-05-12 12:40 ` [PATCH 11/18] tests/qtest/readconfig-test: Check for the availability of USB controllers Thomas Huth
2023-05-12 12:40 ` [PATCH 12/18] tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not available Thomas Huth
2023-05-12 12:40 ` [PATCH 13/18] tests/qtest/cdrom-test: Fix the test to also work without optional devices Thomas Huth
2023-05-12 12:40 ` [PATCH 14/18] tests/qtest/virtio-ccw-test: Remove superfluous tests Thomas Huth
2023-05-12 12:40 ` [PATCH 15/18] tests/qtest: Check for the availability of virtio-ccw devices before using them Thomas Huth
2023-05-12 12:40 ` [PATCH 16/18] tests/qtest/meson.build: Run the net filter tests only with default devices Thomas Huth
2023-05-14 20:31   ` Paolo Bonzini
2023-05-15  9:46     ` Thomas Huth
2023-05-15 10:42       ` Paolo Bonzini
2023-05-12 12:40 ` [PATCH 17/18] tests/qemu-iotests/172: Run QEMU with -vga none and -nic none Thomas Huth
2023-05-12 12:40 ` [PATCH 18/18] .gitlab-ci.d/buildtest.yml: Run full "make check" with --without-default-devices Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).