qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99
@ 2019-01-22  7:08 Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Huth @ 2019-01-22  7:08 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Philippe Mathieu-Daudé

 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"

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

* [Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests
  2019-01-22  7:08 [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Thomas Huth
@ 2019-01-22  7:08 ` Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 20/26] virtio-net: Fix VirtIONet typedef redefinition Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2019-01-22  7:08 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Philippe Mathieu-Daudé

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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/Makefile.include | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 5e6b2c7..64478b5 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -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)
-- 
1.8.3.1

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

* [Qemu-devel] [PULL v4 20/26] virtio-net: Fix VirtIONet typedef redefinition
  2019-01-22  7:08 [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests Thomas Huth
@ 2019-01-22  7:08 ` Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 26/26] tests: remove rule for nonexisting qdev-monitor-test Thomas Huth
  2019-01-22 11:12 ` [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2019-01-22  7:08 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/virtio/virtio-net.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index c7ec1a7..bd66275 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -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);
-- 
1.8.3.1

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

* [Qemu-devel] [PULL v4 26/26] tests: remove rule for nonexisting qdev-monitor-test
  2019-01-22  7:08 [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests Thomas Huth
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 20/26] virtio-net: Fix VirtIONet typedef redefinition Thomas Huth
@ 2019-01-22  7:08 ` Thomas Huth
  2019-01-22 11:12 ` [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2019-01-22  7:08 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Philippe Mathieu-Daudé

From: Paolo Bonzini <pbonzini@redhat.com>

This test was merged into drive_del-test in 2014.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Fixes: e2f3f221885a90de766ce9a3 ("Merge of qdev-monitor-test, blockdev-test")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/Makefile.include | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index e0b9aa2..4eea38a 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -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
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99
  2019-01-22  7:08 [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Thomas Huth
                   ` (2 preceding siblings ...)
  2019-01-22  7:08 ` [Qemu-devel] [PULL v4 26/26] tests: remove rule for nonexisting qdev-monitor-test Thomas Huth
@ 2019-01-22 11:12 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2019-01-22 11:12 UTC (permalink / raw)
  To: Thomas Huth; +Cc: QEMU Developers, Philippe Mathieu-Daudé

On Tue, 22 Jan 2019 at 07:08, Thomas Huth <thuth@redhat.com> wrote:
>
>  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
> ----------------------------------------------------------------

Applied, thanks.

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

-- PMM

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

end of thread, other threads:[~2019-01-22 11:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22  7:08 [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Thomas Huth
2019-01-22  7:08 ` [Qemu-devel] [PULL v4 01/26] tests/Makefile: Use some more CONFIG switches for x86 tests Thomas Huth
2019-01-22  7:08 ` [Qemu-devel] [PULL v4 20/26] virtio-net: Fix VirtIONet typedef redefinition Thomas Huth
2019-01-22  7:08 ` [Qemu-devel] [PULL v4 26/26] tests: remove rule for nonexisting qdev-monitor-test Thomas Huth
2019-01-22 11:12 ` [Qemu-devel] [PULL v4 00/26] qtests, typedefs and gnu99 Peter Maydell

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