mbox series

[PATCH-for-5.1,v2,00/54] various: Fix error-propagation with Coccinelle scripts

Message ID 20200406174743.16956-1-f4bug@amsat.org
Headers show
Series various: Fix error-propagation with Coccinelle scripts | expand

Message

Philippe Mathieu-Daudé April 6, 2020, 5:46 p.m. UTC
This series is inspired of Peter Maydell fix [1]:
"hw/arm/xlnx-zynqmp.c: fix some error-handling code",
but grew after v1 [2] review :/

Markus wanted the reviewed patches in 5.0 [3] but it is too late
(and too big :p).  Ideally I would have split it in 4 sub-series
(roughly one with each cocci script) but since I won't have time
to continue this (soon), I'm sending it altogether so interested
can take/follow it.

If a particular patch is worth for 5.0, it can now be cherry-picked
alone, with its cocci script for reference.

Markus: I added the cocci patches to your Error section, I hope
that's fine :)

Regards,

Phil.

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg691636.html
[2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg692155.html
[3] https://www.mail-archive.com/qemu-devel@nongnu.org/msg694413.html
Supersedes: <20200325191830.16553-1-f4bug@amsat.org>

Philippe Mathieu-Daudé (54):
  various: Remove suspicious '\' character outside of #define in C code
  scripts/coccinelle: Script to simplify DeviceClass error propagation
  hw/arm/allwinner-a10: Move some code from realize() to init()
  hw/arm/aspeed_ast2600: Simplify use of Error*
  hw/arm/aspeed_ast2600: Move some code from realize() to init()
  hw/arm/aspeed_soc: Move some code from realize() to init()
  hw/arm/aspeed_soc: Simplify use of Error*
  hw/arm/fsl-imx6: Simplify checks on 'smp_cpus' count
  hw/arm/fsl-imx6: Move some code from realize() to init()
  hw/arm/fsl-imx31: Move some code from realize() to init()
  hw/arm/msf2-soc: Store MemoryRegion in MSF2State
  hw/arm/stm32f205_soc: Store MemoryRegion in STM32F205State
  hw/arm/stm32f205_soc: Move some code from realize() to init()
  hw/arm/xlnx-zynqmp: Use single propagate_error() call
  hw/arm/xlnx-zynqmp: Split xlnx_zynqmp_create_rpu() as init + realize
  hw/arm/xlnx-zynqmp: Move some code from realize() to init()
  hw/microblaze/xlnx-zynqmp-pmu: Move some code from realize() to init()
  hw/pci-host/pnv_phb3: Move some code from realize() to init()
  hw/riscv/sifive_e: Move some code from realize() to init()
  hw/riscv/sifive_u: Use single type_init()
  hw/riscv/sifive_u: Move some code from realize() to init()
  hw/riscv/sifive_u: Store MemoryRegion in SiFiveUSoCState
  hw/riscv/sifive_u: Move some code from realize() to init()
  hw/riscv/sifive_u: Rename MachineClass::init()
  scripts/coccinelle: Catch missing error_propagate() calls in realize()
  hw/arm/fsl-imx: Add missing error-propagation code
  hw/arm/stm32f*05_soc: Add missing error-propagation code
  hw/arm/aspeed: Add missing error-propagation code
  hw/arm/allwinner-a10: Add missing error-propagation code
  hw/arm/msf2-soc: Add missing error-propagation code
  hw/riscv/sifive: Add missing error-propagation code
  hw/arm/armv7m: Add missing error-propagation code
  hw/intc/arm_gicv3_its_kvm: Add missing error-propagation code
  hw/microblaze/xlnx-zynqmp-pmu: Add missing error-propagation code
  hw/pci-host/pnv_phb3: Add missing error-propagation code
  hw/block/onenand: Add missing error-propagation code
  scripts/coccinelle: Add script to catch missing error_propagate()
    calls
  hw/arm/bcm2835_peripherals: Add missing error-propagation code
  hw/arm/fsl-imx: Add missing error-propagation code
  hw/arm/stm32fx05_soc: Add missing error-propagation code
  hw/dma/xilinx_axidma: Add missing error-propagation code
  hw/i386/x86: Add missing error-propagation code
  hw/mips/cps: Add missing error-propagation code
  hw/misc/macio/macio: Add missing error-propagation code
  hw/net/xilinx_axienet: Add missing error-propagation code
  hw/riscv/sifive_u: Add missing error-propagation code
  hw/sd/milkymist-memcard: Add missing error-propagation code
  scripts/coccinelle: Use &error_abort in TypeInfo::instance_init()
  various: Use &error_abort in instance_init()
  scripts/coccinelle: Find eventually missing error_propagate() calls
  migration/colo: Add missing error-propagation code
  hw/mips/boston: Add missing error-propagation code
  hw/mips/mips_malta: Add missing error-propagation code
  qga/commands-win32: Add missing error-propagation code

 .../add-missing-error_propagate.cocci         |  30 +++++
 .../find-missing-error_propagate.cocci        |  53 ++++++++
 ...implify-init-realize-error_propagate.cocci |  69 ++++++++++
 .../use-error_abort-in-instance_init.cocci    |  52 ++++++++
 .../use-error_propagate-in-realize.cocci      |  54 ++++++++
 include/hw/arm/msf2-soc.h                     |   4 +
 include/hw/arm/stm32f205_soc.h                |   4 +
 include/hw/riscv/sifive_u.h                   |   2 +
 backends/cryptodev-vhost-user.c               |   2 +-
 backends/rng-egd.c                            |   2 +-
 backends/rng-random.c                         |   2 +-
 backends/vhost-user.c                         |   3 +-
 block/replication.c                           |   4 +-
 block/vhdx.c                                  |   8 +-
 dump/dump.c                                   |   2 +-
 hw/arm/allwinner-a10.c                        |  44 +++---
 hw/arm/armv7m.c                               |  12 +-
 hw/arm/aspeed_ast2600.c                       |  93 ++++++++-----
 hw/arm/aspeed_soc.c                           |  27 ++--
 hw/arm/bcm2835_peripherals.c                  |  14 +-
 hw/arm/fsl-imx25.c                            |  14 +-
 hw/arm/fsl-imx31.c                            |   4 +-
 hw/arm/fsl-imx6.c                             |  81 ++++++-----
 hw/arm/msf2-soc.c                             |  42 +++---
 hw/arm/stm32f205_soc.c                        |  38 +++---
 hw/arm/stm32f405_soc.c                        |  10 +-
 hw/arm/vexpress.c                             |   8 +-
 hw/arm/xlnx-zcu102.c                          |   8 +-
 hw/arm/xlnx-zynqmp.c                          | 126 +++++++++---------
 hw/block/fdc.c                                |   4 +-
 hw/block/onenand.c                            |   6 +-
 hw/block/vhost-user-blk.c                     |   2 +-
 hw/block/virtio-blk.c                         |   2 +-
 hw/core/machine.c                             |   6 +-
 hw/cpu/core.c                                 |   4 +-
 hw/display/vga-pci.c                          |   7 +-
 hw/display/xlnx_dp.c                          |   4 +-
 hw/dma/sparc32_dma.c                          |   2 +-
 hw/dma/xilinx_axidma.c                        |   6 +
 hw/gpio/aspeed_gpio.c                         |   2 +-
 hw/i386/x86.c                                 |   4 +
 hw/ide/macio.c                                |   4 +-
 hw/ide/qdev.c                                 |   4 +-
 hw/intc/apic_common.c                         |   2 +-
 hw/intc/arm_gicv3_its_kvm.c                   |   6 +-
 hw/mem/nvdimm.c                               |   4 +-
 hw/microblaze/xlnx-zynqmp-pmu.c               |  52 ++++----
 hw/mips/boston.c                              |  17 +--
 hw/mips/cps.c                                 |  48 +++++++
 hw/mips/mips_malta.c                          |  19 ++-
 hw/misc/aspeed_sdmc.c                         |   2 +-
 hw/misc/edu.c                                 |   3 +-
 hw/misc/macio/macio.c                         |   8 +-
 hw/misc/macio/pmu.c                           |   3 +-
 hw/misc/pca9552.c                             |   2 +-
 hw/misc/tmp105.c                              |   2 +-
 hw/misc/tmp421.c                              |   8 +-
 hw/net/e1000.c                                |   3 +-
 hw/net/lance.c                                |   3 +-
 hw/net/lasi_i82596.c                          |   3 +-
 hw/net/ne2000-isa.c                           |   4 +-
 hw/net/spapr_llan.c                           |   2 +-
 hw/net/virtio-net.c                           |   4 +-
 hw/net/xilinx_axienet.c                       |   6 +
 hw/pci-host/grackle.c                         |   2 +-
 hw/pci-host/i440fx.c                          |   8 +-
 hw/pci-host/pnv_phb3.c                        |  32 +++--
 hw/pci-host/prep.c                            |   2 +-
 hw/pci-host/q35.c                             |  23 ++--
 hw/pci-host/sabre.c                           |   3 +-
 hw/pci-host/uninorth.c                        |   9 +-
 hw/pcmcia/pxa2xx.c                            |   3 +-
 hw/ppc/spapr_drc.c                            |   6 +-
 hw/ppc/spapr_rng.c                            |   2 +-
 hw/riscv/sifive_e.c                           |  32 +++--
 hw/riscv/sifive_u.c                           | 102 ++++++++------
 hw/s390x/event-facility.c                     |   6 +-
 hw/s390x/s390-ccw.c                           |   2 +-
 hw/s390x/s390-skeys.c                         |   4 +-
 hw/s390x/s390-stattrib.c                      |   4 +-
 hw/s390x/sclp.c                               |   2 +-
 hw/scsi/scsi-bus.c                            |   2 +-
 hw/scsi/scsi-disk.c                           |   2 +-
 hw/sd/milkymist-memcard.c                     |   4 +
 hw/sd/sdhci.c                                 |   2 +-
 hw/ssi/xilinx_spips.c                         |   2 +-
 hw/usb/bus.c                                  |   4 +-
 hw/usb/dev-network.c                          |   2 +-
 hw/usb/dev-storage.c                          |   4 +-
 hw/usb/host-libusb.c                          |   2 +-
 hw/usb/redirect.c                             |   2 +-
 hw/virtio/virtio-balloon.c                    |   4 +-
 migration/colo.c                              |   3 +
 net/dump.c                                    |   4 +-
 net/filter-buffer.c                           |   2 +-
 net/filter-mirror.c                           |  10 +-
 net/filter-rewriter.c                         |   3 +-
 qga/commands-win32.c                          |  26 ++--
 target/arm/cpu64.c                            |   4 +-
 target/i386/cpu.c                             |  41 +++---
 target/microblaze/cpu.c                       |  14 +-
 target/ppc/translate_init.inc.c               |   4 +-
 target/s390x/cpu.c                            |   3 +-
 tests/check-qom-proplist.c                    |   7 +-
 tests/test-qdev-global-props.c                |   4 +-
 MAINTAINERS                                   |   5 +
 106 files changed, 1014 insertions(+), 458 deletions(-)
 create mode 100644 scripts/coccinelle/add-missing-error_propagate.cocci
 create mode 100644 scripts/coccinelle/find-missing-error_propagate.cocci
 create mode 100644 scripts/coccinelle/simplify-init-realize-error_propagate.=
cocci
 create mode 100644 scripts/coccinelle/use-error_abort-in-instance_init.cocci
 create mode 100644 scripts/coccinelle/use-error_propagate-in-realize.cocci

--=20
2.21.1

Comments

Philippe Mathieu-Daudé April 6, 2020, 6:19 p.m. UTC | #1
On 4/6/20 7:47 PM, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by running:
> 
>    $ spatch \
>      --macro-file scripts/cocci-macro-file.h \
>      --include-headers --keep-comments --in-place \
>      --sp-file \
>        scripts/coccinelle/use-error_abort-in-instance_init.cocci
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   backends/cryptodev-vhost-user.c |  2 +-
>   backends/rng-egd.c              |  2 +-
>   backends/rng-random.c           |  2 +-
>   backends/vhost-user.c           |  3 ++-
>   hw/arm/bcm2835_peripherals.c    |  6 ++++--
>   hw/arm/vexpress.c               |  8 ++++----
>   hw/arm/xlnx-zcu102.c            |  8 ++++----
>   hw/block/fdc.c                  |  4 ++--
>   hw/block/vhost-user-blk.c       |  2 +-
>   hw/block/virtio-blk.c           |  2 +-
>   hw/core/machine.c               |  6 +++---
>   hw/cpu/core.c                   |  4 ++--
>   hw/display/vga-pci.c            |  7 +++++--
>   hw/display/xlnx_dp.c            |  4 ++--
>   hw/dma/sparc32_dma.c            |  2 +-
>   hw/gpio/aspeed_gpio.c           |  2 +-
>   hw/ide/macio.c                  |  4 +++-
>   hw/ide/qdev.c                   |  4 ++--
>   hw/intc/apic_common.c           |  2 +-
>   hw/mem/nvdimm.c                 |  4 ++--
>   hw/misc/aspeed_sdmc.c           |  2 +-
>   hw/misc/edu.c                   |  3 ++-
>   hw/misc/macio/macio.c           |  4 ++--
>   hw/misc/macio/pmu.c             |  3 ++-
>   hw/misc/pca9552.c               |  2 +-
>   hw/misc/tmp105.c                |  2 +-
>   hw/misc/tmp421.c                |  8 ++++----
>   hw/net/e1000.c                  |  3 ++-
>   hw/net/lance.c                  |  3 ++-
>   hw/net/lasi_i82596.c            |  3 ++-
>   hw/net/ne2000-isa.c             |  4 ++--
>   hw/net/spapr_llan.c             |  2 +-
>   hw/net/virtio-net.c             |  2 +-
>   hw/pci-host/grackle.c           |  2 +-
>   hw/pci-host/i440fx.c            |  8 ++++----
>   hw/pci-host/prep.c              |  2 +-
>   hw/pci-host/q35.c               | 23 ++++++++++++++---------
>   hw/pci-host/sabre.c             |  3 ++-
>   hw/pci-host/uninorth.c          |  9 +++++----
>   hw/pcmcia/pxa2xx.c              |  3 ++-
>   hw/ppc/spapr_drc.c              |  6 +++---
>   hw/ppc/spapr_rng.c              |  2 +-
>   hw/riscv/sifive_u.c             |  4 ++--
>   hw/s390x/event-facility.c       |  6 +++---
>   hw/s390x/s390-ccw.c             |  2 +-
>   hw/s390x/s390-skeys.c           |  4 ++--
>   hw/s390x/s390-stattrib.c        |  4 ++--
>   hw/s390x/sclp.c                 |  2 +-
>   hw/scsi/scsi-bus.c              |  2 +-
>   hw/ssi/xilinx_spips.c           |  2 +-
>   hw/usb/bus.c                    |  4 ++--
>   hw/usb/dev-network.c            |  2 +-
>   hw/usb/dev-storage.c            |  4 ++--
>   hw/usb/host-libusb.c            |  2 +-
>   hw/usb/redirect.c               |  2 +-
>   hw/virtio/virtio-balloon.c      |  4 ++--
>   net/dump.c                      |  4 ++--
>   net/filter-buffer.c             |  2 +-
>   net/filter-mirror.c             | 10 +++++-----
>   net/filter-rewriter.c           |  3 ++-
>   target/arm/cpu64.c              |  4 ++--
>   target/i386/cpu.c               | 23 ++++++++++++++---------
>   target/s390x/cpu.c              |  3 ++-
>   tests/check-qom-proplist.c      |  7 ++++---
>   tests/test-qdev-global-props.c  |  4 ++--
>   65 files changed, 155 insertions(+), 126 deletions(-)
> 
[...]
> diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
> index 270c690479..09315f412c 100644
> --- a/tests/test-qdev-global-props.c
> +++ b/tests/test-qdev-global-props.c

Oops I forgot to commit this hunk:

@@ -27,6 +27,7 @@
  #include "hw/qdev-properties.h"
  #include "qom/object.h"
  #include "qapi/visitor.h"
+#include "qapi/error.h"


  #define TYPE_STATIC_PROPS "static_prop_type"

> @@ -151,9 +151,9 @@ static void prop2_accessor(Object *obj, Visitor *v, const char *name,
>   static void dynamic_instance_init(Object *obj)
>   {
>       object_property_add(obj, "prop1", "uint32", prop1_accessor, prop1_accessor,
> -                        NULL, NULL, NULL);
> +                        NULL, NULL, &error_abort);
>       object_property_add(obj, "prop2", "uint32", prop2_accessor, prop2_accessor,
> -                        NULL, NULL, NULL);
> +                        NULL, NULL, &error_abort);
>   }
>   
>   static void dynamic_class_init(ObjectClass *oc, void *data)
>
no-reply@patchew.org April 6, 2020, 8:34 p.m. UTC | #2
Patchew URL: https://patchew.org/QEMU/20200406174743.16956-1-f4bug@amsat.org/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT verCases_common.o -MF ./verCases_common.d -g   -c -o verCases_common.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/verCases_common.c
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT verCases_writeFunctionName.o -MF ./verCases_writeFunctionName.d -g   -c -o verCases_writeFunctionName.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/verCases_writeFunctionName.c
clang -iquote /tmp/qemu-test/build/tests/qtest/libqos -iquote tests/qtest/libqos -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong   -I/usr/include/p11-kit-1   -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -MMD -MP -MT tests/qtest/libqos/arm-virt-machine.o -MF tests/qtest/libqos/arm-virt-machine.d -g   -c -o tests/qtest/libqos/arm-virt-machine.o /tmp/qemu-test/src/tests/qtest/libqos/arm-virt-machine.c
/tmp/qemu-test/src/tests/test-qdev-global-props.c:154:38: error: use of undeclared identifier 'error_abort'
                        NULL, NULL, &error_abort);
                                     ^
