All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
@ 2019-01-17 13:38 Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode Thomas Huth
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Thomas Huth @ 2019-01-17 13:38 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Philippe Mathieu-Daudé, Li Qiang, groug, clg, mst

 Hi Peter!

The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:

  Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)

are available in the git repository at:

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

for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:

  tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)

----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- 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
----------------------------------------------------------------

Li Qiang (3):
      tests: vhost-user-test: initialize 'fd' in chr_read
      vhost-user: fix ioeventfd_enabled
      util: check the return value of fcntl in qemu_set_{block, nonblock}

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

Philippe Mathieu-Daudé (12):
      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

Thomas Huth (12):
      hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device
      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 +-
 docs/specs/ivshmem-spec.txt |   8 +-
 hw/i386/pc_piix.c           |   1 -
 hw/intc/xics_kvm.c          |   1 +
 hw/intc/xics_spapr.c        |   1 +
 hw/misc/ivshmem.c           | 210 +---------------------------
 hw/ppc/spapr_irq.c          |   1 +
 hw/virtio/vhost-user.c      |   2 +-
 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/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-deprecated.texi        |   5 -
 qemu-seccomp.c              |   3 +-
 scripts/device-crash-test   |   1 -
 target/ppc/cpu.h            |   9 +-
 tests/Makefile.include      |  22 +--
 tests/boot-order-test.c     |  59 ++++----
 tests/endianness-test.c     | 329 ++++++++++++++++++++++----------------------
 tests/hexloader-test.c      |   2 +-
 tests/ivshmem-test.c        |  67 ++++-----
 tests/pnv-xscom-test.c      |  29 ++--
 tests/vhost-user-test.c     |   2 +-
 util/oslib-posix.c          |   8 +-
 40 files changed, 361 insertions(+), 544 deletions(-)
 create mode 100644 include/hw/ppc/xics_spapr.h

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

