Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote: > > > On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote: > >> Markus Armbruster writes: >> >> > John Snow writes: >> >> [...] >> >> >> diff --git a/qga/qapi-schema.json b/q

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 9:55 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote: > Markus Armbruster writes: > > > John Snow writes: > > [...] > > >> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > >> index b3de1fb6b3a..57598331c5c 100644 > >> --- a/qga/

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 9:07 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:49 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:10 AM Markus Armbruster wrote: > John Snow writes: > > > Transactions have the only instance of an Errors section that isn't a > > rST list; turn it into one. > > > > Signed-off-by: John Snow > > Let;s explain the "why" a bi

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread John Snow
On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster wrote: > John Snow writes: > > > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Change get_doc_indented() to preserve indentation on all subsequ

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread John Snow
On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote: > John Snow writes: > > > Change get_doc_indented() to preserve indentation on all subsequent text > > lines, and create a compatibility dedent() function for qapidoc.py to > > remove that indentation. This is be

Re: [PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-19 Thread John Snow
On Wed, Jun 19, 2024, 9:20 AM Markus Armbruster wrote: > John Snow writes: > > > Eliminate the "Example" sections in QAPI doc blocks, converting them > > into QMP example code blocks. This is generally done in this patch by > > converting "Example:&qu

Re: [PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-19 Thread John Snow
On Wed, Jun 19, 2024, 2:28 AM Markus Armbruster wrote: > John Snow writes: > > > In a forthcoming series that adds a new QMP documentation generator, it > > will be helpful to have a linting baseline. However, there's no need to > > shuffle around the deck chair

[PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-18 Thread John Snow
attempting the doc build, convert annotations into captions manually. (Tedious, oh well.) 3. Add captions where still needed: sed -zi 's|# .. code-block:: QMP\n#\n|# .. code-block:: QMP\n#:caption: Example\n#\n|g' *.json Not fully ideal, but hopefully not something that has to be done very o

[PATCH 12/13] qapi/parser: don't parse rST markup as section headers

2024-06-18 Thread John Snow
The double-colon synax is rST formatting that precedes a literal code block. We do not want to capture these as QAPI-specific sections. Coerce blocks that start with e.g. "Example::" to be parsed as untagged paragraphs instead of special tagged sections. Signed-off-by: John Snow --

[PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-18 Thread John Snow
/interop/qemu-storage-daemon-qmp-ref.html Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 29 - scripts/qapi/parser.py | 5 +++-- tests/qapi-schema/doc-good.out | 32 3 files changed, 43 insertions(+), 23 deletions

[PATCH 10/13] qapi: update prose in note blocks

2024-06-18 Thread John Snow
Where I've noticed, rephrase the note to read more fluently. Signed-off-by: John Snow --- qapi/block-core.json | 4 ++-- qga/qapi-schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index cacedfb771c..9ef23ec02ae 100644

[PATCH 11/13] qapi: add markup to note blocks

2024-06-18 Thread John Snow
d en masse in a subsequent patch after the new QAPI doc generator is merged. Signed-off-by: John Snow --- qapi/control.json | 4 ++-- qapi/misc.json | 8 qapi/qdev.json | 2 +- qapi/run-state.json | 2 +- qapi/sockets.json | 2 +- qapi/ui.json| 2 +- 6 files changed, 10

[PATCH 01/13] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-06-18 Thread John Snow
orry about that! Signed-off-by: John Snow --- scripts/qapi-lint.sh | 59 +++ scripts/qapi/Makefile | 5 2 files changed, 64 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff --git a/scripts/qapi

[PATCH 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-18 Thread John Snow
Transactions have the only instance of an Errors section that isn't a rST list; turn it into one. Signed-off-by: John Snow --- docs/devel/qapi-code-gen.rst | 7 +++ qapi/transaction.json| 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/devel/qapi-code

[PATCH 07/13] qapi: fix non-compliant JSON examples

2024-06-18 Thread John Snow
e been adjusted to support that format here. Signed-off-by: John Snow --- qapi/control.json | 3 ++- qapi/machine.json | 2 +- qapi/migration.json | 2 +- qapi/misc.json | 3 ++- qapi/net.json | 6 +++--- qapi/rocker.json| 2 +- qapi/ui.json| 2 +- 7 files changed, 11 inserti

[PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-18 Thread John Snow
here, with just two "caution" directives. ".. admonition:: notes" is used in a few places where we had an ordered list of multiple notes that would not make sense as standalone/separate admonitions. Signed-off-by: John Snow Acked-by: Stefan Hajnoczi [for block*.json] ---

[PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-18 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 66 +- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index f270b494f01..e675966defa 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/

[PATCH 06/13] docs/qapidoc: fix nested parsing under untagged sections

2024-06-18 Thread John Snow
tion (free paragraphs), skip making a hollow section and instead append the parse results to the prior section. Many Bothans died to bring us this information. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/d

[PATCH 05/13] qapi/parser: fix comment parsing immediately following a doc block

2024-06-18 Thread John Snow
c block. Fixes: 3d035cd2cca6 (qapi: Rewrite doc comment parser) Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 +- tests/qapi-schema/doc-good.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 43167ef0ab3..dfd

[PATCH 02/13] qapi: linter fixups

2024-06-18 Thread John Snow
Fix minor irritants to pylint/flake8 et al. (Yes, these need to be guarded by the Python tests. That's a work in progress, a series that's quite likely to follow once I finish this Sphinx project. Please pardon the temporary irritation.) Signed-off-by: John Snow Reviewed-by: Markus Armbruster

[PATCH 00/13] qapi: convert "Note" and "Example" sections to rST

2024-06-18 Thread John Snow
les is a little ugly in rendered HTML output; My CSS intern wasn't available before publication time to fix it ;) -- Will fix with an amendment patch at next opportunity. Any feedback not implemented should be interpreted as evidence of a forgetful (rather than a spiteful) mind. Please remind

Re: [PATCH 20/20] qapi: convert "Example" sections to rST

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024 at 10:39 AM Markus Armbruster wrote: > John Snow writes: > > > Eliminate the "Example" sections in QAPI doc blocks, converting them > > into QMP example code blocks. This is generally done by converting > > "Example:" or "

Re: [PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024, 9:44 AM Markus Armbruster wrote: > John Snow writes: > > > We do not need a dedicated section for notes. By eliminating a specially > > parsed section, these notes can be treated as normal rST paragraphs in > > the new QMP reference manual, and

Re: [PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024, 7:24 AM Markus Armbruster wrote: > John Snow writes: > > > Transactions have the only instance of an Errors section that isn't a > > rST list; turn it into one. > > Just for consistency? Or do you have other shenanigans up your sleeve? > Just

Re: [PATCH 14/20] qapi: fix non-compliant JSON examples

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024, 6:55 AM Markus Armbruster wrote: > John Snow writes: > > > If we parse all examples as QMP, we need them to conform to a standard > > so that they render correctly. Once the QMP lexer is active for > > examples, these will produce warning mes

Re: [PATCH 13/20] docs/qapidoc: fix nested parsing under untagged sections

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024, 5:46 AM Markus Armbruster wrote: > John Snow writes: > > > Sphinx does not like sections without titles, because it wants to > > convert every section into a reference. When there is no title, it > > struggles to do this and transf

Re: [PATCH 11/20] qapi/schema: add doc_visible property to QAPISchemaDefinition

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024, 5:40 AM Markus Armbruster wrote: > John Snow writes: > > > The intent here is to mark only certain definitions as visible in the > > end-user docs. > > > > All commands and events are inherently visible. Everything else is > > visible

Re: [PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-06-17 Thread John Snow
On Fri, Jun 14, 2024 at 4:53 AM Markus Armbruster wrote: > John Snow writes: > > > This helps simplify the doc generator if it doesn't have to check for > > undocumented members. > > > > Signed-off-by: John Snow > > --- > > scripts/qapi/parser.py | 2

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-06-17 Thread John Snow
On Thu, Jun 13, 2024 at 10:46 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, May 16, 2024, 2:18 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > When iterating all_sections, this is helpful to be able to dis

Re: [PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-06-17 Thread John Snow
On Thu, Jun 13, 2024 at 10:32 AM Markus Armbruster wrote: > John Snow writes: > > > On Thu, May 16, 2024 at 2:01 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > If a comment immediately follows a doc block, the parser do

Re: [PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-16 Thread John Snow
On Thu, May 16, 2024 at 11:06 AM John Snow wrote: > > > On Thu, May 16, 2024, 5:34 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Add a semantic tag to paragraphs that appear *before* tagged >> > sections/members/features and those tha

Re: [PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-05-16 Thread John Snow
On Thu, May 16, 2024 at 2:01 AM Markus Armbruster wrote: > John Snow writes: > > > If a comment immediately follows a doc block, the parser doesn't ignore > > that token appropriately. Fix that. > > Reproducer? > > > > > Signed-off-by: John Snow

Re: [PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-16 Thread John Snow
On Thu, May 16, 2024, 5:34 AM Markus Armbruster wrote: > John Snow writes: > > > Add a semantic tag to paragraphs that appear *before* tagged > > sections/members/features and those that appear after. This will control > > how they are inlined when doc sections

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-05-16 Thread John Snow
On Thu, May 16, 2024, 2:18 AM Markus Armbruster wrote: > John Snow writes: > > > When iterating all_sections, this is helpful to be able to distinguish > > "members" from "features"; the only other way to do so is to > > cross-reference these secti

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-16 Thread John Snow
On Thu, May 16, 2024, 1:58 AM Markus Armbruster wrote: > John Snow writes: > > > Instead of using the info object for the doc block as a whole, update > > the info pointer for each call to ensure_untagged_section when the > > existing section is otherwise empty

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread John Snow
On Wed, May 15, 2024, 1:27 PM Markus Armbruster wrote: > John Snow writes: > > > On Wed, May 15, 2024 at 5:17 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > In the coming patches, it's helpful to have a linting bas

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread John Snow
On Wed, May 15, 2024 at 10:18 AM Markus Armbruster wrote: > John Snow writes: > > > On Wed, May 15, 2024, 7:50 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Prior to this patch, a section like this: > &

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread John Snow
On Wed, May 15, 2024 at 5:17 AM Markus Armbruster wrote: > John Snow writes: > > > In the coming patches, it's helpful to have a linting baseline. However, > > there's no need to shuffle around the deck chairs too much, because most > > of this code will be remo

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread John Snow
On Wed, May 15, 2024, 7:50 AM Markus Armbruster wrote: > John Snow writes: > > > Prior to this patch, a section like this: > > > > @name: lorem ipsum > >dolor sit amet > > consectetur adipiscing elit > > > > would be parsed as: >

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread John Snow
On Wed, May 15, 2024, 5:17 AM Markus Armbruster wrote: > John Snow writes: > > > In the coming patches, it's helpful to have a linting baseline. However, > > there's no need to shuffle around the deck chairs too much, because most > > of this code will be removed once t

[PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-05-14 Thread John Snow
ll_sections, we need *something* accessible to distinguish them. To keep types simple, add this semantic parameter to the base Section and not just ArgSection; we can use this to filter out paragraphs and tagged sections, too. Signed-off-by: John Snow --- scripts/qapi/parser.py | 25 +

[PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-05-14 Thread John Snow
Transactions have the only instance of an Errors section that isn't a rST list; turn it into one. Signed-off-by: John Snow --- qapi/transaction.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/transaction.json b/qapi/transaction.json index 5749c133d4a..07afc269d54

[PATCH 17/20] qapi: rewrite BlockExportOptions doc block

2024-05-14 Thread John Snow
Rephrase this paragraph so that it can apply to any commands that inherit from this object. Signed-off-by: John Snow --- qapi/block-export.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-export.json b/qapi/block-export.json index dc328097a94

[PATCH 01/20] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2024-05-14 Thread John Snow
orry about that! Signed-off-by: John Snow --- scripts/qapi-lint.sh | 51 +++ scripts/qapi/Makefile | 5 + 2 files changed, 56 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff --git a/scripts/qapi

[PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-05-14 Thread John Snow
If a comment immediately follows a doc block, the parser doesn't ignore that token appropriately. Fix that. Signed-off-by: John Snow --- scripts/qapi/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 41b9319e5cb

[PATCH 14/20] qapi: fix non-compliant JSON examples

2024-05-14 Thread John Snow
t;, so two examples have been adjusted to support that format here. Signed-off-by: John Snow --- qapi/control.json | 3 ++- qapi/machine.json | 2 +- qapi/migration.json | 2 +- qapi/misc.json | 3 ++- qapi/net.json | 6 +++--- qapi/rocker.json| 2 +- qapi/ui.json| 2 +

[PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-14 Thread John Snow
tall black" (without root permissions) if you do not have it installed otherwise. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index f270b494f01..165568

[PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-05-14 Thread John Snow
: .. Note:: ... .. admonition:: custom title admonition body text This patch uses ".. notes::" almost everywhere, with just two "caution" directives. ".. admonition:: notes" is used in a few places where we had an ordered list of multiple notes. Signed-off-

[PATCH 15/20] qapi: remove developer factoring comments from QAPI doc blocks

2024-05-14 Thread John Snow
to *either* audience, and convert what's left to garden-variety comments to prevent it from showing up in rendered documentation. Signed-off-by: John Snow --- qapi/audio.json| 5 ++--- qapi/block-core.json | 47 ++ qapi/block-export.json | 10 -

[PATCH 13/20] docs/qapidoc: fix nested parsing under untagged sections

2024-05-14 Thread John Snow
parsing an untagged section (free paragraphs), skip making a hollow section and instead append the parse results to the prior section. Many Bothans died to bring us this information. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 16 +++- 1 file changed, 11 insertions(+), 5

[PATCH 10/20] qapi/schema: add __iter__ method to QAPISchemaVariants

2024-05-14 Thread John Snow
else []: ... against: for var in variants or []: ... Update callsites to reflect the new usage pattern. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 2 +- scripts/qapi/introspect.py | 4 ++-- scripts/qapi/schema.py | 8 ++-- scripts/qapi/types.py | 4

[PATCH 16/20] qapi: rewrite StatsFilter comment

2024-05-14 Thread John Snow
Rewrite the StatsFilter intro paragraph to be more meaningful to end-users when it is inlined in generated documentation. Signed-off-by: John Snow --- qapi/stats.json | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qapi/stats.json b/qapi/stats.json index 578b52c7ef7

[PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-05-14 Thread John Snow
This helps simplify the doc generator if it doesn't have to check for undocumented members. Signed-off-by: John Snow --- scripts/qapi/parser.py | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index

[PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-14 Thread John Snow
or rST.) Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 36 +- scripts/qapi/parser.py | 8 ++-- tests/qapi-schema/doc-good.out | 32 +++--- 3 files changed, 53 insertions(+), 23 deletions(-) diff --git a/docs/sphinx/qapi

[PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-14 Thread John Snow
Instead of using the info object for the doc block as a whole, update the info pointer for each call to ensure_untagged_section when the existing section is otherwise empty. This way, Sphinx error information will match precisely to where the text actually starts. Signed-off-by: John Snow

[PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-14 Thread John Snow
Add a semantic tag to paragraphs that appear *before* tagged sections/members/features and those that appear after. This will control how they are inlined when doc sections are merged and flattened. Signed-off-by: John Snow --- scripts/qapi/parser.py | 22 +- 1 file changed

[PATCH 12/20] qapi/source: allow multi-line QAPISourceInfo advancing

2024-05-14 Thread John Snow
This is for the sake of the new rST generator (the "transmogrifier") so we can advance multiple lines on occasion while keeping the generated<-->source mappings accurate. next_line now simply takes an optional n parameter which chooses the number of lines to advance. Signed-o

[PATCH 20/20] qapi: convert "Example" sections to rST

2024-05-14 Thread John Snow
aptions manually. (Tedious, oh well.) 3. Add captions where still needed: sed -zi 's|# .. code-block:: QMP\n#\n|# .. code-block:: QMP\n#:caption: Example\n#\n|g' *.json Not fully ideal, but hopefully not something that has to be done very often. (Or ever aga

[PATCH 11/20] qapi/schema: add doc_visible property to QAPISchemaDefinition

2024-05-14 Thread John Snow
he objects that should be rendered *are* by failing if any cross-references are missing, verifying everything is in place. Signed-off-by: John Snow --- scripts/qapi/schema.py | 40 1 file changed, 40 insertions(+) diff --git a/scripts/qapi/schema.py b/scripts/qapi

[PATCH 02/20] qapi: linter fixups

2024-05-14 Thread John Snow
Fix minor irritants to pylint/flake8 et al. (Yes, these need to be guarded by the Python tests. That's a work in progress, a series that's quite likely to follow once I finish this Sphinx project. Please pardon the temporary irritation.) Signed-off-by: John Snow --- scripts/qapi/introspect.py

[PATCH 00/20] qapi: new sphinx qapi domain pre-requisites

2024-05-14 Thread John Snow
cleanup Patches 4-12: QAPI generator fixes/miscellany Patch 13: qapidoc.py fix (to prepare for rST conversion) Patches 14-20: QAPI documentation modifications, rST conversion Sorry, --js John Snow (20): [DO-NOT-MERGE]: Add some ad-hoc linting helpers. qapi: linter fixups docs/qapidoc: delint

Re: [PATCH] hw/block/fdc: do not set SEEK status bit in multi track commands

2024-01-08 Thread John Snow
On Mon, Jan 1, 2024 at 4:45 PM Hervé Poussineau wrote: > > Ping. > > Le 12/08/2023 à 10:59, Hervé Poussineau a écrit : > > I don't understand when SEEK must be set or not, but it seems to fix > > Minix... > > > > Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1522 > > Signed-off-by: Hervé

Re: [PULL 00/25] Python patches

2023-10-16 Thread John Snow
On Mon, Oct 16, 2023 at 3:21 PM Stefan Hajnoczi wrote: > > Applied, thanks. > > Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any > user-visible changes. Hi Vladimir: all done! I've created a MR to backport your changes to the standalone repo here:

Re: [RFC PATCH 10/78] hw/ide/atapi.c: add fallthrough pseudo-keyword

2023-10-13 Thread John Snow
ide_atapi_cmd_reply(s, ret, max_len); > } > > break; > } > /* TODO: BD support, fall through for now */ > +fallthrough; ACK. For a moment I was wondering if this was something new to gcc, but I guess it's just

[PULL 04/25] python/machine: use socketpair() for console connections

2023-10-13 Thread John Snow
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that might otherwise have been dropped on the floor before being able to connect to QEMU under "server,nowait". Signed-off-by: John Snow Reviewed-by:

[PULL 10/25] Python: Enable python3.12 support

2023-10-13 Thread John Snow
Python 3.12 has released, so update the test infrastructure to test against this version. Update the configure script to look for it when an explicit Python interpreter isn't chosen. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20231006195243.3131140-5-js

[PULL 12/25] qmp_shell.py: _fill_completion() use .command() instead of .cmd()

2023-10-13 Thread John Snow
-by: John Snow --- python/qemu/qmp/qmp_shell.py | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py index 619ab42ced..988d79c01b 100644 --- a/python/qemu/qmp/qmp_shell.py +++ b/python/qemu/qmp

[PULL 16/25] python/machine.py: upgrade vm.cmd() method

2023-10-13 Thread John Snow
Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-7-vsement...@yandex-team.ru Signed-off-by: John Snow --- python/qemu/machine/machine.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index

[PULL 08/25] python/qmp: remove Server.wait_closed() call for Python 3.12

2023-10-13 Thread John Snow
- but instead, this waits for all connections to close. Or, it would have, if it wasn't broken since it was introduced. 3.12 fixes the bug, which now causes a hang in our code. The fix is just to remove the wait. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id

[PULL 01/25] python/machine: move socket setup out of _base_args property

2023-10-13 Thread John Snow
This property isn't meant to do much else besides return a list of strings, so move this setup back out into _pre_launch(). Signed-off-by: John Snow Reviewed-by: Ani Sinha Reviewed-by: Daniel P. Berrangé Message-id: 20230928044943.849073-2-js...@redhat.com Signed-off-by: John Snow --- python

[PULL 13/25] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()

2023-10-13 Thread John Snow
-4-vsement...@yandex-team.ru Signed-off-by: John Snow --- scripts/cpu-x86-uarch-abi.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 82ff07582f..893afd1b35 100644 --- a/scripts/cpu-x86-uarch-abi.py

[PULL 17/25] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Add similar method for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-8-vsement...@yandex-team.ru Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 7 ++- 1 file changed, 6

[PULL 03/25] python/console_socket: accept existing FD in initializer

2023-10-13 Thread John Snow
Useful if we want to use ConsoleSocket() for a socket created by socketpair(). Signed-off-by: John Snow Reviewed-by: Ani Sinha Reviewed-by: Daniel P. Berrangé Message-id: 20230928044943.849073-4-js...@redhat.com Signed-off-by: John Snow --- python/qemu/machine/console_socket.py | 29

[PULL 23/25] tests/vm/basevm.py: use cmd() instead of qmp()

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy We don't expect failure here and need 'result' object. cmd() is better in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-14-vsement...@yandex-team.ru Signed-off-by: John Snow --- tests/vm

[PULL 07/25] Python/iotests: Add type hint for nbd module

2023-10-13 Thread John Snow
.) Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20231006195243.3131140-2-js...@redhat.com Signed-off-by: John Snow --- tests/qemu-iotests/tests/nbd-multiconn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests

[PULL 18/25] iotests: add some missed checks of qmp result

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-9-vsement...@yandex-team.ru Signed-off-by: John Snow --- tests/qemu-iotests/041| 1 + tests/qemu-iotests/151

[PULL 11/25] python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument

2023-10-13 Thread John Snow
-team.ru Signed-off-by: John Snow --- python/qemu/qmp/legacy.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py index e1e9383978..fe115e301c 100644 --- a/python/qemu/qmp/legacy.py +++ b/python/qemu/qmp/legacy.py @@ -195,20

[PULL 19/25] iotests: refactor some common qmp result checks into generic pattern

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy To simplify further conversion. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-10-vsement...@yandex-team.ru Signed-off-by: John Snow --- tests/qemu-iotests/040 | 3 ++- tests/qemu-iotests/147 | 3

[PULL 20/25] iotests: drop some extra semicolons

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-11-vsement...@yandex-team.ru Signed-off-by: John Snow --- tests/qemu-iotests/041 | 2 +- tests/qemu-iotests/196 | 2 +- 2 files changed, 2 insertions

[PULL 09/25] configure: fix error message to say Python 3.8

2023-10-13 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20231006195243.3131140-4-js...@redhat.com Signed-off-by: John Snow --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 8fada85a71..a49fc7b7e7 100755

[PULL 15/25] python/qemu: rename command() to cmd()

2023-10-13 Thread John Snow
update three occurrences in tests/avocado/machine_aspeed.py and keep r-b] Signed-off-by: John Snow --- docs/devel/testing.rst| 10 +- python/qemu/machine/machine.py| 8 +- python/qemu/qmp/legacy.py | 2 +- python/qemu/qmp/qmp_shell.py

[PULL 21/25] iotests: drop some extra ** in qmp() call

2023-10-13 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/040| 4 +- tests/qemu-iotests/041| 14 +++--- tests/qemu-iotests/129| 2 +- tests/qemu-iotests/147| 2 +- tests/qemu-iotests/155

[PULL 05/25] python/machine: use socketpair() for qtest connection

2023-10-13 Thread John Snow
Like the QMP and console sockets, begin using socketpairs for the qtest connection, too. After this patch, we'll be able to remove the vestigial sock_dir argument, but that cleanup is best done in its own patch. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Message-id

[PULL 14/25] python: rename QEMUMonitorProtocol.cmd() to cmd_raw()

2023-10-13 Thread John Snow
Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-5-vsement...@yandex-team.ru Signed-off-by: John Snow --- python/qemu/machine/machine.py | 2 +- python/qemu/qmp/legacy.py | 4 ++-- tests/qemu-iotests/iotests.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PULL 22/25] iotests.py: pause_job(): drop return value

2023-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy The returned value is unused. It's simple to check by command git grep -B 3 '\.pause_job(' Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-13-vsement...@yandex-team.ru Signed-off-by: John Snow

[PULL 24/25] scripts: add python_qmp_updater.py

2023-10-13 Thread John Snow
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-15-vsement...@yandex-team.ru Signed-off-by: John Snow --- scripts/python_qmp_updater.py | 136 ++ 1 file changed, 136 insertions(+) create mode 1007

[PULL 02/25] python/machine: close sock_pair in cleanup path

2023-10-13 Thread John Snow
but flubbed the launch and need to clean up resources. These resources *would* be handled by the garbage collector, but that can happen at unpredictable times. Nicer to just clean them up synchronously on the exit path, here. Signed-off-by: John Snow Reviewed-by: Ani Sinha Reviewed-by: Daniel P

[PULL 06/25] python/machine: remove unused sock_dir argument

2023-10-13 Thread John Snow
long" as a socket name on macOS. We don't need it for this class now. In one case, avocado testing takes over responsibility for creating an appropriate sockdir. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Message-id: 20230928044943.849073-7-js...@redhat.com Signed-off-by: John Snow -

[PULL 00/25] Python patches

2023-10-13 Thread John Snow
connections - Support Python 3.12 - Switch iotests over to using raise-on-error QMP command interface (Thank you very much, Vladimir!) John Snow (10): python/machine: move socket setup out of _base_args property python/machine: close

Re: [PATCH 04/10] tests/cdrom-test: Clean up global variable shadowing in prepare_image()

2023-10-12 Thread John Snow
ch, char *isoimage) >^ > tests/qtest/cdrom-test.c:18:13: note: previous declaration is here > static char isoimage[] = "cdrom-boot-iso-XX"; > ^ > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: John Snow > ---

Re: [PATCH v7 00/15] iotests: use vm.cmd()

2023-10-12 Thread John Snow
On Thu, Oct 12, 2023 at 1:52 PM Vladimir Sementsov-Ogievskiy wrote: > > On 12.10.23 01:04, John Snow wrote: > > On Fri, Oct 6, 2023 at 11:41 AM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Hi all! > >> > >> Let's

Re: [PATCH v7 00/15] iotests: use vm.cmd()

2023-10-11 Thread John Snow
n_qmp_updater.py > > -- > 2.34.1 > I rebased this on top of my python branch today and confirmed all of my python tests pass - I'm happy enough with it from the Python perspective. I think it's the right thing to do, and I'm happy you did it, but I can't begin to pretend I audited the rewrite script or the actual output it produced - I did not. But: Reviewed-by: John Snow (Patches 1-6, Patch 13) Tested-by: John Snow (All - I went patch by patch and ran my Python tests and made sure nothing regressed.) Acked-by: John Snow (All) --js

Re: [PATCH 4/4] Python: Enable python3.12 support

2023-10-06 Thread John Snow
On Fri, Oct 6, 2023 at 4:40 PM Vladimir Sementsov-Ogievskiy wrote: > > On 06.10.23 22:52, John Snow wrote: > > Python 3.12 has released, so update the test infrastructure to test > > against this version. Update the configure script to look for it when an > > explicit

[PATCH 4/4] Python: Enable python3.12 support

2023-10-06 Thread John Snow
Python 3.12 has released, so update the test infrastructure to test against this version. Update the configure script to look for it when an explicit Python interpreter isn't chosen. Signed-off-by: John Snow --- configure | 3 ++- python/setup.cfg

[PATCH 0/4] Python: Enable python3.12 support

2023-10-06 Thread John Snow
A few mostly trivial fixes, one backport from the qemu.qmp repo, and enabling the Python tests to run against Python3.12. John Snow (4): Python/iotests: Add type hint for nbd module python/qmp: remove Server.wait_closed() call for Python 3.12 configure: fix error message to say Python 3.8

[PATCH 3/4] configure: fix error message to say Python 3.8

2023-10-06 Thread John Snow
Signed-off-by: John Snow --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e08127045d..e9a921ffb0 100755 --- a/configure +++ b/configure @@ -944,7 +944,7 @@ then # If first_python is set, there was a binary somewhere even though

[PATCH 2/4] python/qmp: remove Server.wait_closed() call for Python 3.12

2023-10-06 Thread John Snow
- but instead, this waits for all connections to close. Or, it would have, if it wasn't broken since it was introduced. 3.12 fixes the bug, which now causes a hang in our code. The fix is just to remove the wait. Signed-off-by: John Snow --- python/qemu/qmp/protocol.py | 1 - 1 file changed, 1

  1   2   3   4   5   6   7   8   9   10   >