RFC Command line QAPIfication
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest32 patches 28 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | tests/qapi-schema: Improve coverage of '@'tests/ tests/ tests/ | +10 | 1 reply | |
| 2/32 | texi2pod: Support @verbatim environmentscripts/ | +9 | 3 replies | |
| 3/32 | qapi2texi: Fix for examples containing '@'scripts/ tests/ tests/ +1 more | +15 | 1 reply | |
| 4/32 | qapi2texi: Fix for '@' not followed by \w characterscripts/ tests/ tests/ +1 more | +15 | 1 reply | |
| 5/32 | qapi2texi: Provide access to Texinfo markupdocs/ scripts/ tests/ +2 more | +60 | 0 replies | |
| 6/32 | qapi2texi: Drop | example markupdocs/ qapi-schema.json scripts/ +3 more | +22 | 0 replies | |
| 7/32 | qapi: Drop superfluous allow_optional=Truescripts/ | +1 | 1 reply | |
| 8/32 | qapi: Simplify check_name() parametersscripts/ | +10 | 2 replies | |
| 9/32 | qapi: check_type() parameter allow_optional is now unused, dropscripts/ | +5 | 1 reply | |
| 10/32 | qapi: Don't run generators twiceMakefile Makefile.objs tests/ | +64 | 1 reply | |
| 11/32 | qapi: Drop the options to generate only .c or .hscripts/ scripts/ scripts/ +3 more | +14 | 1 reply | |
| 12/32 | qapi: Use argparse to parse command line argumentsscripts/ scripts/ scripts/ +5 more | +74 | 1 reply | |
| 13/32 | qapi: Use argparse to open schema filescripts/ scripts/ tests/ | +5 | 1 reply | |
| 14/32 | qapi: Rework generated code for built-in types.gitignore Makefile Makefile.objs +24 more | +127 | 2 replies | |
| 15/32 | tests/qapi-schema: Improve simple union coveragetests/ tests/ | +16 | 2 replies | |
| 16/32 | qapi: Factor out _make_implicit_wrapper_type()scripts/ | +6 | 1 reply | |
| 17/32 | qapi: Fix simple union lowering with multiple schemasscripts/ scripts/ tests/ +2 more | +43 | 1 reply | |
| 18/32 | docs/devel/qapi-code-gen.txt: Rewrite section on schema syntaxdocs/ | +18 | 1 reply | |
| 19/32 | qapi: Accept double-quoted stringsdocs/ scripts/ tests/ | +7 | 6 replies | |
| 20/32 | qapi: Frontend for defining command line optionsscripts/ tests/ tests/ +1 more | +154 | 0 replies | |
| 21/32 | qapi: Define QAPIOptionKind and QAPIOption automaticallyscripts/ scripts/ scripts/ +6 more | +61 | 0 replies | |
| 22/32 | qapi: New helper c_string()scripts/ scripts/ | +17 | 0 replies | |
| 23/32 | qapi-options: Command line option backendMakefile Makefile.objs scripts/ +2 more | +297 | 0 replies | |
| 24/32 | qapi-options: Generate help stringscripts/ | +13 | 0 replies | |
| 25/32 | qapi-introspect: Include command line options informationqapi/ scripts/ | +29 | 0 replies | |
| 26/32 | qapi2texi: Include command line options informationscripts/ tests/ tests/ +1 more | +129 | 0 replies | |
| 27/32 | os-posix: Drop misleading commentos-posix.c | +0 | 1 reply | |
| 28/32 | vl: QAPIfy command line option definition.gitignore Makefile include/ +10 more | +4961 | 0 replies | |
| 29/32 | qapi/options: QAPIfy --echr argument typeqapi/ vl.c | +3 | 0 replies | |
| 30/32 | qapi/options: QAPIfy --watchdog-action argument typeqapi/ vl.c | +3 | 0 replies | |
| 31/32 | qapi/options: QAPIfy --blockdev argument typeqapi/ vl.c | +8 | 0 replies | |
| 32/32 | qapi/options: QAPIfy --add-fd argument typeqapi/ vl.c | +17 | 0 replies |
Reviews trailers per patch
16 of 32 patches have a Reviewed-by or Acked-by.
| Patch | Marc-André Lureau | Eric Blake |
|---|---|---|
| 1/32 | R-b | |
| 2/32 | R-b | |
| 3/32 | ||
| 4/32 | R-b | |
| 5/32 | ||
| 6/32 | ||
| 7/32 | R-b | |
| 8/32 | R-b R-b | |
| 9/32 | R-b | |
| 10/32 | R-b | |
| 11/32 | R-b | |
| 12/32 | R-b | |
| 13/32 | R-b | |
| 14/32 | R-b | |
| 15/32 | R-b | |
| 16/32 | R-b | |
| 17/32 | R-b | |
| 18/32 | R-b | |
| 19/32 | ||
| 20/32 | ||
| 21/32 | ||
| 22/32 | ||
| 23/32 | ||
| 24/32 | ||
| 25/32 | ||
| 26/32 | ||
| 27/32 | R-b | |
| 28/32 | ||
| 29/32 | ||
| 30/32 | ||
| 31/32 | ||
| 32/32 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [RFC PATCH 00/32] Command line QAPIfication
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: [email protected]
[PULL 0/3] QAPI patches for 2017-10-02 Based-on: [email protected] [PATCH 0/3] hmp-commands-info: Texinfo fixes Based-on: [email protected] [PATCH 0/8] qemu-options: Texinfo and --help fixes
Based-on: [email protected]
[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
Signature · 1 line
2.13.6