[PULL 00/32] Miscellaneous patches for 2020-04-29

Markus Armbruster posted 32 patches 4 years ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch failed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200429072048.29963-1-armbru@redhat.com
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Peter Maydell <peter.maydell@linaro.org>, Hailiang Zhang <zhang.zhanghailiang@huawei.com>, BALATON Zoltan <balaton@eik.bme.hu>, Michael Roth <mdroth@linux.vnet.ibm.com>, Gerd Hoffmann <kraxel@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, Stefan Hajnoczi <stefanha@redhat.com>, Markus Armbruster <armbru@redhat.com>, Juan Quintela <quintela@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Wen Congyang <wencongyang2@huawei.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Fam Zheng <fam@euphon.net>, Max Reitz <mreitz@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Stefano Stabellini <sstabellini@kernel.org>, Kevin Wolf <kwolf@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>, Richard Henderson <rth@twiddle.net>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, John Snow <jsnow@redhat.com>, Bandan Das <bsd@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Xie Changlong <xiechanglong.d@gmail.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Jeff Cody <codyprime@gmail.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Thomas Huth <thuth@redhat.com>, Paul Durrant <paul@xen.org>, Laurent Vivier <lvivier@redhat.com>, Corey Minyard <cminyard@mvista.com>, Jason Wang <jasowang@redhat.com>
Makefile                          |   1 -
include/hw/i2c/smbus_eeprom.h     |   2 +-
include/qemu/option.h             |   1 -
tests/qtest/libqos/qos_external.h |  10 +-
backends/cryptodev-builtin.c      |  10 +-
block/file-posix.c                |   5 +-
block/replication.c               |   4 +-
block/vhdx.c                      |   8 +-
cpus.c                            |  52 ++++++----
dump/dump.c                       |   2 +-
hw/arm/virt.c                     |   4 +-
hw/block/fdc.c                    |   1 +
hw/display/bochs-display.c        |   6 +-
hw/i2c/smbus_eeprom.c             |  32 +-----
hw/mips/mips_fulong2e.c           |  10 +-
hw/net/virtio-net.c               |   7 +-
hw/ppc/ppc4xx_devs.c              |   8 +-
hw/ppc/sam460ex.c                 |  13 +--
hw/riscv/sifive_u.c               |   2 +-
hw/scsi/scsi-disk.c               |   2 +-
hw/sd/sdhci.c                     |   2 +-
hw/xen/xen_pt.c                   |  12 +--
io/channel-socket.c               |   5 +-
migration/colo.c                  |   8 +-
qemu-img.c                        |  87 +++++++++-------
qga/commands-posix.c              |   3 +
qga/commands-win32.c              |  14 +++
softmmu/vl.c                      |  10 +-
target/i386/cpu.c                 |  18 ++--
target/microblaze/cpu.c           |  14 +--
target/ppc/translate_init.inc.c   |   4 +-
tests/qtest/fuzz/qos_fuzz.c       |  34 ++----
tests/qtest/libqos/qos_external.c |  72 +++++--------
tests/qtest/qos-test.c            |  29 ++++--
tests/test-logging.c              |   4 +-
tests/test-qemu-opts.c            |  46 ++++++++-
util/qemu-option.c                | 210 +++++++++++++++++++-------------------
37 files changed, 391 insertions(+), 361 deletions(-)
[PULL 00/32] Miscellaneous patches for 2020-04-29
Posted by Markus Armbruster 4 years ago
The following changes since commit fdd76fecdde1ad444ff4deb7f1c4f7e4a1ef97d6:

  Update version for v5.0.0 release (2020-04-28 17:46:57 +0100)

are available in the Git repository at:

  git://repo.or.cz/qemu/armbru.git tags/pull-misc-2020-04-29

for you to fetch changes up to 8ef3a4be27efccd791d05e74b7b17d918f511a76:

  qemu-option: pass NULL rather than 0 to the id of qemu_opts_set() (2020-04-29 08:01:52 +0200)

----------------------------------------------------------------
Miscellaneous patches for 2020-04-29

* Fix CLI option parsing corner cases
* Fix bugs on (unlikely) error paths
* Fix undefined behavior for silly option arguments
* Tidy up bamboo and sam460ex reporting of funny memory sizes
* Clean up error API violations
* A bit of refactoring here and there

