Message ID | 20200406174743.16956-1-f4bug@amsat.org |
---|---|
Headers | show |
Series | various: Fix error-propagation with Coccinelle scripts | expand |
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) >
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
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