* [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode
  2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
@ 2019-01-17 13:38 ` Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used " Thomas Huth
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2019-01-17 13:38 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Philippe Mathieu-Daudé, Li Qiang, groug, clg, mst

When compiling the ppc code with clang and -std=gnu99, there are a
couple of warnings/errors like this one:

  CC      ppc64-softmmu/hw/intc/xics.o
In file included from hw/intc/xics.c:35:
include/hw/ppc/xics.h:43:25: error: redefinition of typedef 'ICPState' is a C11 feature
      [-Werror,-Wtypedef-redefinition]
typedef struct ICPState ICPState;
                        ^
target/ppc/cpu.h:1181:25: note: previous definition is here
typedef struct ICPState ICPState;
                        ^
Work around the problems by including the proper headers in spapr.h
and by using struct forward declarations in cpu.h.

Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/ppc/spapr.h      | 5 +++--
 include/hw/ppc/spapr_xive.h | 2 --
 target/ppc/cpu.h            | 9 +++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 9e01a5a..a947a0a 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -8,15 +8,16 @@
 #include "hw/mem/pc-dimm.h"
 #include "hw/ppc/spapr_ovec.h"
 #include "hw/ppc/spapr_irq.h"
+#include "hw/ppc/spapr_xive.h"  /* For sPAPRXive */
+#include "hw/ppc/xics.h"        /* For ICSState */
 
 struct VIOsPAPRBus;
 struct sPAPRPHBState;
 struct sPAPRNVRAM;
+
 typedef struct sPAPREventLogEntry sPAPREventLogEntry;
 typedef struct sPAPREventSource sPAPREventSource;
 typedef struct sPAPRPendingHPT sPAPRPendingHPT;
-typedef struct ICSState ICSState;
-typedef struct sPAPRXive sPAPRXive;
 
 #define HPTE64_V_HPTE_DIRTY     0x0000000000000040ULL
 #define SPAPR_ENTRY_POINT       0x100
diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h
index 7fdc250..9bec919 100644
--- a/include/hw/ppc/spapr_xive.h
+++ b/include/hw/ppc/spapr_xive.h
@@ -41,8 +41,6 @@ bool spapr_xive_irq_claim(sPAPRXive *xive, uint32_t lisn, bool lsi);
 bool spapr_xive_irq_free(sPAPRXive *xive, uint32_t lisn);
 void spapr_xive_pic_print_info(sPAPRXive *xive, Monitor *mon);
 
-typedef struct sPAPRMachineState sPAPRMachineState;
-
 void spapr_xive_hcall_init(sPAPRMachineState *spapr);
 void spapr_dt_xive(sPAPRMachineState *spapr, uint32_t nr_servers, void *fdt,
                    uint32_t phandle);
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 486abaf..a62ff60 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1177,8 +1177,9 @@ do {                                            \
 
 typedef struct PPCVirtualHypervisor PPCVirtualHypervisor;
 typedef struct PPCVirtualHypervisorClass PPCVirtualHypervisorClass;
-typedef struct XiveTCTX XiveTCTX;
-typedef struct ICPState ICPState;
+
+struct XiveTCTX;
+struct ICPState;
 
 /**
  * PowerPCCPU:
@@ -1197,8 +1198,8 @@ struct PowerPCCPU {
     int vcpu_id;
     uint32_t compat_pvr;
     PPCVirtualHypervisor *vhyp;
-    ICPState *icp;
-    XiveTCTX *tctx;
+    struct ICPState *icp;
+    struct XiveTCTX *tctx;
     void *machine_data;
     int32_t node_id; /* NUMA node this CPU belongs to */
     PPCHash64Options *hash64_opts;
-- 
1.8.3.1

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

* [Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode
  2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode Thomas Huth
@ 2019-01-17 13:38 ` Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug " Thomas Huth
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2019-01-17 13:38 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Philippe Mathieu-Daudé, Li Qiang, groug, clg, mst

The header "scsi-lowlevel.h" of libiscsi 1.9.0 contains some bad
"inline" prototype definitions which GCC refuses to compile in its
gnu99 mode:

In file included from block/iscsi.c:52:0:
/usr/include/iscsi/scsi-lowlevel.h:810:13: error: inline function
‘scsi_set_uint16’ declared but never defined [-Werror]
 inline void scsi_set_uint16(unsigned char *c, uint16_t val);
             ^
/usr/include/iscsi/scsi-lowlevel.h:809:13: error: inline function
‘scsi_set_uint32’ declared but never defined [-Werror]
 inline void scsi_set_uint32(unsigned char *c, uint32_t val);
             ^
[...]

This has been fixed by upstream libiscsi in version 1.10.0 (see
https://github.com/sahlberg/libiscsi/commit/7692027d6c11 ), but
since we still want to support 1.9.0 for CentOS 7 / RHEL7, we
have to work-around the issue by redefining the "inline" keyword
to use the old "gnu89" mode behavior via "gnu_inline" instead.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 block/iscsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/iscsi.c b/block/iscsi.c
index a7e8c1f..ff47320 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -49,7 +49,9 @@
 /* Conflict between scsi/utils.h and libiscsi! :( */
 #define SCSI_XFER_NONE ISCSI_XFER_NONE
 #include <iscsi/iscsi.h>
+#define inline __attribute__((gnu_inline))  /* required for libiscsi v1.9.0 */
 #include <iscsi/scsi-lowlevel.h>
+#undef inline
 #undef SCSI_XFER_NONE
 QEMU_BUILD_BUG_ON((int)SCSI_XFER_NONE != (int)ISCSI_XFER_NONE);
 
-- 
1.8.3.1

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

* [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug in gnu99 mode
  2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode Thomas Huth
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used " Thomas Huth
@ 2019-01-17 13:38 ` Thomas Huth
  2019-02-12 10:35   ` Eduardo Otubo
  2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
  2019-01-21 14:43 ` Peter Maydell
  4 siblings, 1 reply; 14+ messages in thread
From: Thomas Huth @ 2019-01-17 13:38 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Philippe Mathieu-Daudé, Li Qiang, groug, clg, mst

We'd like to compile QEMU with -std=gnu99, but GCC 4.8 currently
fails to compile qemu-seccomp.c in this mode:

qemu-seccomp.c:45:1: error: initializer element is not constant
 };
 ^
qemu-seccomp.c:45:1: error: (near initialization for ‘sched_setscheduler_arg[0]’)

This is due to a compiler bug which has just been fixed in GCC 5.0:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

Since we still want to support GCC 4.8 for a while and also want to use
gnu99 mode, work-around the issue by expanding the macro manually.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 qemu-seccomp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 5c73e6a..36d5829 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -41,7 +41,8 @@ struct QemuSeccompSyscall {
 };
 
 const struct scmp_arg_cmp sched_setscheduler_arg[] = {
-    SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)
+    /* was SCMP_A1(SCMP_CMP_NE, SCHED_IDLE), but expanded due to GCC 4.x bug */
+    { .arg = 1, .op = SCMP_CMP_NE, .datum_a = SCHED_IDLE }
 };
 
 static const struct QemuSeccompSyscall blacklist[] = {
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
                   ` (2 preceding siblings ...)
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug " Thomas Huth
@ 2019-01-18 11:47 ` Peter Maydell
  2019-01-18 13:15   ` Philippe Mathieu-Daudé
  2019-01-18 14:20   ` Peter Maydell
  2019-01-21 14:43 ` Peter Maydell
  4 siblings, 2 replies; 14+ messages in thread
From: Peter Maydell @ 2019-01-18 11:47 UTC (permalink / raw)
  To: Thomas Huth
  Cc: QEMU Developers, Philippe Mathieu-Daudé,
	Li Qiang, Greg Kurz, Cédric Le Goater, Michael S. Tsirkin

On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter!
>
> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>
>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>
> are available in the git repository at:
>
>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>
> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>
>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>
> ----------------------------------------------------------------
> - Remove deprecated "ivshmem" legacy device
> - Bug fix for vhost-user-test
> - 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
> ----------------------------------------------------------------

In the netbsd VM, the ipmi-bt-test is consistently failing:

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=i386-softmmu
/qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick
-k --tap < /dev/null | ./s
cripts/tap-driver.pl --test-name="ipmi-bt-test"
**
ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
ERROR - too few tests run (expected 4, got 0)
[1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
      Done(1)                 ./scripts/tap-dr...
/var/tmp/qemu-test.7opHvo/tests/Makefile.include:856: recipe for
target 'check-qtest-i386' faile
d
gmake: *** [check-qtest-i386] Error 1
gmake: *** Waiting for unfinished jobs....


This has been kind of intermittent for a while, I've seen
it on-and-off, but with this pullreq it's failed four times
in a row, so maybe something in here is making it less
intermittent.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
@ 2019-01-18 13:15   ` Philippe Mathieu-Daudé
  2019-01-18 13:23     ` Philippe Mathieu-Daudé
  2019-01-18 14:20   ` Peter Maydell
  1 sibling, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-18 13:15 UTC (permalink / raw)
  To: Peter Maydell, Thomas Huth, Corey Minyard, Paolo Bonzini
  Cc: Michael S. Tsirkin, Li Qiang, Greg Kurz, QEMU Developers,
	Cédric Le Goater, Philippe Mathieu-Daudé

On 1/18/19 12:47 PM, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>>
>>  Hi Peter!
>>
>> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>>
>>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>>
>> are available in the git repository at:
>>
>>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>>
>> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>>
>>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>>
>> ----------------------------------------------------------------
>> - Remove deprecated "ivshmem" legacy device
>> - Bug fix for vhost-user-test
>> - 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
>> ----------------------------------------------------------------
> 
> In the netbsd VM, the ipmi-bt-test is consistently failing:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu
> /qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick
> -k --tap < /dev/null | ./s
> cripts/tap-driver.pl --test-name="ipmi-bt-test"
> **
> ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
> ERROR - too few tests run (expected 4, got 0)
> [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
>       Done(1)                 ./scripts/tap-dr...
> /var/tmp/qemu-test.7opHvo/tests/Makefile.include:856: recipe for
> target 'check-qtest-i386' faile
> d
> gmake: *** [check-qtest-i386] Error 1
> gmake: *** Waiting for unfinished jobs....
> 
> 
> This has been kind of intermittent for a while, I've seen
> it on-and-off, but with this pullreq it's failed four times
> in a row, so maybe something in here is making it less
> intermittent.

This file does:

    qtest_add_func("/ipmi/extern/connect", test_connect);
    qtest_add_func("/ipmi/extern/bt_base", test_bt_base);
    qtest_add_func("/ipmi/extern/bt_enable_irq", test_enable_irq);
    qtest_add_func("/ipmi/extern/bt_base_irq", test_bt_base);
    ret = g_test_run();

The first "test" test_connect() binds emu_lfd, the 2nd test
test_bt_base() calls bt_cmd() which also use emu_lfd... could it be unbound?
This is racy, since (from g_test_run() doc):

"In general, the tests and sub-suites within each suite are run in the
order in which they are defined. [...]
However, you should never make the actual result of a test depend on the
order that tests are run in. If you need to ensure that some particular
code runs before or after a given test case, use g_test_add(), which
lets you specify setup and teardown functions."

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-18 13:15   ` Philippe Mathieu-Daudé
@ 2019-01-18 13:23     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-18 13:23 UTC (permalink / raw)
  To: Peter Maydell, Thomas Huth, Corey Minyard, Paolo Bonzini
  Cc: Michael S. Tsirkin, Li Qiang, Greg Kurz, QEMU Developers,
	Cédric Le Goater, Philippe Mathieu-Daudé

On Fri, Jan 18, 2019 at 2:15 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
> On 1/18/19 12:47 PM, Peter Maydell wrote:
> > On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
> >>
> >>  Hi Peter!
> >>
> >> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
> >>
> >>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
> >>
> >> are available in the git repository at:
> >>
> >>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
> >>
> >> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
> >>
> >>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
> >>
> >> ----------------------------------------------------------------
> >> - Remove deprecated "ivshmem" legacy device
> >> - Bug fix for vhost-user-test
> >> - 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
> >> ----------------------------------------------------------------
> >
> > In the netbsd VM, the ipmi-bt-test is consistently failing:
> >
> > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> > QTEST_QEMU_BINARY=i386-softmmu
> > /qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick
> > -k --tap < /dev/null | ./s
> > cripts/tap-driver.pl --test-name="ipmi-bt-test"
> > **
> > ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
> > ERROR - too few tests run (expected 4, got 0)
> > [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
> >       Done(1)                 ./scripts/tap-dr...
> > /var/tmp/qemu-test.7opHvo/tests/Makefile.include:856: recipe for
> > target 'check-qtest-i386' faile
> > d
> > gmake: *** [check-qtest-i386] Error 1
> > gmake: *** Waiting for unfinished jobs....
> >
> >
> > This has been kind of intermittent for a while, I've seen
> > it on-and-off, but with this pullreq it's failed four times
> > in a row, so maybe something in here is making it less
> > intermittent.
>
> This file does:
>
>     qtest_add_func("/ipmi/extern/connect", test_connect);
>     qtest_add_func("/ipmi/extern/bt_base", test_bt_base);
>     qtest_add_func("/ipmi/extern/bt_enable_irq", test_enable_irq);
>     qtest_add_func("/ipmi/extern/bt_base_irq", test_bt_base);
>     ret = g_test_run();
>
> The first "test" test_connect() binds emu_lfd, the 2nd test
> test_bt_base() calls bt_cmd() which also use emu_lfd... could it be unbound?

I meant 'emu_fd' (not emu_lfd) in both cases.

> This is racy, since (from g_test_run() doc):
>
> "In general, the tests and sub-suites within each suite are run in the
> order in which they are defined. [...]
> However, you should never make the actual result of a test depend on the
> order that tests are run in. If you need to ensure that some particular
> code runs before or after a given test case, use g_test_add(), which
> lets you specify setup and teardown functions."

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
  2019-01-18 13:15   ` Philippe Mathieu-Daudé
@ 2019-01-18 14:20   ` Peter Maydell
  2019-01-18 18:26     ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2019-01-18 14:20 UTC (permalink / raw)
  To: Thomas Huth
  Cc: QEMU Developers, Philippe Mathieu-Daudé,
	Li Qiang, Greg Kurz, Cédric Le Goater, Michael S. Tsirkin

On Fri, 18 Jan 2019 at 11:47, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
> >
> >  Hi Peter!
> >
> > The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
> >
> >   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
> >
> > are available in the git repository at:
> >
> >   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
> >
> > for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
> >
> >   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
> >
> > ----------------------------------------------------------------
> > - Remove deprecated "ivshmem" legacy device
> > - Bug fix for vhost-user-test
> > - 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
> > ----------------------------------------------------------------
>
> In the netbsd VM, the ipmi-bt-test is consistently failing:
>
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu
> /qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick
> -k --tap < /dev/null | ./s
> cripts/tap-driver.pl --test-name="ipmi-bt-test"
> **
> ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
> ERROR - too few tests run (expected 4, got 0)
> [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
>       Done(1)                 ./scripts/tap-dr...
> /var/tmp/qemu-test.7opHvo/tests/Makefile.include:856: recipe for
> target 'check-qtest-i386' faile
> d
> gmake: *** [check-qtest-i386] Error 1
> gmake: *** Waiting for unfinished jobs....
>
>
> This has been kind of intermittent for a while, I've seen
> it on-and-off, but with this pullreq it's failed four times
> in a row, so maybe something in here is making it less
> intermittent.

I tried the "raise the timeout" change you suggested on IRC.
That gave me a pass the first time around but the same failure
second time I tried it:

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick -k --tap <
/dev/null | ./scripts/tap-driver.pl --test-name="ipmi-bt-test"
**
ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
ERROR - too few tests run (expected 4, got 0)
[1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
      Done(1)                 ./scripts/tap-dr...
/var/tmp/qemu-test.TATvqX/tests/Makefile.include:856: recipe for
target 'check-qtest-i386' failed



thanks
-- PMM

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-18 14:20   ` Peter Maydell
@ 2019-01-18 18:26     ` Philippe Mathieu-Daudé
  2019-01-18 18:31       ` Peter Maydell
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-18 18:26 UTC (permalink / raw)
  To: Peter Maydell, Thomas Huth
  Cc: Michael S. Tsirkin, Li Qiang, Greg Kurz, QEMU Developers,
	Cédric Le Goater, Philippe Mathieu-Daudé

On 1/18/19 3:20 PM, Peter Maydell wrote:
> On Fri, 18 Jan 2019 at 11:47, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>>>
>>>  Hi Peter!
>>>
>>> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>>>
>>>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>>>
>>> are available in the git repository at:
>>>
>>>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>>>
>>> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>>>
>>>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>>>
>>> ----------------------------------------------------------------
>>> - Remove deprecated "ivshmem" legacy device
>>> - Bug fix for vhost-user-test
>>> - 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
>>> ----------------------------------------------------------------
>>
>> In the netbsd VM, the ipmi-bt-test is consistently failing:
>>
>> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
>> QTEST_QEMU_BINARY=i386-softmmu
>> /qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick
>> -k --tap < /dev/null | ./s
>> cripts/tap-driver.pl --test-name="ipmi-bt-test"
>> **
>> ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
>> ERROR - too few tests run (expected 4, got 0)
>> [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
>>       Done(1)                 ./scripts/tap-dr...
>> /var/tmp/qemu-test.7opHvo/tests/Makefile.include:856: recipe for
>> target 'check-qtest-i386' faile
>> d
>> gmake: *** [check-qtest-i386] Error 1
>> gmake: *** Waiting for unfinished jobs....
>>
>>
>> This has been kind of intermittent for a while, I've seen
>> it on-and-off, but with this pullreq it's failed four times
>> in a row, so maybe something in here is making it less
>> intermittent.
> 
> I tried the "raise the timeout" change you suggested on IRC.
> That gave me a pass the first time around but the same failure
> second time I tried it:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick -k --tap <
> /dev/null | ./scripts/tap-driver.pl --test-name="ipmi-bt-test"
> **
> ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
> ERROR - too few tests run (expected 4, got 0)
> [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
>       Done(1)                 ./scripts/tap-dr...
> /var/tmp/qemu-test.TATvqX/tests/Makefile.include:856: recipe for
> target 'check-qtest-i386' failed

I guess I finally figured it out, the test binds IPv4 and on the NetBSD
VM, 'localhost' resolves as IPv6 so the guest can't connect to the test.

I'm not sure what's the best way to fix this (yet), meanwhile the tests
succeed using:

-- >8 --
     global_qtest = qtest_initf(
-        " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10"
+        " -chardev socket,id=ipmi0,host=127.0.0.1,port=%d,reconnect=10"
         " -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0"
---

Regards,

Phil.

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-18 18:26     ` Philippe Mathieu-Daudé
@ 2019-01-18 18:31       ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-01-18 18:31 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S. Tsirkin, Li Qiang, Greg Kurz,
	QEMU Developers, Cédric Le Goater,
	Philippe Mathieu-Daudé

On Fri, 18 Jan 2019 at 18:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 1/18/19 3:20 PM, Peter Maydell wrote:
> > I tried the "raise the timeout" change you suggested on IRC.
> > That gave me a pass the first time around but the same failure
> > second time I tried it:
> >
> > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> > QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> > QTEST_QEMU_IMG=qemu-img tests/ipmi-bt-test -m=quick -k --tap <
> > /dev/null | ./scripts/tap-driver.pl --test-name="ipmi-bt-test"
> > **
> > ERROR:tests/ipmi-bt-test.c:319:test_connect: assertion failed: (rv == 1)
> > ERROR - too few tests run (expected 4, got 0)
> > [1]   Abort trap (core dumped) MALLOC_PERTURB_=... |
> >       Done(1)                 ./scripts/tap-dr...
> > /var/tmp/qemu-test.TATvqX/tests/Makefile.include:856: recipe for
> > target 'check-qtest-i386' failed
>
> I guess I finally figured it out, the test binds IPv4 and on the NetBSD
> VM, 'localhost' resolves as IPv6 so the guest can't connect to the test.

This theory doesn't explain why the test sometimes passes and
sometimes fails, though...

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
                   ` (3 preceding siblings ...)
  2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
@ 2019-01-21 14:43 ` Peter Maydell
  2019-01-21 17:42   ` Philippe Mathieu-Daudé
  4 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2019-01-21 14:43 UTC (permalink / raw)
  To: Thomas Huth
  Cc: QEMU Developers, Philippe Mathieu-Daudé,
	Li Qiang, Greg Kurz, Cédric Le Goater, Michael S. Tsirkin

On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter!
>
> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>
>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>
> are available in the git repository at:
>
>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>
> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>
>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>
> ----------------------------------------------------------------
> - Remove deprecated "ivshmem" legacy device
> - Bug fix for vhost-user-test
> - 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
> ----------------------------------------------------------------

I gave this another run now the ipmi-bt test has been
disabled. It gets this compile failure on clang builds:

In file included from
/home/petmay01/linaro/qemu-for-merges/hw/net/vhost_net.c:21:
/home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:189:3:
error: redefinition of typedef 'VirtIONet' is a C11 feature
[-Werror,-Wtypedef-redefinition]
} VirtIONet;
  ^
/home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:110:26:
note: previous definition is here
typedef struct VirtIONet VirtIONet;
                         ^
1 error generated.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-21 14:43 ` Peter Maydell
@ 2019-01-21 17:42   ` Philippe Mathieu-Daudé
  2019-01-21 18:59     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-21 17:42 UTC (permalink / raw)
  To: Peter Maydell, Thomas Huth, Michael S. Tsirkin, Wei Xu, Yuri Benditovich
  Cc: Li Qiang, Greg Kurz, QEMU Developers, Cédric Le Goater,
	Philippe Mathieu-Daudé

On 1/21/19 3:43 PM, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>>
>>  Hi Peter!
>>
>> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>>
>>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>>
>> are available in the git repository at:
>>
>>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>>
>> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>>
>>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>>
>> ----------------------------------------------------------------
>> - Remove deprecated "ivshmem" legacy device
>> - Bug fix for vhost-user-test
>> - 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
>> ----------------------------------------------------------------
> 
> I gave this another run now the ipmi-bt test has been
> disabled. It gets this compile failure on clang builds:
> 
> In file included from
> /home/petmay01/linaro/qemu-for-merges/hw/net/vhost_net.c:21:
> /home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:189:3:
> error: redefinition of typedef 'VirtIONet' is a C11 feature
> [-Werror,-Wtypedef-redefinition]
> } VirtIONet;

Oh this got introduced by 2974e916df8:
"virtio-net: support RSC v4/v6 tcp traffic for Windows HCK".

Thomas I'm afraid you'll have to rebase and add a new fix :/

>   ^
> /home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:110:26:
> note: previous definition is here
> typedef struct VirtIONet VirtIONet;
>                          ^
> 1 error generated.
> 
> thanks
> -- PMM
> 

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

* Re: [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99
  2019-01-21 17:42   ` Philippe Mathieu-Daudé
@ 2019-01-21 18:59     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-21 18:59 UTC (permalink / raw)
  To: Peter Maydell, Thomas Huth, Michael S. Tsirkin, Wei Xu, Yuri Benditovich
  Cc: Li Qiang, Greg Kurz, QEMU Developers, Cédric Le Goater,
	Philippe Mathieu-Daudé

On 1/21/19 6:42 PM, Philippe Mathieu-Daudé wrote:
> On 1/21/19 3:43 PM, Peter Maydell wrote:
>> On Thu, 17 Jan 2019 at 13:38, Thomas Huth <thuth@redhat.com> wrote:
>>>
>>>  Hi Peter!
>>>
>>> The following changes since commit 6f2f34177a25bffd6fd92a05e6e66c8d22d97094:
>>>
>>>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-01-15 18:32:57 +0000)
>>>
>>> are available in the git repository at:
>>>
>>>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-17
>>>
>>> for you to fetch changes up to 3f0832c85380321ef697d64342b389648f8abb1c:
>>>
>>>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-17 14:25:12 +0100)
>>>
>>> ----------------------------------------------------------------
>>> - Remove deprecated "ivshmem" legacy device
>>> - Bug fix for vhost-user-test
>>> - 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
>>> ----------------------------------------------------------------
>>
>> I gave this another run now the ipmi-bt test has been
>> disabled. It gets this compile failure on clang builds:
>>
>> In file included from
>> /home/petmay01/linaro/qemu-for-merges/hw/net/vhost_net.c:21:
>> /home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:189:3:
>> error: redefinition of typedef 'VirtIONet' is a C11 feature
>> [-Werror,-Wtypedef-redefinition]
>> } VirtIONet;
> 
> Oh this got introduced by 2974e916df8:
> "virtio-net: support RSC v4/v6 tcp traffic for Windows HCK".
> 
> Thomas I'm afraid you'll have to rebase and add a new fix :/

Fix sent here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg589185.html

>>   ^
>> /home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:110:26:
>> note: previous definition is here
>> typedef struct VirtIONet VirtIONet;
>>                          ^
>> 1 error generated.
>>
>> thanks
>> -- PMM
>>

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

* Re: [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug in gnu99 mode
  2019-01-17 13:38 ` [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug " Thomas Huth
@ 2019-02-12 10:35   ` Eduardo Otubo
  0 siblings, 0 replies; 14+ messages in thread
From: Eduardo Otubo @ 2019-02-12 10:35 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Peter Maydell, qemu-devel, clg, mst, Li Qiang,
	Philippe Mathieu-Daudé,
	groug

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

On 17/01/2019 - 14:38:12, Thomas Huth wrote:
> We'd like to compile QEMU with -std=gnu99, but GCC 4.8 currently
> fails to compile qemu-seccomp.c in this mode:
> 
> qemu-seccomp.c:45:1: error: initializer element is not constant
>  };
>  ^
> qemu-seccomp.c:45:1: error: (near initialization for ‘sched_setscheduler_arg[0]’)
> 
> This is due to a compiler bug which has just been fixed in GCC 5.0:
> 
>  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567
> 
> Since we still want to support GCC 4.8 for a while and also want to use
> gnu99 mode, work-around the issue by expanding the macro manually.
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  qemu-seccomp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/qemu-seccomp.c b/qemu-seccomp.c
> index 5c73e6a..36d5829 100644
> --- a/qemu-seccomp.c
> +++ b/qemu-seccomp.c
> @@ -41,7 +41,8 @@ struct QemuSeccompSyscall {
>  };
>  
>  const struct scmp_arg_cmp sched_setscheduler_arg[] = {
> -    SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)
> +    /* was SCMP_A1(SCMP_CMP_NE, SCHED_IDLE), but expanded due to GCC 4.x bug */
> +    { .arg = 1, .op = SCMP_CMP_NE, .datum_a = SCHED_IDLE }
>  };
>  
>  static const struct QemuSeccompSyscall blacklist[] = {
> -- 
> 1.8.3.1
> 
> 

Just noticed you already sent the pull request, sorry, my tree was outdated.
Please ignore my previous email :)

-- 
Eduardo Otubo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

end of thread, other threads:[~2019-02-12 10:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 13:38 [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
2019-01-17 13:38 ` [Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode Thomas Huth
2019-01-17 13:38 ` [Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used " Thomas Huth
2019-01-17 13:38 ` [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug " Thomas Huth
2019-02-12 10:35   ` Eduardo Otubo
2019-01-18 11:47 ` [Qemu-devel] [PULL v3 00/28] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
2019-01-18 13:15   ` Philippe Mathieu-Daudé
2019-01-18 13:23     ` Philippe Mathieu-Daudé
2019-01-18 14:20   ` Peter Maydell
2019-01-18 18:26     ` Philippe Mathieu-Daudé
2019-01-18 18:31       ` Peter Maydell
2019-01-21 14:43 ` Peter Maydell
2019-01-21 17:42   ` Philippe Mathieu-Daudé
2019-01-21 18:59     ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.