----------------------------------------------------------------
Markus Armbruster (30):
      tests-qemu-opts: Cover has_help_option(), qemu_opt_has_help_opt()
      qemu-options: Factor out get_opt_name_value() helper
      qemu-option: Fix sloppy recognition of "id=..." after ",,"
      qemu-option: Fix has_help_option()'s sloppy parsing
      test-qemu-opts: Simplify test_has_help_option() after bug fix
      qemu-option: Avoid has_help_option() in qemu_opts_parse_noisily()
      qemu-img: Factor out accumulate_options() helper
      qemu-img: Move is_valid_option_list() to qemu-img.c and rewrite
      qemu-img: Reject broken -o ""
      cryptodev: Fix cryptodev_builtin_cleanup() error API violation
      block/file-posix: Fix check_cache_dropped() error handling
      cpus: Fix configure_icount() error API violation
      cpus: Proper range-checking for -icount shift=N
      arm/virt: Fix virt_machine_device_plug_cb() error API violation
      fdc: Fix fallback=auto error handling
      bochs-display: Fix vgamem=SIZE error handling
      virtio-net: Fix duplex=... and speed=... error handling
      xen/pt: Fix flawed conversion to realize()
      io: Fix qio_channel_socket_close() error handling
      migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling
      tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff
      qga: Fix qmp_guest_get_memory_blocks() error handling
      qga: Fix qmp_guest_suspend_{disk, ram}() error handling
      sam460ex: Suppress useless warning on -m 32 and -m 64
      smbus: Fix spd_data_generate() error API violation
      bamboo, sam460ex: Tidy up error message for unsupported RAM size
      smbus: Fix spd_data_generate() for number of banks > 2
      Makefile: Drop unused, broken target recurse-fuzz
      fuzz: Simplify how we compute available machines and types
      libqos: Give get_machine_allocator() internal linkage

Masahiro Yamada (1):
      qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()

Philippe Mathieu-Daudé (1):
      various: Remove suspicious '\' character outside of #define in C code

 Makefile                          |   1 -
 include/hw/i2c/smbus_eeprom.h     |   2 +-
 include/qemu/option.h             |   1 -
 tests/qtest/libqos/qos_external.h |  10 +-
 backends/cryptodev-builtin.c      |  10 +-
 block/file-posix.c                |   5 +-
 block/replication.c               |   4 +-
 block/vhdx.c                      |   8 +-
 cpus.c                            |  52 ++++++----
 dump/dump.c                       |   2 +-
 hw/arm/virt.c                     |   4 +-
 hw/block/fdc.c                    |   1 +
 hw/display/bochs-display.c        |   6 +-
 hw/i2c/smbus_eeprom.c             |  32 +-----
 hw/mips/mips_fulong2e.c           |  10 +-
 hw/net/virtio-net.c               |   7 +-
 hw/ppc/ppc4xx_devs.c              |   8 +-
 hw/ppc/sam460ex.c                 |  13 +--
 hw/riscv/sifive_u.c               |   2 +-
 hw/scsi/scsi-disk.c               |   2 +-
 hw/sd/sdhci.c                     |   2 +-
 hw/xen/xen_pt.c                   |  12 +--
 io/channel-socket.c               |   5 +-
 migration/colo.c                  |   8 +-
 qemu-img.c                        |  87 +++++++++-------
 qga/commands-posix.c              |   3 +
 qga/commands-win32.c              |  14 +++
 softmmu/vl.c                      |  10 +-
 target/i386/cpu.c                 |  18 ++--
 target/microblaze/cpu.c           |  14 +--
 target/ppc/translate_init.inc.c   |   4 +-
 tests/qtest/fuzz/qos_fuzz.c       |  34 ++----
 tests/qtest/libqos/qos_external.c |  72 +++++--------
 tests/qtest/qos-test.c            |  29 ++++--
 tests/test-logging.c              |   4 +-
 tests/test-qemu-opts.c            |  46 ++++++++-
 util/qemu-option.c                | 210 +++++++++++++++++++-------------------
 37 files changed, 391 insertions(+), 361 deletions(-)

-- 
2.21.1


