From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, marcandre.lureau@redhat.com,
eblake@redhat.com
Subject: [Qemu-devel] [RFC PATCH 00/32] Command line QAPIfication
Date: Mon, 2 Oct 2017 17:25:20 +0200 [thread overview]
Message-ID: <20171002152552.27999-1-armbru@redhat.com> (raw)
This is a prototype to demonstrate where I'm headed. PATCH 01-28 are
infrastructure, PATCH 29-32 QAPIfy a few options.
Plenty of infrastrucure work remains. Some of it is marked TODO/FIXME
in the patches. I've excluded work to improve backward keyval.c
compatibility with QemuOpts quirks for now.
Command line introspection is provided by query-qmp-schema for now.
Perhaps it should be separate. See PATCH 25.
Documentation is generated into qemu-qmp-ref.*. Perhaps it should be
separate. See PATCH 26.
main() iterates over argv[] twice. The second loop "executes" some
options directly. PATCH 29+30 QAPIfy two of them. Other options it
converts into a more convenient form, for later execution. PATCH
31+32 QAPIfy two of them: the conversion becomes a no-op, because
QAPIfication already produces a convenient data type.
"Later execution" means the command line is executed in some magic
order mortal users can't predict. Strict left-to-right would be
simpler and cleaner, but backward compatibility may compel us to
remain complicated and unclean.
qemu-img already duplicates --option. I suspect we'll end up wanting
to QAPIfy that as well, sharing the common part of the QAPI schema.
Based-on: 20171002111111.26932-1-armbru@redhat.com
[PULL 0/3] QAPI patches for 2017-10-02
Based-on: 20171002134538.23332-1-armbru@redhat.com
[PATCH 0/3] hmp-commands-info: Texinfo fixes
Based-on: 20171002140307.5292-1-armbru@redhat.com
[PATCH 0/8] qemu-options: Texinfo and --help fixes
Based-on: 20171002141341.24616-1-armbru@redhat.com
[PATCH 00/11] qapi: Cleanups around qapi2texi
Markus Armbruster (32):
tests/qapi-schema: Improve coverage of '@'
texi2pod: Support @verbatim environment
qapi2texi: Fix for examples containing '@'
qapi2texi: Fix for '@' not followed by \w character
qapi2texi: Provide access to Texinfo markup
qapi2texi: Drop | example markup
qapi: Drop superfluous allow_optional=True
qapi: Simplify check_name() parameters
qapi: check_type() parameter allow_optional is now unused, drop
qapi: Don't run generators twice
qapi: Drop the options to generate only .c or .h
qapi: Use argparse to parse command line arguments
qapi: Use argparse to open schema file
qapi: Rework generated code for built-in types
tests/qapi-schema: Improve simple union coverage
qapi: Factor out _make_implicit_wrapper_type()
qapi: Fix simple union lowering with multiple schemas
docs/devel/qapi-code-gen.txt: Rewrite section on schema syntax
qapi: Accept double-quoted strings
qapi: Frontend for defining command line options
qapi: Define QAPIOptionKind and QAPIOption automatically
qapi: New helper c_string()
qapi-options: Command line option backend
qapi-options: Generate help string
qapi-introspect: Include command line options information
qapi2texi: Include command line options information
os-posix: Drop misleading comment
vl: QAPIfy command line option definition
qapi/options: QAPIfy --echr argument type
qapi/options: QAPIfy --watchdog-action argument type
qapi/options: QAPIfy --blockdev argument type
qapi/options: QAPIfy --add-fd argument type
.gitignore | 4 +-
Makefile | 101 +-
Makefile.objs | 4 +-
docs/devel/qapi-code-gen.txt | 83 +-
include/qemu-common.h | 2 +-
os-posix.c | 27 +-
os-win32.c | 3 +-
qapi-schema.json | 9 +-
qapi/introspect.json | 22 +-
qapi/options.json | 4574 ++++++++++++++++++++++++++++++
qemu-doc.texi | 4 +-
qemu-options-wrapper.h | 41 -
qemu-options.h | 36 -
qemu-options.hx | 4256 ---------------------------
qga/Makefile.objs | 1 +
scripts/qapi-commands.py | 13 +-
scripts/qapi-event.py | 12 +-
scripts/qapi-introspect.py | 44 +-
scripts/qapi-options.py | 212 ++
scripts/qapi-types.py | 78 +-
scripts/qapi-visit.py | 74 +-
scripts/qapi.py | 350 ++-
scripts/qapi2texi.py | 88 +-
scripts/texi2pod.pl | 11 +-
tests/Makefile.include | 56 +-
tests/qapi-schema/builtins.err | 0
tests/qapi-schema/builtins.exit | 1 +
tests/qapi-schema/builtins.json | 1 +
tests/qapi-schema/builtins.out | 33 +
tests/qapi-schema/comments.out | 3 -
tests/qapi-schema/doc-bad-section.out | 3 -
tests/qapi-schema/doc-good.json | 46 +-
tests/qapi-schema/doc-good.out | 70 +-
tests/qapi-schema/doc-good.texi | 82 +-
tests/qapi-schema/empty.out | 3 -
tests/qapi-schema/event-case.out | 3 -
tests/qapi-schema/ident-with-escape.out | 3 -
tests/qapi-schema/include-relpath.out | 3 -
tests/qapi-schema/include-repetition.out | 3 -
tests/qapi-schema/include-simple.out | 3 -
tests/qapi-schema/indented-expr.out | 3 -
tests/qapi-schema/qapi-schema-test.json | 26 +-
tests/qapi-schema/qapi-schema-test.out | 64 +-
tests/qapi-schema/test-qapi.py | 22 +-
tests/test-qapi-options.c | 74 +
vl.c | 809 +++---
46 files changed, 6151 insertions(+), 5209 deletions(-)
create mode 100644 qapi/options.json
delete mode 100644 qemu-options-wrapper.h
delete mode 100644 qemu-options.h
delete mode 100644 qemu-options.hx
create mode 100644 scripts/qapi-options.py
create mode 100644 tests/qapi-schema/builtins.err
create mode 100644 tests/qapi-schema/builtins.exit
create mode 100644 tests/qapi-schema/builtins.json
create mode 100644 tests/qapi-schema/builtins.out
create mode 100644 tests/test-qapi-options.c
--
2.13.6
next reply other threads:[~2017-10-02 15:26 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 15:25 Markus Armbruster [this message]
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 01/32] tests/qapi-schema: Improve coverage of '@' Markus Armbruster
2017-10-04 10:37 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 02/32] texi2pod: Support @verbatim environment Markus Armbruster
2017-10-05 14:58 ` Eric Blake
2017-10-06 5:24 ` Markus Armbruster
2017-10-06 13:40 ` Eric Blake
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 03/32] qapi2texi: Fix for examples containing '@' Markus Armbruster
2017-10-04 10:45 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 04/32] qapi2texi: Fix for '@' not followed by \w character Markus Armbruster
2017-10-04 10:47 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 05/32] qapi2texi: Provide access to Texinfo markup Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 06/32] qapi2texi: Drop | example markup Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 07/32] qapi: Drop superfluous allow_optional=True Markus Armbruster
2017-10-04 10:52 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 08/32] qapi: Simplify check_name() parameters Markus Armbruster
2017-10-04 10:54 ` Marc-André Lureau
2017-10-04 10:54 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 09/32] qapi: check_type() parameter allow_optional is now unused, drop Markus Armbruster
2017-10-04 10:55 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 10/32] qapi: Don't run generators twice Markus Armbruster
2017-10-04 11:04 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 11/32] qapi: Drop the options to generate only .c or .h Markus Armbruster
2017-10-04 11:07 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 12/32] qapi: Use argparse to parse command line arguments Markus Armbruster
2017-10-04 11:13 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 13/32] qapi: Use argparse to open schema file Markus Armbruster
2017-10-04 11:18 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 14/32] qapi: Rework generated code for built-in types Markus Armbruster
2017-10-04 11:52 ` Marc-André Lureau
2017-10-05 4:24 ` Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 15/32] tests/qapi-schema: Improve simple union coverage Markus Armbruster
2017-10-04 12:02 ` Marc-André Lureau
2017-10-05 4:29 ` Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 16/32] qapi: Factor out _make_implicit_wrapper_type() Markus Armbruster
2017-10-04 12:00 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 17/32] qapi: Fix simple union lowering with multiple schemas Markus Armbruster
2017-10-04 12:04 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 18/32] docs/devel/qapi-code-gen.txt: Rewrite section on schema syntax Markus Armbruster
2017-10-04 11:59 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 19/32] qapi: Accept double-quoted strings Markus Armbruster
2017-10-04 11:58 ` Marc-André Lureau
2017-10-05 4:41 ` Markus Armbruster
2017-10-05 14:13 ` Marc-André Lureau
2017-10-06 5:29 ` Markus Armbruster
2017-10-05 15:16 ` Eric Blake
2017-10-06 5:27 ` Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 20/32] qapi: Frontend for defining command line options Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 21/32] qapi: Define QAPIOptionKind and QAPIOption automatically Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 22/32] qapi: New helper c_string() Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 23/32] qapi-options: Command line option backend Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 24/32] qapi-options: Generate help string Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 25/32] qapi-introspect: Include command line options information Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 26/32] qapi2texi: " Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 27/32] os-posix: Drop misleading comment Markus Armbruster
2017-10-04 12:10 ` Marc-André Lureau
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 28/32] vl: QAPIfy command line option definition Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 29/32] qapi/options: QAPIfy --echr argument type Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 30/32] qapi/options: QAPIfy --watchdog-action " Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 31/32] qapi/options: QAPIfy --blockdev " Markus Armbruster
2017-10-02 15:25 ` [Qemu-devel] [RFC PATCH 32/32] qapi/options: QAPIfy --add-fd " 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=20171002152552.27999-1-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--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).