Skip to content

qemu-storage-daemon: Remove QemuOpts from --object

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest7 patches 10 repliesIn review

Changes in v4 from the cover letter

- PATCH 1-3: New
- PATCH 4:
* Rebased
* Commit message typos [Eric]
* Replace flawed is_help_option_n() by starts_with_help_option()

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7keyval: Fix and clarify grammarutil/keyval.c+10 -62 replies
2/7test-keyval: Demonstrate misparse of ', ' with implied keytests/test-keyval.c+7 -01 reply
3/7keyval: Fix parsing of ',' in value of implied keytests/test-keyval.c util/keyval.c+20 -161 reply
4/7keyval: Parse help optionsinclude/qemu/help_option.h include/qemu/option.h qapi/qobject-input-visitor.c +3 more+186 -784 replies
5/7qom: Factor out helpers from user_creatable_print_help()qom/object_interfaces.c+52 -380 replies
6/7qom: Add user_creatable_print_help_from_qdict()include/qom/object_interfaces.h qom/object_interfaces.c+27 -30 replies
7/7qemu-storage-daemon: Remove QemuOpts from --object parserstorage-daemon/qemu-storage-daemon.c+4 -110 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchEric BlakeMarkus Armbruster
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b R-b
6/7R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object

This replaces the QemuOpts-based help code for --object in the storage daemon with code based on the keyval parser.

Review of v3 led me to preexisting issues. Instead of posting my fixes separately, then working with Kevin to rebase his work on top of mine, I did the rebase myself and am posting it together with my fixes as v4. Hope that's okay.

Note: to test qemu-storage-daemon --object help, you need Philippe's "[PATCH v3] hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE" and its prerequisites (first 10 patches of Paolo's "[PULL 00/39] SCSI, qdev, qtest, meson patches for 2020-10-10"), so it doesn't crash with "missing interface 'fw_cfg-data-generator' for object 'tls-creds'".

v4:
- PATCH 1-3: New
- PATCH 4:
* Rebased
* Commit message typos [Eric]
* Replace flawed is_help_option_n() by starts_with_help_option()

    [me]

* Update grammar and accompanying prose [me]
* Update keyval_parse_one()'s contract, tweak keyval_parse()'s [me]
* Revert the keyval_parse_one() change to a rebased version of v1, because it's simpler and the edge case that led to the more complicated version no longer exists [me].
* Rearrange tests so the simple cases come first
- PATCH 5-7: Unchanged

v3:
- Always parse help options, no matter if the caller implements help or not. If it doesn't, return an error. [Markus]
- Document changes to the keyval parser grammar [Markus]
- Support both 'help' and '?' [Eric]
- Test case fixes [Eric]
- Improved documentation of user_creatable_print_help(_from_qdict) [Markus]

v2:
- Fixed double comma by reusing the existing key and value parsers [Eric]
- More tests to cover the additional cases

Kevin Wolf (4):
keyval: Parse help options
qom: Factor out helpers from user_creatable_print_help()
qom: Add user_creatable_print_help_from_qdict()
qemu-storage-daemon: Remove QemuOpts from --object parser

Markus Armbruster (3):
keyval: Fix and clarify grammar
test-keyval: Demonstrate misparse of ',' with implied key
keyval: Fix parsing of ',' in value of implied key

 include/qemu/help_option.h           |  11 ++
 include/qemu/option.h                |   2 +-
 include/qom/object_interfaces.h      |  21 ++-
 qapi/qobject-input-visitor.c         |   2 +-
 qom/object_interfaces.c              |  99 ++++++++------
 storage-daemon/qemu-storage-daemon.c |  15 +--
 tests/test-keyval.c                  | 187 ++++++++++++++++++---------
 util/keyval.c                        | 103 +++++++++++----
 8 files changed, 297 insertions(+), 143 deletions(-)
Signature · 1 line
2.26.2