Skip to contentSkip to conversation

qtests, typedefs and gnu99

GIT PULL Applied Thomas Huth 2 participants 5 messages Jan 22, 2019

lore
Share & tools
lore
#0 lore raw

Hi Peter!

The following changes since commit 166609e6070fab3424510ac7292ecb585f8b80fb:

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-january-17-2019-v2' into staging (2019-01-21 17:53:28 +0000)

are available in the git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-22

for you to fetch changes up to f48a79da78eb605bb0977f930ca137e9b8bdede8:

tests: remove rule for nonexisting qdev-monitor-test (2019-01-22 06:26:33 +0100)

----------------------------------------------------------------
- Use more CONFIG Makefile switches for qtests
- Get rid of global_qtests in some more qtests
- typedef cleanups
- Fixes for compiling with Clang
- Force C standard to gnu99
- Don't use -nographic in qtests
----------------------------------------------------------------

Paolo Bonzini (1):
tests: remove rule for nonexisting qdev-monitor-test

Peter Maydell (1):
tests/hexloader-test: Don't pass -nographic to the QEMU under test

Philippe Mathieu-Daudé (13):
hw/input/ps2: Remove PS2State from "qemu/typedefs.h" hw/pcmcia: Remove PCMCIACardState from "qemu/typedefs.h" hw/ide/ahci: Remove AllwinnerAHCIState from "qemu/typedefs.h" hw/i2c/smbus: Remove SMBusDevice from "qemu/typedefs.h" hw/bt: Remove HCIInfo from "qemu/typedefs.h" hw/char/serial: Remove SerialState from "qemu/typedefs.h" hw/i386: Remove PCMachineClass from "qemu/typedefs.h"
audio: Remove AudioState from "qemu/typedefs.h" ui/console: Remove QemuDmaBuf from "qemu/typedefs.h" ui/console: Remove DisplayState/DisplaySurface from "qemu/typedefs.h" ui/console: Remove MouseTransformInfo from qemu/typedefs.h ui/console: Remove PixelFormat from qemu/typedefs.h
virtio-net: Fix VirtIONet typedef redefinition

Thomas Huth (11):
tests/Makefile: Use some more CONFIG switches for x86 tests tests/Makefile: Use some more CONFIG switches for ppc tests tests/endianesss: Make test independent of global_qtest tests/boot-order: Make test independent of global_qtest tests/pnv-xscom: Make test independent of global_qtest
ppc: Move spapr-related prototypes from xics.h into a seperate header file
ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode
linux-user: Fix compilation with clang 3.4
block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode
seccomp: Work-around GCC 4.x bug in gnu99 mode
configure: Force the C standard to gnu99

 audio/audio_int.h              |   4 +-
 block/iscsi.c                  |   2 +
 configure                      |   5 +-
 hw/intc/xics_kvm.c             |   1 +
 hw/intc/xics_spapr.c           |   1 +
 hw/ppc/spapr_irq.c             |   1 +
 include/hw/arm/pxa.h           |   1 +
 include/hw/char/serial.h       |   4 +-
 include/hw/devices.h           |   1 +
 include/hw/i2c/smbus.h         |   2 +
 include/hw/i386/pc.h           |   4 +-
 include/hw/ide/ahci.h          |   4 +-
 include/hw/input/ps2.h         |   2 +
 include/hw/pcmcia.h            |   4 +-
 include/hw/ppc/spapr.h         |   5 +-
 include/hw/ppc/spapr_xive.h    |   2 -
 include/hw/ppc/xics.h          |   7 -
 include/hw/ppc/xics_spapr.h    |  37 +++++
 include/hw/virtio/virtio-net.h |   5 +-
 include/qemu/compiler.h        |   4 +
 include/qemu/typedefs.h        |  13 --
 include/sysemu/bt.h            |   4 +-
 include/ui/console.h           |  24 +--
 include/ui/qemu-pixman.h       |  10 ++
 linux-user/qemu.h              |   6 +-
 qemu-seccomp.c                 |   3 +-
 target/ppc/cpu.h               |   9 +-
 tests/Makefile.include         |  23 ++-
 tests/boot-order-test.c        |  59 ++++----
 tests/endianness-test.c        | 329 +++++++++++++++++++++--------------------
 tests/hexloader-test.c         |   2 +-
 tests/pnv-xscom-test.c         |  29 ++--
 32 files changed, 321 insertions(+), 286 deletions(-)
 create mode 100644 include/hw/ppc/xics_spapr.h

v4:
- Rebased patches to current master (to fix conflict in the first patch)
- Added "virtio-net: Fix VirtIONet typedef redefinition" patch
- Added "tests: remove rule for nonexisting qdev-monitor-test"

#1 lore raw

[Qemu-devel] [PULL v4 20/26] virtio-net: Fix VirtIONet typedef redefinition

From: Philippe Mathieu-Daudé <[email protected]>

Commit 2974e916df8 introduced the VirtioNetRscChain structure which refer to a VirtIONet, declared later, thus required VirtIONet typedef to use a forward declaration.
However, when compiling with Clang in -std=gnu99 mode, this triggers the following warning/error:

CC hw/net/virtio-net.o
In file included from qemu/hw/net/virtio-net.c:22:
include/hw/virtio/virtio-net.h:189:3: error: redefinition of typedef 'VirtIONet' is a C11 feature [-Werror,-Wtypedef-redefinition]

  } VirtIONet;
    ^
  include/hw/virtio/virtio-net.h:110:26: note: previous definition is here
  typedef struct VirtIONet VirtIONet;
                           ^

1 error generated.
make: *** [rules.mak:69: hw/net/virtio-net.o] Error 1

