[PATCH-for-5.1 v3 00/23] various: Fix error-propagation with Coccinelle scripts (part 2)

Philippe Mathieu-Daudé posted 23 patches 4 years ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 failed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200412224144.12205-1-f4bug@amsat.org
Maintainers: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
.../add-missing-error_propagate.cocci         | 30 +++++++++++
.../use-error_propagate-in-realize.cocci      | 54 +++++++++++++++++++
hw/arm/allwinner-a10.c                        | 18 +++++--
hw/arm/armv7m.c                               | 12 ++++-
hw/arm/aspeed_ast2600.c                       | 36 ++++++++++---
hw/arm/aspeed_soc.c                           | 12 ++++-
hw/arm/bcm2835_peripherals.c                  |  8 +++
hw/arm/fsl-imx25.c                            | 14 ++++-
hw/arm/fsl-imx6.c                             | 26 +++++++--
hw/arm/msf2-soc.c                             | 24 +++++++--
hw/arm/stm32f205_soc.c                        | 10 +++-
hw/arm/stm32f405_soc.c                        | 10 +++-
hw/block/onenand.c                            |  6 ++-
hw/dma/xilinx_axidma.c                        |  6 +++
hw/i386/x86.c                                 |  4 ++
hw/intc/arm_gicv3_its_kvm.c                   |  6 ++-
hw/microblaze/xlnx-zynqmp-pmu.c               |  6 ++-
hw/mips/cps.c                                 | 48 +++++++++++++++++
hw/misc/macio/macio.c                         |  4 ++
hw/net/xilinx_axienet.c                       |  6 +++
hw/pci-host/pnv_phb3.c                        | 24 +++++++--
hw/riscv/sifive_e.c                           |  6 ++-
hw/riscv/sifive_u.c                           | 32 +++++++++--
hw/sd/milkymist-memcard.c                     |  4 ++
MAINTAINERS                                   |  2 +
25 files changed, 373 insertions(+), 35 deletions(-)
create mode 100644 scripts/coccinelle/add-missing-error_propagate.cocci
create mode 100644 scripts/coccinelle/use-error_propagate-in-realize.cocci
[PATCH-for-5.1 v3 00/23] various: Fix error-propagation with Coccinelle scripts (part 2)
Posted by Philippe Mathieu-Daudé 4 years ago
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: I added the cocci patches to your Error section, I hope
that's fine :)

Part 2: Add missing error_propagate() calls in DeviceClass::realize().

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
Based-on: <20200412223619.11284-1-f4bug@amsat.org>

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

 .../add-missing-error_propagate.cocci         | 30 +++++++++++
 .../use-error_propagate-in-realize.cocci      | 54 +++++++++++++++++++
 hw/arm/allwinner-a10.c                        | 18 +++++--
 hw/arm/armv7m.c                               | 12 ++++-
 hw/arm/aspeed_ast2600.c                       | 36 ++++++++++---
 hw/arm/aspeed_soc.c                           | 12 ++++-
 hw/arm/bcm2835_peripherals.c                  |  8 +++
 hw/arm/fsl-imx25.c                            | 14 ++++-
 hw/arm/fsl-imx6.c                             | 26 +++++++--
 hw/arm/msf2-soc.c                             | 24 +++++++--
 hw/arm/stm32f205_soc.c                        | 10 +++-
 hw/arm/stm32f405_soc.c                        | 10 +++-
 hw/block/onenand.c                            |  6 ++-
 hw/dma/xilinx_axidma.c                        |  6 +++
 hw/i386/x86.c                                 |  4 ++
 hw/intc/arm_gicv3_its_kvm.c                   |  6 ++-
 hw/microblaze/xlnx-zynqmp-pmu.c               |  6 ++-
 hw/mips/cps.c                                 | 48 +++++++++++++++++
 hw/misc/macio/macio.c                         |  4 ++
 hw/net/xilinx_axienet.c                       |  6 +++
 hw/pci-host/pnv_phb3.c                        | 24 +++++++--
 hw/riscv/sifive_e.c                           |  6 ++-
 hw/riscv/sifive_u.c                           | 32 +++++++++--
 hw/sd/milkymist-memcard.c                     |  4 ++
 MAINTAINERS                                   |  2 +
 25 files changed, 373 insertions(+), 35 deletions(-)
 create mode 100644 scripts/coccinelle/add-missing-error_propagate.cocci
 create mode 100644 scripts/coccinelle/use-error_propagate-in-realize.cocci

-- 
2.21.1


Re: [PATCH-for-5.1 v3 00/23] various: Fix error-propagation with Coccinelle scripts (part 2)
Posted by no-reply@patchew.org 4 years ago
Patchew URL: https://patchew.org/QEMU/20200412224144.12205-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 ===

RAMBlock "sram A" already registered, abort!
Broken pipe
/tmp/qemu-test/src/tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped)
ERROR - too few tests run (expected 6, got 5)
make: *** [check-qtest-aarch64] Error 1
make: *** Waiting for unfinished jobs....
  TEST    iotest-qcow2: 154
  TEST    iotest-qcow2: 156
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=bbbb9d29b4e4477f9a3e0dfbe1bf69db', '-u', '1003', '--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/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-744vr6w6/src/docker-src.2020-04-12-21.16.30.9289:/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=bbbb9d29b4e4477f9a3e0dfbe1bf69db
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-744vr6w6/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    13m33.194s
user    0m9.060s


The full log is available at
http://patchew.org/logs/20200412224144.12205-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