/tmp/qemu-test/src/tests/test-qdev-global-props.c:156:38: error: use of undeclared identifier 'error_abort'
                        NULL, NULL, &error_abort);
                                     ^
2 errors generated.
make: *** [/tmp/qemu-test/src/rules.mak:69: tests/test-qdev-global-props.o] Error 1
make: *** Waiting for unfinished jobs....
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT readHex.o -MF ./readHex.d -g   -c -o readHex.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/readHex.c
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT writeHex.o -MF ./writeHex.d -g   -c -o writeHex.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/writeHex.c
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=f473f0005c1842bab0cbe67aad77cfbe', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-myvo9b9l/src/docker-src.2020-04-06-16.30.15.31389:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=f473f0005c1842bab0cbe67aad77cfbe
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-myvo9b9l/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    4m20.094s
user    0m9.258s


The full log is available at
http://patchew.org/logs/20200406174743.16956-1-f4bug@amsat.org/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org April 6, 2020, 8:39 p.m. UTC | #3
Patchew URL: https://patchew.org/QEMU/20200406174743.16956-1-f4bug@amsat.org/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  BUILD   fp-test
  CC      tests/qtest/endianness-test.o
/tmp/qemu-test/src/tests/test-qdev-global-props.c: In function 'dynamic_instance_init':
/tmp/qemu-test/src/tests/test-qdev-global-props.c:154:38: error: 'error_abort' undeclared (first use in this function)
                         NULL, NULL, &error_abort);
                                      ^
/tmp/qemu-test/src/tests/test-qdev-global-props.c:154:38: note: each undeclared identifier is reported only once for each function it appears in
make: *** [tests/test-qdev-global-props.o] Error 1
make: *** Waiting for unfinished jobs....
  CC      fp-test.o
  CC      slowfloat.o
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=c834ecdcff4e47c596ebdcf857245223', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-12shpxs0/src/docker-src.2020-04-06-16.36.57.9698:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=c834ecdcff4e47c596ebdcf857245223
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-12shpxs0/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    2m47.727s
user    0m8.997s


The full log is available at
http://patchew.org/logs/20200406174743.16956-1-f4bug@amsat.org/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com