qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object
@ 2020-10-11  7:34 Markus Armbruster
  2020-10-11  7:34 ` [PATCH v4 1/7] keyval: Fix and clarify grammar Markus Armbruster
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Markus Armbruster @ 2020-10-11  7:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, qemu-block

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(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-10-19  9:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11  7:34 [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object Markus Armbruster
2020-10-11  7:34 ` [PATCH v4 1/7] keyval: Fix and clarify grammar Markus Armbruster
2020-10-12 11:43   ` Eric Blake
2020-10-19  9:03     ` Markus Armbruster
2020-10-11  7:35 ` [PATCH v4 2/7] test-keyval: Demonstrate misparse of ', ' with implied key Markus Armbruster
2020-10-12 11:44   ` [PATCH v4 2/7] test-keyval: Demonstrate misparse of ',' " Eric Blake
2020-10-11  7:35 ` [PATCH v4 3/7] keyval: Fix parsing of ',' in value of " Markus Armbruster
2020-10-12 11:46   ` [PATCH v4 3/7] keyval: Fix parsing of ', ' " Eric Blake
2020-10-11  7:35 ` [PATCH v4 4/7] keyval: Parse help options Markus Armbruster
2020-10-12 11:51   ` Eric Blake
2020-10-19  9:06     ` Markus Armbruster
2020-10-12 14:35   ` Kevin Wolf
2020-10-19  9:04     ` Markus Armbruster
2020-10-11  7:35 ` [PATCH v4 5/7] qom: Factor out helpers from user_creatable_print_help() Markus Armbruster
2020-10-11  7:35 ` [PATCH v4 6/7] qom: Add user_creatable_print_help_from_qdict() Markus Armbruster
2020-10-11  7:35 ` [PATCH v4 7/7] qemu-storage-daemon: Remove QemuOpts from --object parser Markus Armbruster
2020-10-12 14:39 ` [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object Kevin Wolf
2020-10-19  9:08   ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).