qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org
Subject: [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object
Date: Sun, 11 Oct 2020 09:34:58 +0200	[thread overview]
Message-ID: <20201011073505.1185335-1-armbru@redhat.com> (raw)

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



             reply	other threads:[~2020-10-11  7:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11  7:34 Markus Armbruster [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201011073505.1185335-1-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).