ivshmem deprecation, qtests, typedefs and gnu99
[Qemu-devel] [PULL v3 23/28] ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode
In reply to Thomas HuthWhen 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.
--- 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(-)
include/hw/ppc/spapr.h +3 -2
@@ -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
include/hw/ppc/spapr_xive.h +0 -2
@@ -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);
target/ppc/cpu.h +5 -4
@@ -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;
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL v3 25/28] block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode
In reply to Thomas HuthThe 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.
--- block/iscsi.c | 2 ++ 1 file changed, 2 insertions(+)
block/iscsi.c +2 -0
@@ -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_NONEQEMU_BUILD_BUG_ON ((int )SCSI_XFER_NONE != (int )ISCSI_XFER_NONE );
Signature · 1 line
1.8.3.1
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
[Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug in gnu99 mode
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.
--- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
qemu-seccomp.c +2 -1
@@ -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[] = {
Signature · 1 line
1.8.3.1
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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 | ./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.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
Quoted 45 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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| ./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.7opHvo/tests/Makefile.include:856: recipe for target 'check-qtest-i386' faile
d
gmake: *** [check-qtest-i386] Error 1
gmake: *** Waiting for unfinished jobs....
Quoted 4 lines
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."
Quoted 53 lines · Philippe Mathieu-Daudé
Quoted 45 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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| ./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.7opHvo/tests/Makefile.include:856: recipe for target 'check-qtest-i386' faile
d
gmake: *** [check-qtest-i386] Error 1
gmake: *** Waiting for unfinished jobs....Quoted 4 lines
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:
Quoted 8 lines
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()bindsemu_lfd, the 2nd testtest_bt_base()callsbt_cmd()which also useemu_lfd... could it be unbound?
I meant 'emu_fd' (not emu_lfd) in both cases.
Quoted 8 lines
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, useg_test_add(), which lets you specify setup and teardown functions."
Quoted 46 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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| ./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.7opHvo/tests/Makefile.include:856: recipe for target 'check-qtest-i386' faile
d
gmake: *** [check-qtest-i386] Error 1
gmake: *** Waiting for unfinished jobs....
Quoted 4 lines
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
Quoted 56 lines · Peter Maydell
Quoted 46 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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| ./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.7opHvo/tests/Makefile.include:856: recipe for target 'check-qtest-i386' faile
d
gmake: *** [check-qtest-i386] Error 1
gmake: *** Waiting for unfinished jobs....Quoted 4 lines
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:
Quoted 11 lines
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.
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Peter Maydell
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:
Quoted 11 lines
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
Quoted 2 lines
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
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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
Quoted 29 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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:
Quoted 6 lines
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 :/
Quoted 10 lines
^
/home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:110:26:
note: previous definition is heretypedef struct VirtIONet VirtIONet; ^1 error generated.
thanks
-- PMM
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 29 lines · Peter Maydell
Quoted 15 lines · Thomas Huth
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)
Quoted 9 lines
----------------------------------------------------------------
- Remove deprecated "ivshmem" legacy device
- Bug fix for vhost-user-test
- Use more CONFIGMakefileswitches for qtests
- Get rid ofglobal_qtestsin 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:
Quoted 6 lines
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;
Quoted 4 lines
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/[email protected]/msg589185.html
Quoted 10 lines
Quoted 10 lines
^
/home/petmay01/linaro/qemu-for-merges/include/hw/virtio/virtio-net.h:110:26:
note: previous definition is heretypedef struct VirtIONet VirtIONet; ^1 error generated.
thanks
-- PMM
Re: [Qemu-devel] [PULL v3 26/28] seccomp: Work-around GCC 4.x bug in gnu99 mode
In reply to Thomas HuthQuoted 40 lines · Thomas Huth
We'd like to compile QEMU with -std=gnu99, but GCC 4.8 currently fails to compile
qemu-seccomp.cin 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é <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qemu-seccomp.c +2
-1@@ -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[] = {Signature · 1 line
1.8.3.1
Just noticed you already sent the pull request, sorry, my tree was outdated. Please ignore my previous email :)
Signature · 1 line
Eduardo Otubo