Re: [PULL 00/32] Miscellaneous patches for 2020-04-29
Posted by Peter Maydell 4 years ago
On Wed, 29 Apr 2020 at 08:23, Markus Armbruster <armbru@redhat.com> wrote:
>
> The following changes since commit fdd76fecdde1ad444ff4deb7f1c4f7e4a1ef97d6:
>
>   Update version for v5.0.0 release (2020-04-28 17:46:57 +0100)
>
> are available in the Git repository at:
>
>   git://repo.or.cz/qemu/armbru.git tags/pull-misc-2020-04-29
>
> for you to fetch changes up to 8ef3a4be27efccd791d05e74b7b17d918f511a76:
>
>   qemu-option: pass NULL rather than 0 to the id of qemu_opts_set() (2020-04-29 08:01:52 +0200)
>
> ----------------------------------------------------------------
> Miscellaneous patches for 2020-04-29
>
> * Fix CLI option parsing corner cases
> * Fix bugs on (unlikely) error paths
> * Fix undefined behavior for silly option arguments
> * Tidy up bamboo and sam460ex reporting of funny memory sizes
> * Clean up error API violations
> * A bit of refactoring here and there


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM

Re: [PULL 00/32] Miscellaneous patches for 2020-04-29
Posted by no-reply@patchew.org 4 years ago
Patchew URL: https://patchew.org/QEMU/20200429072048.29963-1-armbru@redhat.com/



Hi,

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

Message-id: 20200429072048.29963-1-armbru@redhat.com
Subject: [PULL 00/32] Miscellaneous patches for 2020-04-29
Type: series

=== 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 ===

Switched to a new branch 'test'
bbf2736 qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()
3736e38 libqos: Give get_machine_allocator() internal linkage
40a5fe7 fuzz: Simplify how we compute available machines and types
08bd8b8 Makefile: Drop unused, broken target recurse-fuzz
96b5543 smbus: Fix spd_data_generate() for number of banks > 2
a2b3bfe bamboo, sam460ex: Tidy up error message for unsupported RAM size
8cc9661 smbus: Fix spd_data_generate() error API violation
c6b2e22 sam460ex: Suppress useless warning on -m 32 and -m 64
8676301 qga: Fix qmp_guest_suspend_{disk, ram}() error handling
f2ba556 qga: Fix qmp_guest_get_memory_blocks() error handling
1e52928 tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff
42be747 migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling
69a4ebd io: Fix qio_channel_socket_close() error handling
21ca33c xen/pt: Fix flawed conversion to realize()
0397c8f virtio-net: Fix duplex=... and speed=... error handling
c849702 bochs-display: Fix vgamem=SIZE error handling
4734313 fdc: Fix fallback=auto error handling
d40f549 arm/virt: Fix virt_machine_device_plug_cb() error API violation
669233d cpus: Proper range-checking for -icount shift=N
33e02df cpus: Fix configure_icount() error API violation
5e67774 block/file-posix: Fix check_cache_dropped() error handling
670e190 cryptodev: Fix cryptodev_builtin_cleanup() error API violation
3e5b9b0 qemu-img: Reject broken -o ""
f08bae7 qemu-img: Move is_valid_option_list() to qemu-img.c and rewrite
536796f qemu-img: Factor out accumulate_options() helper
eb08b54 qemu-option: Avoid has_help_option() in qemu_opts_parse_noisily()
f866f2c test-qemu-opts: Simplify test_has_help_option() after bug fix
42681dc qemu-option: Fix has_help_option()'s sloppy parsing
4cf9436 qemu-option: Fix sloppy recognition of "id=..." after ", , "
9b629d5 qemu-options: Factor out get_opt_name_value() helper
a85727e tests-qemu-opts: Cover has_help_option(), qemu_opt_has_help_opt()
fc0770d various: Remove suspicious '\' character outside of #define in C code

=== OUTPUT BEGIN ===
1/32 Checking commit fc0770db08c1 (various: Remove suspicious '\' character outside of #define in C code)
2/32 Checking commit a85727e34525 (tests-qemu-opts: Cover has_help_option(), qemu_opt_has_help_opt())
WARNING: Block comments use a leading /* on a separate line
#44: FILE: tests/test-qemu-opts.c:752:
+        { "a,b,,help", false /* BUG */, true, true },

WARNING: Block comments use a leading /* on a separate line
#45: FILE: tests/test-qemu-opts.c:753:
+        { "a,b,,?", false /* BUG */, true, true },

total: 0 errors, 2 warnings, 56 lines checked