Fix it by removing the duplicate typedef definition.

---
 include/hw/virtio/virtio-net.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
include/hw/virtio/virtio-net.h +2 -3
index c7ec1a7..bd66275 100644
@@ -106,7 +106,6 @@ typedef struct VirtioNetRscSeg {
     NetClientState *nc;
 } VirtioNetRscSeg;
 
-struct VirtIONet;
 typedef struct VirtIONet VirtIONet;
 
 /* Chain is divided by protocol(ipv4/v6) and NetClientInfo */
@@ -136,7 +135,7 @@ typedef struct VirtIONetQueue {
     struct VirtIONet *n;
 } VirtIONetQueue;
 
-typedef struct VirtIONet {
+struct VirtIONet {
     VirtIODevice parent_obj;
     uint8_t mac[ETH_ALEN];
     uint16_t status;
@@ -186,7 +185,7 @@ typedef struct VirtIONet {
     int announce_counter;
     bool needs_vnet_hdr_swap;
     bool mtu_bypass_backend;
-} VirtIONet;
+};
 
 void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
                                    const char *type);
Signature · 1 line
1.8.3.1
#2 lore raw

[Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests

In reply to Thomas Huth

To be able to build and test QEMU binaries where certain devices are disabled, we have to use the right CONFIG_* switches to run certain tests only if the corresponding device really has been compiled into the binary.

---
 tests/Makefile.include | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tests/Makefile.include +5 -5
index 5e6b2c7..64478b5 100644
@@ -167,13 +167,13 @@ check-qtest-pci-$(CONFIG_NE2000_PCI) += tests/ne2000-test$(EXESUF)
 check-qtest-pci-$(CONFIG_NVME_PCI) += tests/nvme-test$(EXESUF)
 check-qtest-pci-$(CONFIG_AC97) += tests/ac97-test$(EXESUF)
 check-qtest-pci-$(CONFIG_ES1370) += tests/es1370-test$(EXESUF)
-check-qtest-pci-y += $(check-qtest-virtio-y)
+check-qtest-pci-$(CONFIG_VIRTIO) += $(check-qtest-virtio-y)
 check-qtest-pci-$(CONFIG_IPACK) += tests/tpci200-test$(EXESUF)
 check-qtest-pci-$(CONFIG_IPACK) += $(check-qtest-ipack-y)
-check-qtest-pci-y += tests/display-vga-test$(EXESUF)
+check-qtest-pci-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
 check-qtest-pci-$(CONFIG_HDA) += tests/intel-hda-test$(EXESUF)
 check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += tests/ivshmem-test$(EXESUF)
-check-qtest-pci-y += tests/megasas-test$(EXESUF)
+check-qtest-pci-$(CONFIG_MEGASAS_SCSI_PCI) += tests/megasas-test$(EXESUF)
 
 check-qtest-i386-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -185,9 +185,9 @@ check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
 check-qtest-i386-$(CONFIG_SGA) += tests/boot-serial-test$(EXESUF)
 check-qtest-i386-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
 check-qtest-i386-y += tests/rtc-test$(EXESUF)
-check-qtest-i386-y += tests/ipmi-kcs-test$(EXESUF)
+check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += tests/ipmi-kcs-test$(EXESUF)
 # Disabled temporarily as it fails intermittently especially under NetBSD VM
-# check-qtest-i386-y += tests/ipmi-bt-test$(EXESUF)
+# check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += tests/ipmi-bt-test$(EXESUF)
 check-qtest-i386-y += tests/i440fx-test$(EXESUF)
 check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
 check-qtest-i386-y += tests/drive_del-test$(EXESUF)
Signature · 1 line
1.8.3.1
#3 lore raw

[Qemu-devel] [PULL v4 26/26] tests: remove rule for nonexisting qdev-monitor-test

In reply to Thomas Huth

From: Paolo Bonzini <[email protected]>

This test was merged into drive_del-test in 2014.

Fixes e2f3f221885a90de766ce9a3 ("Merge of qdev-monitor-test, blockdev-test")
---
 tests/Makefile.include | 1 -
 1 file changed, 1 deletion(-)
tests/Makefile.include +0 -1
index e0b9aa2..4eea38a 100644
@@ -748,7 +748,6 @@ tests/qom-test$(EXESUF): tests/qom-test.o
 tests/test-hmp$(EXESUF): tests/test-hmp.o
 tests/machine-none-test$(EXESUF): tests/machine-none-test.o
 tests/drive_del-test$(EXESUF): tests/drive_del-test.o $(libqos-virtio-obj-y)
-tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)
 tests/nvme-test$(EXESUF): tests/nvme-test.o $(libqos-pc-obj-y)
 tests/pvpanic-test$(EXESUF): tests/pvpanic-test.o
 tests/i82801b11-test$(EXESUF): tests/i82801b11-test.o
Signature · 1 line
1.8.3.1
#4 lore raw
In reply to Thomas Huth
Quoted 15 lines · Thomas Huth

Hi Peter!

The following changes since commit 166609e6070fab3424510ac7292ecb585f8b80fb:

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-january-17-2019-v2' into staging (2019-01-21 17:53:28 +0000)

are available in the git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-22

for you to fetch changes up to f48a79da78eb605bb0977f930ca137e9b8bdede8:

tests: remove rule for nonexisting qdev-monitor-test (2019-01-22 06:26:33 +0100)

Quoted 8 lines

----------------------------------------------------------------
- Use more CONFIG Makefile switches for qtests
- Get rid of global_qtests in some more qtests
- typedef cleanups
- Fixes for compiling with Clang
- Force C standard to gnu99
- Don't use -nographic in qtests
----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM