mbox series

[PULL,00/39] SCSI, qdev, qtest, meson patches for 2020-10-10

Message ID 20201010075739.951385-1-pbonzini@redhat.com
Headers show
Series SCSI, qdev, qtest, meson patches for 2020-10-10 | expand

Message

Paolo Bonzini Oct. 10, 2020, 7:57 a.m. UTC
The following changes since commit 4a7c0bd9dcb08798c6f82e55b5a3423f7ee669f1:

  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.2-20201009' into staging (2020-10-09 15:48:04 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 1340ff2adb2624e61c5fcb0eb1889b932b76f669:

  meson: identify more sections of meson.build (2020-10-09 13:19:50 -0400)

----------------------------------------------------------------
* qtest documentation improvements (Eduardo, myself)
* libqtest event buffering (Maxim)
* use RCU for list of children of a bus (Maxim)
* move more files to softmmu/ (myself)
* meson.build cleanups, qemu-storage-daemon fix (Philippe)

----------------------------------------------------------------
Eduardo Habkost (3):
      docs: Move QTest documentation to its own document
      docs/devel/qtest: Include protocol spec in document
      docs/devel/qtest: Include libqtest API reference

Huacai Chen (1):
      meson.build: Re-enable KVM support for MIPS

Marc-André Lureau (1):
      build-sys: fix git version from -version

Maxim Levitsky (11):
      qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
      qtest: Reintroduce qtest_qmp_receive
      qtest: remove qtest_qmp_receive_success
      qtest: switch users back to qtest_qmp_receive
      scsi/scsi_bus: switch search direction in scsi_device_find
      device_core: use drain_call_rcu in in qmp_device_add
      device-core: use RCU for list of children of a bus
      device-core: use atomic_set on .realized property
      scsi/scsi_bus: Add scsi_device_get
      virtio-scsi: use scsi_device_get
      scsi/scsi_bus: fix races in REPORT LUNS

Paolo Bonzini (13):
      softmmu: move more files to softmmu/
      exec: split out non-softmmu-specific parts
      qom: fix objects with improper parent type
      configure: fix performance regression due to PIC objects
      qtest: unify extra_qtest_srcs and extra_qtest_deps
      docs/devel: update instruction on how to add new unit tests
      device-plug-test: use qtest_qmp to send the device_del command
      qtest: check that drives are really appearing and disappearing
      qemu-iotests, qtest: rewrite test 067 as a qtest
      qdev: add "check if address free" callback for buses
      scsi: switch to bus->check_address
      scsi/scsi-bus: scsi_device_find: don't return unrealized devices
      meson: identify more sections of meson.build

Philippe Mathieu-Daudé (10):
      meson.build: Add comments to clarify code organization
      meson.build: Sort sourcesets alphabetically
      hw/core: Move the creation of the library to the main meson.build
      chardev: Move the creation of the library to the main meson.build
      migration: Move the creation of the library to the main meson.build
      io: Move the creation of the library to the main meson.build
      crypto: Move the creation of the library to the main meson.build
      authz: Move the creation of the library to the main meson.build
      qom: Move the creation of the library to the main meson.build
      hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE

 .gitlab-ci.yml                           |   2 +-
 MAINTAINERS                              |  16 +-
 authz/meson.build                        |  10 -
 chardev/meson.build                      |   6 -
 configure                                |   1 +
 cpu.c                                    | 452 ++++++++++++++++++++++++++++++
 crypto/meson.build                       |  10 -
 docs/devel/index.rst                     |   1 +
 docs/devel/qtest.rst                     |  84 ++++++
 docs/devel/testing.rst                   |  64 +----
 hw/core/bus.c                            |  28 +-
 hw/core/meson.build                      |   6 -
 hw/core/qdev.c                           |  73 +++--
 hw/net/virtio-net.c                      |   2 +-
 hw/nvram/fw_cfg-interface.c              |  23 ++
 hw/nvram/fw_cfg.c                        |   7 -
 hw/nvram/meson.build                     |   3 +
 hw/scsi/scsi-bus.c                       | 262 +++++++++++-------
 hw/scsi/virtio-scsi.c                    |  27 +-
 hw/sd/core.c                             |   3 +-
 include/exec/cpu-common.h                |   3 +
 include/hw/acpi/vmgenid.h                |   2 +-
 include/hw/misc/vmcoreinfo.h             |   2 +-
 include/hw/qdev-core.h                   |  24 +-
 include/hw/scsi/scsi.h                   |   1 +
 include/net/can_host.h                   |   2 +-
 io/meson.build                           |  10 -
 meson.build                              | 126 +++++++--
 migration/meson.build                    |   8 +-
 qom/meson.build                          |   8 -
 scripts/coccinelle/qom-parent-type.cocci |  26 ++
 scripts/qemu-version.sh                  |   2 +-
 bootdevice.c => softmmu/bootdevice.c     |   0
 device_tree.c => softmmu/device_tree.c   |   0
 dma-helpers.c => softmmu/dma-helpers.c   |   0
 softmmu/meson.build                      |  11 +
 exec.c => softmmu/physmem.c              | 454 +------------------------------
 qdev-monitor.c => softmmu/qdev-monitor.c |  12 +
 qemu-seccomp.c => softmmu/qemu-seccomp.c |   0
 softmmu/qtest.c                          |  71 ++++-
 tpm.c => softmmu/tpm.c                   |   0
 tests/qemu-iotests/067                   | 157 -----------
 tests/qemu-iotests/067.out               | 414 ----------------------------
 tests/qemu-iotests/group                 |   2 +-
 tests/qtest/device-plug-test.c           |  32 +--
 tests/qtest/drive_del-test.c             | 244 +++++++++++++++--
 tests/qtest/libqos/libqtest.h            |  54 ++--
 tests/qtest/libqtest.c                   | 110 ++++----
 tests/qtest/meson.build                  |  59 ++--
 tests/qtest/migration-helpers.c          |  25 +-
 tests/qtest/pvpanic-test.c               |   4 +-
 tests/qtest/qmp-test.c                   |  18 +-
 tests/qtest/tpm-util.c                   |   8 +-
 53 files changed, 1472 insertions(+), 1497 deletions(-)
 create mode 100644 cpu.c
 create mode 100644 docs/devel/qtest.rst
 create mode 100644 hw/nvram/fw_cfg-interface.c
 create mode 100644 scripts/coccinelle/qom-parent-type.cocci
 rename bootdevice.c => softmmu/bootdevice.c (100%)
 rename device_tree.c => softmmu/device_tree.c (100%)
 rename dma-helpers.c => softmmu/dma-helpers.c (100%)
 rename exec.c => softmmu/physmem.c (91%)
 rename qdev-monitor.c => softmmu/qdev-monitor.c (98%)
 rename qemu-seccomp.c => softmmu/qemu-seccomp.c (100%)
 rename tpm.c => softmmu/tpm.c (100%)
 delete mode 100755 tests/qemu-iotests/067
 delete mode 100644 tests/qemu-iotests/067.out

Comments

no-reply@patchew.org Oct. 10, 2020, 8:37 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20201010075739.951385-1-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201010075739.951385-1-pbonzini@redhat.com
Subject: [PULL 00/39] SCSI, qdev, qtest, meson patches for 2020-10-10

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/1602059975-10115-1-git-send-email-chenhc@lemote.com -> patchew/1602059975-10115-1-git-send-email-chenhc@lemote.com
 * [new tag]         patchew/20201010075739.951385-1-pbonzini@redhat.com -> patchew/20201010075739.951385-1-pbonzini@redhat.com
 * [new tag]         patchew/20201010080623.768-1-jiangyifei@huawei.com -> patchew/20201010080623.768-1-jiangyifei@huawei.com
Switched to a new branch 'test'
55f98d2 meson: identify more sections of meson.build
3f959b1 scsi/scsi_bus: fix races in REPORT LUNS
41c759b virtio-scsi: use scsi_device_get
17f4dca scsi/scsi_bus: Add scsi_device_get
eafe5c7 scsi/scsi-bus: scsi_device_find: don't return unrealized devices
c8ddbc5 device-core: use atomic_set on .realized property
07df212 scsi: switch to bus->check_address
a7baa24 device-core: use RCU for list of children of a bus
bbd9350 device_core: use drain_call_rcu in in qmp_device_add
7cafd84 scsi/scsi_bus: switch search direction in scsi_device_find
9ef1542 qdev: add "check if address free" callback for buses
1d6727d qemu-iotests, qtest: rewrite test 067 as a qtest
96b23e6 qtest: check that drives are really appearing and disappearing
a6d906c qtest: switch users back to qtest_qmp_receive
fcf3581 device-plug-test: use qtest_qmp to send the device_del command
3722046 qtest: remove qtest_qmp_receive_success
17077b6 qtest: Reintroduce qtest_qmp_receive
5b850fc qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
940c32f meson.build: Re-enable KVM support for MIPS
b4cd071 build-sys: fix git version from -version
e81db1e docs/devel: update instruction on how to add new unit tests
f187a57 qtest: unify extra_qtest_srcs and extra_qtest_deps
80c356b docs/devel/qtest: Include libqtest API reference
ef6b5cb docs/devel/qtest: Include protocol spec in document
7f82ce7 docs: Move QTest documentation to its own document
d5fddc0 configure: fix performance regression due to PIC objects
70cd0b9 qom: fix objects with improper parent type
a63dc48 exec: split out non-softmmu-specific parts
6a633f6 softmmu: move more files to softmmu/
32c750b hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE
85a528c qom: Move the creation of the library to the main meson.build
6d611b1 authz: Move the creation of the library to the main meson.build
d597f26 crypto: Move the creation of the library to the main meson.build
d44bc2e io: Move the creation of the library to the main meson.build
6f014b0 migration: Move the creation of the library to the main meson.build
9d197f1 chardev: Move the creation of the library to the main meson.build
8b9a449 hw/core: Move the creation of the library to the main meson.build
245f27b meson.build: Sort sourcesets alphabetically
cbc9573 meson.build: Add comments to clarify code organization

=== OUTPUT BEGIN ===
1/39 Checking commit cbc957397c02 (meson.build: Add comments to clarify code organization)
2/39 Checking commit 245f27b24fa7 (meson.build: Sort sourcesets alphabetically)
3/39 Checking commit 8b9a44915aa8 (hw/core: Move the creation of the library to the main meson.build)
4/39 Checking commit 9d197f154484 (chardev: Move the creation of the library to the main meson.build)
5/39 Checking commit 6f014b047dde (migration: Move the creation of the library to the main meson.build)
6/39 Checking commit d44bc2e97f1c (io: Move the creation of the library to the main meson.build)
7/39 Checking commit d597f26a6c94 (crypto: Move the creation of the library to the main meson.build)
8/39 Checking commit 6d611b137d38 (authz: Move the creation of the library to the main meson.build)
9/39 Checking commit 85a528c294eb (qom: Move the creation of the library to the main meson.build)
10/39 Checking commit 32c750b90a9c (hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#52: 
new file mode 100644

total: 0 errors, 1 warnings, 55 lines checked

Patch 10/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/39 Checking commit 6a633f68ddd7 (softmmu: move more files to softmmu/)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#85: 
rename from bootdevice.c

total: 0 errors, 1 warnings, 69 lines checked

Patch 11/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
12/39 Checking commit a63dc48247ea (exec: split out non-softmmu-specific parts)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#52: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#104: FILE: cpu.c:48:
+    /* 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the

WARNING: Block comments use * on subsequent lines
#105: FILE: cpu.c:49:
+    /* 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the
+       version_id is increased. */

WARNING: Block comments use a trailing */ on a separate line
#105: FILE: cpu.c:49:
+       version_id is increased. */

WARNING: Block comments use a leading /* on a separate line
#109: FILE: cpu.c:53:
+    /* loadvm has just updated the content of RAM, bypassing the

ERROR: spaces required around that '*' (ctx:VxV)
#175: FILE: cpu.c:119:
+    .subsections = (const VMStateDescription*[]) {
                                             ^

WARNING: Block comments use a leading /* on a separate line
#205: FILE: cpu.c:149:
+    /* Create a memory property for softmmu CPU object,

WARNING: Block comments use a leading /* on a separate line
#393: FILE: cpu.c:337:
+/* enable or disable single step mode. EXCP_DEBUG is returned by the

WARNING: Block comments use * on subsequent lines
#394: FILE: cpu.c:338:
+/* enable or disable single step mode. EXCP_DEBUG is returned by the
+   CPU loop after each instruction */

WARNING: Block comments use a trailing */ on a separate line
#394: FILE: cpu.c:338:
+   CPU loop after each instruction */

ERROR: "foo * bar" should be "foo *bar"
#452: FILE: cpu.c:396:
+    void * p;

ERROR: braces {} are necessary for all arms of this statement
#458: FILE: cpu.c:402:
+        if (l > len)
[...]

ERROR: braces {} are necessary for all arms of this statement
#461: FILE: cpu.c:405:
+        if (!(flags & PAGE_VALID))
[...]

ERROR: braces {} are necessary for all arms of this statement
#464: FILE: cpu.c:408:
+            if (!(flags & PAGE_WRITE))
[...]

ERROR: do not use assignment in if condition
#467: FILE: cpu.c:411:
+            if (!(p = lock_user(VERIFY_WRITE, addr, l, 0)))

ERROR: braces {} are necessary for all arms of this statement
#467: FILE: cpu.c:411:
+            if (!(p = lock_user(VERIFY_WRITE, addr, l, 0)))
[...]

ERROR: braces {} are necessary for all arms of this statement
#472: FILE: cpu.c:416:
+            if (!(flags & PAGE_READ))
[...]

ERROR: do not use assignment in if condition
#475: FILE: cpu.c:419:
+            if (!(p = lock_user(VERIFY_READ, addr, l, 1)))

ERROR: braces {} are necessary for all arms of this statement
#475: FILE: cpu.c:419:
+            if (!(p = lock_user(VERIFY_READ, addr, l, 1)))
[...]

WARNING: Block comments use a leading /* on a separate line
#499: FILE: cpu.c:443:
+    /* NOTE: we can always suppose that qemu_host_page_size >=

WARNING: Block comments use * on subsequent lines
#500: FILE: cpu.c:444:
+    /* NOTE: we can always suppose that qemu_host_page_size >=
+       TARGET_PAGE_SIZE */

WARNING: Block comments use a trailing */ on a separate line
#500: FILE: cpu.c:444:
+       TARGET_PAGE_SIZE */

total: 10 errors, 12 warnings, 1061 lines checked

Patch 12/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

13/39 Checking commit 70cd0b9ec467 (qom: fix objects with improper parent type)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

total: 0 errors, 1 warnings, 57 lines checked

Patch 13/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
14/39 Checking commit d5fddc0cba63 (configure: fix performance regression due to PIC objects)
15/39 Checking commit 7f82ce732ca7 (docs: Move QTest documentation to its own document)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#31: 
new file mode 100644

total: 0 errors, 1 warnings, 124 lines checked

Patch 15/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/39 Checking commit ef6b5cbd233f (docs/devel/qtest: Include protocol spec in document)
17/39 Checking commit 80c356b3fbc1 (docs/devel/qtest: Include libqtest API reference)
18/39 Checking commit f187a576c59c (qtest: unify extra_qtest_srcs and extra_qtest_deps)
19/39 Checking commit e81db1ec6da4 (docs/devel: update instruction on how to add new unit tests)
20/39 Checking commit b4cd071db805 (build-sys: fix git version from -version)
21/39 Checking commit 940c32fa7664 (meson.build: Re-enable KVM support for MIPS)
22/39 Checking commit 5b850fc17469 (qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict)
23/39 Checking commit 17077b686545 (qtest: Reintroduce qtest_qmp_receive)
24/39 Checking commit 372204626c2a (qtest: remove qtest_qmp_receive_success)
25/39 Checking commit fcf3581e19b2 (device-plug-test: use qtest_qmp to send the device_del command)
WARNING: line over 80 characters
#33: FILE: tests/qtest/device-plug-test.c:23:
+                     "{'execute': 'device_del', 'arguments': { 'id': %s } }", id);

total: 0 errors, 1 warnings, 76 lines checked

Patch 25/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
26/39 Checking commit a6d906ce8819 (qtest: switch users back to qtest_qmp_receive)
27/39 Checking commit 96b23e6b9397 (qtest: check that drives are really appearing and disappearing)
28/39 Checking commit 1d6727dc791e (qemu-iotests, qtest: rewrite test 067 as a qtest)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#46: 
deleted file mode 100755

WARNING: line over 80 characters
#650: FILE: tests/qtest/drive_del-test.c:19:
+static bool look_for_drive0(QTestState *qts, const char *command, const char *key)

total: 0 errors, 2 warnings, 309 lines checked

Patch 28/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
29/39 Checking commit 9ef154286ce3 (qdev: add "check if address free" callback for buses)
30/39 Checking commit 7cafd8471e6a (scsi/scsi_bus: switch search direction in scsi_device_find)
31/39 Checking commit bbd93507e2d4 (device_core: use drain_call_rcu in in qmp_device_add)
32/39 Checking commit a7baa24616a2 (device-core: use RCU for list of children of a bus)
33/39 Checking commit 07df2121d569 (scsi: switch to bus->check_address)
ERROR: code indent should never use tabs
#55: FILE: hw/scsi/scsi-bus.c:137:
+^I^I^I^I     int channel, int target, int lun,$

ERROR: code indent should never use tabs
#56: FILE: hw/scsi/scsi-bus.c:138:
+^I^I^I^I     SCSIDevice **p_dev)$

WARNING: line over 80 characters
#71: FILE: hw/scsi/scsi-bus.c:153:
+static bool scsi_bus_check_address(BusState *qbus, DeviceState *qdev, Error **errp)

WARNING: line over 80 characters
#91: FILE: hw/scsi/scsi-bus.c:173:
+        if (!scsi_bus_is_address_free(bus, dev->channel, dev->id, dev->lun, &d)) {

WARNING: line over 80 characters
#130: FILE: hw/scsi/scsi-bus.c:195:
+            is_free = scsi_bus_is_address_free(bus, dev->channel, ++id, dev->lun, NULL);

WARNING: line over 80 characters
#143: FILE: hw/scsi/scsi-bus.c:205:
+            is_free = scsi_bus_is_address_free(bus, dev->channel, dev->id, ++lun, NULL);

total: 2 errors, 4 warnings, 182 lines checked

Patch 33/39 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

34/39 Checking commit c8ddbc5cad10 (device-core: use atomic_set on .realized property)
35/39 Checking commit eafe5c7675d0 (scsi/scsi-bus: scsi_device_find: don't return unrealized devices)
36/39 Checking commit 17f4dca5c0be (scsi/scsi_bus: Add scsi_device_get)
37/39 Checking commit 41c759b9e570 (virtio-scsi: use scsi_device_get)
38/39 Checking commit 3f959b1165c9 (scsi/scsi_bus: fix races in REPORT LUNS)
39/39 Checking commit 55f98d22596c (meson: identify more sections of meson.build)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201010075739.951385-1-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Peter Maydell Oct. 12, 2020, 10:29 a.m. UTC | #2
On Sat, 10 Oct 2020 at 08:59, Paolo Bonzini <pbonzini@redhat.com> wrote:
>

> The following changes since commit 4a7c0bd9dcb08798c6f82e55b5a3423f7ee669f1:

>

>   Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.2-20201009' into staging (2020-10-09 15:48:04 +0100)

>

> are available in the Git repository at:

>

>   https://gitlab.com/bonzini/qemu.git tags/for-upstream

>

> for you to fetch changes up to 1340ff2adb2624e61c5fcb0eb1889b932b76f669:

>

>   meson: identify more sections of meson.build (2020-10-09 13:19:50 -0400)

>

> ----------------------------------------------------------------

> * qtest documentation improvements (Eduardo, myself)

> * libqtest event buffering (Maxim)

> * use RCU for list of children of a bus (Maxim)

> * move more files to softmmu/ (myself)

> * meson.build cleanups, qemu-storage-daemon fix (Philippe)

>


This produces a new warning, I think from Sphinx:

Running Sphinx v1.6.7
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: 1 added, 2 changed, 0 removed
reading sources... [ 33%] index
reading sources... [ 66%] qtest
reading sources... [100%] testing

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 33%] index
writing output... [ 66%] qtest
writing output... [100%] testing

generating indices... genindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded.
/home/petmay01/linaro/qemu-for-merges/docs/../tests/qtest/libqos/libqtest.h:241:
warning: Function parameter or member 'event' not described in
'qtest_qmp_event_ref'
make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/all'
make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/all'
[build continues and succeeds]

Not sure why it isn't fatal.

thanks
-- PMM
Paolo Bonzini Oct. 12, 2020, 1:42 p.m. UTC | #3
On 12/10/20 12:29, Peter Maydell wrote:
> warning: Function parameter or member 'event' not described in

> 'qtest_qmp_event_ref'

> make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/all'

> make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/all'

> [build continues and succeeds]

> 

> Not sure why it isn't fatal.


I'll fix and resend anyway.

Paolo