Patch 2/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/32 Checking commit 9b629d54ce8a (qemu-options: Factor out get_opt_name_value() helper)
4/32 Checking commit 4cf9436358f5 (qemu-option: Fix sloppy recognition of "id=..." after ", , ")
5/32 Checking commit 42681dc0fb50 (qemu-option: Fix has_help_option()'s sloppy parsing)
6/32 Checking commit f866f2c224ff (test-qemu-opts: Simplify test_has_help_option() after bug fix)
7/32 Checking commit eb08b546645f (qemu-option: Avoid has_help_option() in qemu_opts_parse_noisily())
8/32 Checking commit 536796f458ef (qemu-img: Factor out accumulate_options() helper)
9/32 Checking commit f08bae71a126 (qemu-img: Move is_valid_option_list() to qemu-img.c and rewrite)
ERROR: suspect code indent for conditional statements (4, 4)
#63: FILE: qemu-img.c:243:
+    for (i = len; i > 0 && optarg[i - 1] == ','; i--) {
+    }

total: 1 errors, 0 warnings, 67 lines checked

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

10/32 Checking commit 3e5b9b0b2c62 (qemu-img: Reject broken -o "")
ERROR: trailing whitespace
#51: FILE: qemu-img.c:234:
+ * $

total: 1 errors, 0 warnings, 18 lines checked

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

11/32 Checking commit 670e190178ba (cryptodev: Fix cryptodev_builtin_cleanup() error API violation)
12/32 Checking commit 5e677748f96e (block/file-posix: Fix check_cache_dropped() error handling)
13/32 Checking commit 33e02df34d16 (cpus: Fix configure_icount() error API violation)
ERROR: consider using qemu_strtol in preference to strtol
#59: FILE: cpus.c:818:
+        time_shift = strtol(option, &rem_str, 0);

total: 1 errors, 0 warnings, 70 lines checked

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

14/32 Checking commit 669233d94449 (cpus: Proper range-checking for -icount shift=N)
15/32 Checking commit d40f549786cd (arm/virt: Fix virt_machine_device_plug_cb() error API violation)
16/32 Checking commit 473431395c4a (fdc: Fix fallback=auto error handling)
17/32 Checking commit c849702a667f (bochs-display: Fix vgamem=SIZE error handling)
18/32 Checking commit 0397c8fa48c7 (virtio-net: Fix duplex=... and speed=... error handling)
19/32 Checking commit 21ca33c29fec (xen/pt: Fix flawed conversion to realize())
20/32 Checking commit 69a4ebdcc79c (io: Fix qio_channel_socket_close() error handling)
21/32 Checking commit 42be7477a307 (migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling)
22/32 Checking commit 1e5292888756 (tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff)
23/32 Checking commit f2ba556c242f (qga: Fix qmp_guest_get_memory_blocks() error handling)
24/32 Checking commit 867630155baf (qga: Fix qmp_guest_suspend_{disk, ram}() error handling)
25/32 Checking commit c6b2e225677b (sam460ex: Suppress useless warning on -m 32 and -m 64)
26/32 Checking commit 8cc9661b4025 (smbus: Fix spd_data_generate() error API violation)
27/32 Checking commit a2b3bfe4b4cf (bamboo, sam460ex: Tidy up error message for unsupported RAM size)
ERROR: unnecessary whitespace before a quoted newline
#40: FILE: hw/ppc/ppc4xx_devs.c:723:
+        error_printf("Possible valid RAM size: %" PRIi64 " MiB \n",

total: 1 errors, 0 warnings, 15 lines checked

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

28/32 Checking commit 96b55431cda5 (smbus: Fix spd_data_generate() for number of banks > 2)
29/32 Checking commit 08bd8b81657a (Makefile: Drop unused, broken target recurse-fuzz)
30/32 Checking commit 40a5fe78ba42 (fuzz: Simplify how we compute available machines and types)
31/32 Checking commit 3736e38b637e (libqos: Give get_machine_allocator() internal linkage)
32/32 Checking commit bbf27368e6dd (qemu-option: pass NULL rather than 0 to the id of qemu_opts_set())
WARNING: line over 80 characters
#48: FILE: softmmu/vl.c:3185:
+                qemu_opts_set(qemu_find_opts("machine"), NULL, "firmware", optarg,

total: 0 errors, 1 warnings, 31 lines checked

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

Test command exited with code: 1


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