qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 81b490: qapi: Make visit_next_list()'s commen


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 81b490: qapi: Make visit_next_list()'s comment less confusing
Date: Thu, 26 Sep 2019 02:13:00 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 81b49004e0846b3526e26c786b6f64d4f1a0e38a
      
https://github.com/qemu/qemu/commit/81b49004e0846b3526e26c786b6f64d4f1a0e38a
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M include/qapi/visitor.h

  Log Message:
  -----------
  qapi: Make visit_next_list()'s comment less confusing

visit_next_list() returns non-null on success, null on failure.  The
comment's phrasing "until NULL return or error occurs" is needlessly
confusing.  Scratch the "or error occurs" part.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 863f195fa823c0c20d734dadfc5908c2aea34330
      
https://github.com/qemu/qemu/commit/863f195fa823c0c20d734dadfc5908c2aea34330
  Author: Andrey Shinkevich <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  make check-unit: use after free in test-opts-visitor

In the struct OptsVisitor, the 'repeated_opts' member points to a list
in the 'unprocessed_opts' hash table after the list has been destroyed.
A subsequent call to visit_type_int() references the deleted list.
It results in use-after-free issue reproduced by running the test case
under the Valgrind: valgrind tests/test-opts-visitor.
A new mode ListMode::LM_TRAVERSED is declared to mark the list
traversal completed.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Andrey Shinkevich <address@hidden>
Message-Id: <address@hidden>


  Commit: b1862ee6233805172bab89a1fc44e929dcdbd9fa
      
https://github.com/qemu/qemu/commit/b1862ee6233805172bab89a1fc44e929dcdbd9fa
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/git.orderfile

  Log Message:
  -----------
  scripts/git.orderfile: Match QAPI schema more precisely

Pattern *.json also matches the tests/qapi-schema/*.json.  Separates
them from the tests/qapi-schema/*.{err,exit,out} in diffs.  I hate
that.  Change the pattern to match just the "real" QAPI schemata.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>


  Commit: dcca907bed4707f8fa8bbfdd9eef741fdaad29f8
      
https://github.com/qemu/qemu/commit/dcca907bed4707f8fa8bbfdd9eef741fdaad29f8
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Drop check_type()'s redundant parameter @allow_optional

check_type() uses @allow_optional only when @value is a dictionary and
@allow_dict is True.  All callers that pass allow_dict=True also pass
allow_optional=True.

Therefore, @allow_optional is always True when check_type() uses it.
Drop the redundant parameter.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: b22e86585b296b254209cdc7011fcc74dd08717d
      
https://github.com/qemu/qemu/commit/b22e86585b296b254209cdc7011fcc74dd08717d
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/common.py
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: Drop support for boxed alternate arguments

Commands and events can define their argument type inline (default) or
by referring to another type ('boxed': true, since commit c818408e44
"qapi: Implement boxed types for commands/events", v2.7.0).  The
unboxed inline definition is an (anonymous) struct type.  The boxed
type may be a struct, union, or alternate type.

The latter is problematic: docs/interop/qemu-spec.txt requires the
value of the 'data' key to be a json-object, but any non-degenerate
alternate type has at least one branch that isn't.

Fortunately, we haven't made use of alternates in this context outside
tests/.  Drop support for them.

QAPISchemaAlternateType.is_empty() is now unused.  Drop it, too.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: e24fe238e2c8d99afcb896bcb69b0c07fc9e491b
      
https://github.com/qemu/qemu/commit/e24fe238e2c8d99afcb896bcb69b0c07fc9e491b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Minor specification fixes

The specification claims "Each expression that isn't an include
directive may be preceded by a documentation block", but the code also
rejects them for pragma directives.  The code is correct.  Fix the
specification.

The specification reserves member names starting with 'has_', but the
code also reserves name 'u'.  Fix the specification.

The specification claims "The string 'max' is not allowed as an enum
value".  Untrue.  Fix the specification.  While there, delete the
naming advice, because it's redundant with the naming rules in section
"Schema overview"

The specification claims "No branch of the union can be named 'max',
as this would collide with the implicit enum".  Untrue.  Fix the
specification.

The specification claims "It is not allowed to name an event 'MAX',
since the generator also produces a C enumeration of all event names
with a generated _MAX value at the end."  Untrue.  Fix the
specification.

The specification claims "All branches of the union must be complex
types", but the code permits only struct types.  The code is correct.
Fix the specification.

The specification claims a command's return type "must be the string
name of a complex or built-in type, a one-element array containing the
name of a complex or built-in type" unless the command is in pragma
'returns-whitelist'.  The code does not permit built-in types.  Fix
the specification.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 05d6ecd049e814b8ce85c4a974218bafe468a627
      
https://github.com/qemu/qemu/commit/05d6ecd049e814b8ce85c4a974218bafe468a627
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/qapi-schema/enum-bad-name.err
    M tests/qapi-schema/enum-bad-name.json

  Log Message:
  -----------
  tests/qapi-schema: Demonstrate bad reporting of funny characters

Invalid name 'not\\possible' is reported as 'not\possible'.  Control
characters (quoted or not) are even more confusing.  Mark FIXME.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 56a8caff922df8d597895a49f55f2150bff3adb7
      
https://github.com/qemu/qemu/commit/56a8caff922df8d597895a49f55f2150bff3adb7
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/Makefile.include
    A tests/qapi-schema/string-code-point-127.err
    A tests/qapi-schema/string-code-point-127.exit
    A tests/qapi-schema/string-code-point-127.json
    A tests/qapi-schema/string-code-point-127.out
    A tests/qapi-schema/string-code-point-31.err
    A tests/qapi-schema/string-code-point-31.exit
    A tests/qapi-schema/string-code-point-31.json
    A tests/qapi-schema/string-code-point-31.out
    R tests/qapi-schema/unicode-str.err
    R tests/qapi-schema/unicode-str.exit
    R tests/qapi-schema/unicode-str.json
    R tests/qapi-schema/unicode-str.out

  Log Message:
  -----------
  qapi: Restrict strings to printable ASCII

RFC 8259 on string contents:

   All Unicode characters may be placed within the quotation marks,
   except for the characters that MUST be escaped: quotation mark,
   reverse solidus, and the control characters (U+0000 through
   U+001F).

The QAPI schema parser accepts both less and more than JSON: it
accepts only ASCII with \u (less), and accepts control characters
other than LF (new line) unescaped.  How it treats unescaped non-ASCII
input differs between Python 2 and Python 3.

Make it accept strictly less: require printable ASCII.  Drop support
for \b, \f, \n, \r, \t.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 9b4416bfc1ea5fb3398e8f78a90caa88dd301c37
      
https://github.com/qemu/qemu/commit/9b4416bfc1ea5fb3398e8f78a90caa88dd301c37
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/Makefile.include
    R tests/qapi-schema/escape-outside-string.err
    R tests/qapi-schema/escape-outside-string.exit
    R tests/qapi-schema/escape-outside-string.json
    R tests/qapi-schema/escape-outside-string.out
    R tests/qapi-schema/escape-too-big.err
    R tests/qapi-schema/escape-too-big.exit
    R tests/qapi-schema/escape-too-big.json
    R tests/qapi-schema/escape-too-big.out
    R tests/qapi-schema/escape-too-short.err
    R tests/qapi-schema/escape-too-short.exit
    R tests/qapi-schema/escape-too-short.json
    R tests/qapi-schema/escape-too-short.out
    M tests/qapi-schema/ident-with-escape.err
    M tests/qapi-schema/ident-with-escape.exit
    M tests/qapi-schema/ident-with-escape.json
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/unknown-escape.json

  Log Message:
  -----------
  qapi: Drop support for escape sequences other than \\

Since the previous commit restricted strings to printable ASCII,
\uXXXX's only use is obfuscation.  Drop it.

This leaves \\, \/, \', and \".  Since QAPI schema strings are all
names, and names are restricted to ASCII letters, digits, hyphen, and
underscore, none of them is useful.

The latter three have no test coverage.  Drop them.

Keep \\ to avoid (more) gratuitous incompatibility with JSON.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c
      
https://github.com/qemu/qemu/commit/675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M tests/Makefile.include
    R tests/qapi-schema/args-boxed-empty.err
    R tests/qapi-schema/args-boxed-empty.exit
    R tests/qapi-schema/args-boxed-empty.json
    R tests/qapi-schema/args-boxed-empty.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Permit 'boxed' with empty type

We reject empty types with 'boxed': true.  We don't really need that
to work, but making it work is actually simpler than rejecting it, so
do that.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: f03255362ae3bfd6f105c0fc855c713944f99717
      
https://github.com/qemu/qemu/commit/f03255362ae3bfd6f105c0fc855c713944f99717
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/alternate-empty.err
    M tests/qapi-schema/alternate-empty.json
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: Permit alternates with just one branch

A union or alternate without branches makes no sense and doesn't work:
it can't be instantiated.  A union or alternate with just one branch
works, but is degenerate.  We accept the former, but reject the
latter.  Weird.  docs/devel/qapi-code-gen.txt doesn't mention the
difference.  It claims an alternate definition is "is similar to a
simple union type".

Permit degenerate alternates to make them consistent with unions.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 0ced9531f17c1c28fa4f29b352729c7f40c2ae30
      
https://github.com/qemu/qemu/commit/0ced9531f17c1c28fa4f29b352729c7f40c2ae30
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/common.py
    M tests/qapi-schema/flat-union-empty.err
    M tests/qapi-schema/flat-union-empty.json
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/union-empty.err
    M tests/qapi-schema/union-empty.json

  Log Message:
  -----------
  qapi: Permit omitting all flat union branches

Absent flat union branches default to the empty struct (since commit
800877bb16 "qapi: allow empty branches in flat unions").  But an
attempt to omit all of them is rejected with "Union 'FOO' has no
branches".  Harmless oddity, but it's easy to avoid, so do that.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[Commit message typo fixed]


  Commit: 398969fe1c6f696e19d0f317dd055c6b17e2cee6
      
https://github.com/qemu/qemu/commit/398969fe1c6f696e19d0f317dd055c6b17e2cee6
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M tests/qapi-schema/enum-clash-member.err
    M tests/qapi-schema/enum-member-case.err

  Log Message:
  -----------
  qapi: Adjust frontend errors to say enum value, not member

For consistency with docs/devel/qapi-code-gen.txt.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: f5821f526289badd667bcc288e5deaf5417466df
      
https://github.com/qemu/qemu/commit/f5821f526289badd667bcc288e5deaf5417466df
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Reorder sections for readability

Section "QMP/Guest agent schema" starts with a brief introduction,
then subsection "Comments", then subsection "Schema overview" (more
elaborate introduction), and only then talks about schema entities
like types, commands, and so forth.

Subsection "Comments" is long and tiring: almost 500 words, mostly
about doc comments.  Move the doc comment part to its own subsection
"Documentation comments" at the very end of "QMP/Guest agent schema".

Subsection "Schema overview" explains naming rules at considerable
length: 250 words.  Move this part to its own subsection "Naming rules
and reserved names" right after the subsections on schema entities.

Subsection "Enumeration types" is wedged between "Struct types" and
"Union types".  Move it before "Struct types".

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: ab76bc279487ca248eb61f8d1ad9923a584e1370
      
https://github.com/qemu/qemu/commit/ab76bc279487ca248eb61f8d1ad9923a584e1370
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Rewrite compatibility considerations

We have some compatibility advice buried in sections "Enumeration
types" and "Struct types".  Compatibility is actually about commands
and events.  It devolves to the types used there.  All kinds of types,
not just enumerations and structs.

Replace the existing advice by a new section "Compatibility
considerations".

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[Squash in paragraph on invisible schema changes, as per Eric's review]


  Commit: 634c82c1639cd4173bc53f0a3ac026d757e9d1c4
      
https://github.com/qemu/qemu/commit/634c82c1639cd4173bc53f0a3ac026d757e9d1c4
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Rewrite introduction to schema

The introduction to the QAPI schema is somewhat rambling.  Rewrite for
clarity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: b6c37ebaaf074cac8fe8a4781dc3e79db23e914e
      
https://github.com/qemu/qemu/commit/b6c37ebaaf074cac8fe8a4781dc3e79db23e914e
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Improve QAPI schema language doc

We document the language by giving patterns of valid JSON objects.
The patterns contain placeholders we don't define anywhere; their
names have to speak for themselves.  I guess they do, but I'd prefer a
bit more rigor.  Provide a grammar instead, and rework the text
accordingly.

Documentation for QAPI schema conditionals (commit 967c885108,
6cc32b0e14, 87adbbffd4..3e270dcacc) and feature flags (commit
6a8c0b5102) was bolted on.  The sections documenting types, commands
and events don't mention them.  Section "Features" and "Configuring
the schema" then provide additional syntax for types, commands and
events.  I hate that.  Fix the sections documenting types, commands
and events to provide accurate syntax, and point to "Features" and
"Configuring the schema" for details.

We talk about "(top-level) expressions other than include and pragma".
Adopt more convenient terminology: a (top-level) expression is either
a directive (include or pragma) or a definition (anything else).

Avoid the terms "dictionary" and "key".  Stick to JSON terminology
"object" and "member name" instead.

While there, make spacing more consistent.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 8d40738d2f60a70aaece8d990a8b95af04e085a2
      
https://github.com/qemu/qemu/commit/8d40738d2f60a70aaece8d990a8b95af04e085a2
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/args-invalid.err
    M tests/qapi-schema/doc-missing.err
    M tests/qapi-schema/doc-no-symbol.err
    M tests/qapi-schema/enum-dict-member-unknown.err
    M tests/qapi-schema/pragma-non-dict.err
    M tests/qapi-schema/struct-data-invalid.err

  Log Message:
  -----------
  qapi: Tweak code to match docs/devel/qapi-code-gen.txt

The previous commit made qapi-code-gen.txt define "(top-level)
expression" as either "directive" or "definition".  The code still
uses "expression" when it really means "definition".  Tidy up.

The previous commit made qapi-code-gen.txt use "object" rather than
"dictionary".  The code still uses "dictionary".  Tidy up.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 137cf6a9be01234e0ef42ced2af8f00d009b3496
      
https://github.com/qemu/qemu/commit/137cf6a9be01234e0ef42ced2af8f00d009b3496
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/Makefile.include
    A tests/qapi-schema/pragma-unknown.err
    A tests/qapi-schema/pragma-unknown.exit
    A tests/qapi-schema/pragma-unknown.json
    A tests/qapi-schema/pragma-unknown.out

  Log Message:
  -----------
  tests/qapi-schema: Cover unknown pragma

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 352ada9ad46a2e67283e8201d8056c27e57c0447
      
https://github.com/qemu/qemu/commit/352ada9ad46a2e67283e8201d8056c27e57c0447
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/Makefile.include
    R tests/qapi-schema/double-data.err
    R tests/qapi-schema/double-data.exit
    R tests/qapi-schema/double-data.json
    R tests/qapi-schema/double-data.out
    M tests/qapi-schema/duplicate-key.json
    R tests/qapi-schema/include-format-err.err
    R tests/qapi-schema/include-format-err.exit
    R tests/qapi-schema/include-format-err.json
    R tests/qapi-schema/include-format-err.out

  Log Message:
  -----------
  tests/qapi-schema: Delete two redundant tests

Tests duplicate-key and double-data test the same thing.  The former
predates the latter, and it has a better name.  Delete the latter, and
tweak the former's comment.

Tests include-format-err and include-extra-junk test the same thing.
The former predates the latter, but the latter has a better name and a
comment.  Delete the former.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: cd346bdc46eb2046d7f744135a7e3d740490d166
      
https://github.com/qemu/qemu/commit/cd346bdc46eb2046d7f744135a7e3d740490d166
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/Makefile.include
    A tests/qapi-schema/flat-union-discriminator-bad-name.err
    A tests/qapi-schema/flat-union-discriminator-bad-name.exit
    A tests/qapi-schema/flat-union-discriminator-bad-name.json
    A tests/qapi-schema/flat-union-discriminator-bad-name.out
    M tests/qapi-schema/flat-union-optional-discriminator.err
    M tests/qapi-schema/flat-union-optional-discriminator.json

  Log Message:
  -----------
  tests/qapi-schema: Demonstrate misleading optional tag error

Test flat-union-optional-discriminator declares its union tag as
'*switch': 'Enum', and points to it with 'discriminator': '*switch'.
This gets rejected as "discriminator of flat union 'MyUnion' uses
invalid name '*switch'".  Correct; member 'discriminator' doesn't
accept a '*' prefix.

However, this merely tests name validity checking, which we already
cover elsewhere.  More interesting is testing the valid name 'switch'.
This reports "discriminator 'switch' is not a member of base struct
'Base'", which is misleading.

Copy the existing 'discriminator': '*switch' test to
flat-union-discriminator-bad-name, and rewrite its comment.  Change
flat-union-optional-discriminator to test 'discriminator': 'switch',
and mark it FIXME.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 31248b985e30801c2676ff448291c2b3d02a1b8c
      
https://github.com/qemu/qemu/commit/31248b985e30801c2676ff448291c2b3d02a1b8c
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/qapi-schema/flat-union-invalid-discriminator.err
    M tests/qapi-schema/flat-union-invalid-discriminator.json
    M tests/qapi-schema/flat-union-invalid-if-discriminator.err
    M tests/qapi-schema/flat-union-invalid-if-discriminator.json

  Log Message:
  -----------
  tests/qapi-schema: Demonstrate broken discriminator errors

When the union definition's base is an object, some error messages
show it as an OrderedDict.  Oops.  Mark FIXME.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: ef91ab0d5fe1a263e9e3cc1d14ea702a0a9f2261
      
https://github.com/qemu/qemu/commit/ef91ab0d5fe1a263e9e3cc1d14ea702a0a9f2261
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/Makefile.include
    A tests/qapi-schema/alternate-branch-if-invalid.err
    A tests/qapi-schema/alternate-branch-if-invalid.exit
    A tests/qapi-schema/alternate-branch-if-invalid.json
    A tests/qapi-schema/alternate-branch-if-invalid.out
    A tests/qapi-schema/features-if-invalid.err
    A tests/qapi-schema/features-if-invalid.exit
    A tests/qapi-schema/features-if-invalid.json
    A tests/qapi-schema/features-if-invalid.out
    A tests/qapi-schema/struct-member-if-invalid.err
    A tests/qapi-schema/struct-member-if-invalid.exit
    A tests/qapi-schema/struct-member-if-invalid.json
    A tests/qapi-schema/struct-member-if-invalid.out
    A tests/qapi-schema/union-branch-if-invalid.err
    A tests/qapi-schema/union-branch-if-invalid.exit
    A tests/qapi-schema/union-branch-if-invalid.json
    A tests/qapi-schema/union-branch-if-invalid.out

  Log Message:
  -----------
  tests/qapi-schema: Demonstrate insufficient 'if' checking

Cover invalid 'if' in struct members, features, union and alternate
branches.  Four out of four are broken.  Mark FIXME.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[Comment typo fixed]


  Commit: 4d42815587063d6e544c4e6a2e3240516f44dcc9
      
https://github.com/qemu/qemu/commit/4d42815587063d6e544c4e6a2e3240516f44dcc9
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M tests/Makefile.include
    M tests/qapi-schema/bad-type-int.json
    A tests/qapi-schema/funny-word.err
    A tests/qapi-schema/funny-word.exit
    A tests/qapi-schema/funny-word.json
    A tests/qapi-schema/funny-word.out

  Log Message:
  -----------
  tests/qapi-schema: Demonstrate suboptimal lexical errors

The error message for forgotten quotes around a name shows just the
name's first character, which isn't as nice as it could be.  Same for
attempting to use a number.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 9f5e6b088a2d0b2b51e1cdf7c86f23f22d9ad493
      
https://github.com/qemu/qemu/commit/9f5e6b088a2d0b2b51e1cdf7c86f23f22d9ad493
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/bad-type-int.err
    M tests/qapi-schema/doc-missing-colon.err
    M tests/qapi-schema/duplicate-key.err
    M tests/qapi-schema/enum-int-member.err
    A tests/qapi-schema/escape-outside-string.err
    M tests/qapi-schema/funny-char.err
    M tests/qapi-schema/funny-word.err
    M tests/qapi-schema/include-before-err.err
    M tests/qapi-schema/include-nested-err.err
    M tests/qapi-schema/leading-comma-list.err
    M tests/qapi-schema/leading-comma-object.err
    M tests/qapi-schema/missing-colon.err
    M tests/qapi-schema/missing-comma-list.err
    M tests/qapi-schema/missing-comma-object.err
    M tests/qapi-schema/non-objects.err
    M tests/qapi-schema/quoted-structural-chars.err
    M tests/qapi-schema/trailing-comma-list.err
    M tests/qapi-schema/unclosed-list.err
    M tests/qapi-schema/unclosed-object.err

  Log Message:
  -----------
  qapi: Use quotes more consistently in frontend error messages

Consistently enclose error messages in double quotes.  Use single
quotes within, except for one case of "'".

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 14c32795024c815316337b019bdf88d76b429af8
      
https://github.com/qemu/qemu/commit/14c32795024c815316337b019bdf88d76b429af8
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/bad-type-int.err
    M tests/qapi-schema/funny-word.err

  Log Message:
  -----------
  qapi: Improve reporting of lexical errors

Show text up to next structural character, whitespace, or quote
character instead of just the first character.

Forgotten quotes now get reported like "Stray 'command'" instead of
"Stray 'c'".

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 9d55380b5aecd4ae5324e7d4ab0a7dfc510b634d
      
https://github.com/qemu/qemu/commit/9d55380b5aecd4ae5324e7d4ab0a7dfc510b634d
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/common.py
    M tests/qapi-schema/features-if-invalid.err
    M tests/qapi-schema/features-if-invalid.exit
    M tests/qapi-schema/features-if-invalid.json
    M tests/qapi-schema/features-if-invalid.out
    M tests/qapi-schema/pragma-name-case-whitelist-crap.json

  Log Message:
  -----------
  qapi: Remove null from schema language

We represent the parse tree as OrderedDict.  We fetch optional dict
members with .get().  So far, so good.

We represent null literals as None.  .get() returns None both for
"absent" and for "present, value is the null literal".  Uh-oh.

Test features-if-invalid exposes this bug: "'if': null" is
misinterpreted as absent "if".

We added null to the schema language to "allow [...] an explicit
default value" (commit e53188ada5 "qapi: Allow true, false and null in
schema json", v2.4.0).  Hasn't happened; null is still unused except
as generic invalid value in tests/.

To fix, we'd have to replace .get() by something more careful, or
represent null differently.  Feasible, but we got more and bigger fish
to fry right now.  Remove the null literal from the schema language.
Replace null in tests by another invalid value.

Test features-if-invalid now behaves as it should.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 887a2069f76fa99b9755467126dd171a9bad34a3
      
https://github.com/qemu/qemu/commit/887a2069f76fa99b9755467126dd171a9bad34a3
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/flat-union-invalid-discriminator.err
    M tests/qapi-schema/flat-union-invalid-discriminator.json
    M tests/qapi-schema/flat-union-invalid-if-discriminator.err
    M tests/qapi-schema/flat-union-invalid-if-discriminator.json
    M tests/qapi-schema/flat-union-optional-discriminator.err
    M tests/qapi-schema/union-base-empty.err

  Log Message:
  -----------
  qapi: Fix broken discriminator error messages

check_union() checks the discriminator exists in base and makes sense.
Two error messages mention the base.  These are broken for anonymous
bases, as demonstrated by tests flat-union-invalid-discriminator and
flat-union-invalid-if-discriminator.err.  The third one doesn't
bother.

First broken when commit ac4338f8eb "qapi: Allow anonymous base for
flat union" (v2.6.0) neglected to adjust the "not a member of base"
error message.  Commit ccadd6bcba "qapi: Add 'if' to implicit struct
members" (v4.0.0) then cloned the flawed error message.

Dumb them down not to mention the base.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: c2c7065e1752a3be1b437d1ea359cde35d28ee3b
      
https://github.com/qemu/qemu/commit/c2c7065e1752a3be1b437d1ea359cde35d28ee3b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/bad-if-list.err
    M tests/qapi-schema/bad-if-list.json

  Log Message:
  -----------
  qapi: Reject blank 'if' conditions in addition to empty ones

"'if': 'COND'" generates "#if COND".  We reject empty COND because it
won't compile.  Blank COND won't compile any better, so reject that,
too.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: dec0012ef8d644b5dde1b68ee8dab3f8c12e0b6b
      
https://github.com/qemu/qemu/commit/dec0012ef8d644b5dde1b68ee8dab3f8c12e0b6b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py
    M tests/qapi-schema/alternate-branch-if-invalid.err
    M tests/qapi-schema/alternate-branch-if-invalid.exit
    M tests/qapi-schema/alternate-branch-if-invalid.json
    M tests/qapi-schema/alternate-branch-if-invalid.out
    M tests/qapi-schema/struct-member-if-invalid.err
    M tests/qapi-schema/struct-member-if-invalid.exit
    M tests/qapi-schema/struct-member-if-invalid.json
    M tests/qapi-schema/struct-member-if-invalid.out
    M tests/qapi-schema/union-branch-if-invalid.err
    M tests/qapi-schema/union-branch-if-invalid.exit
    M tests/qapi-schema/union-branch-if-invalid.json
    M tests/qapi-schema/union-branch-if-invalid.out

  Log Message:
  -----------
  qapi: Fix missing 'if' checks in struct, union, alternate 'data'

Commit 87adbbffd4..3e270dcacc "qapi: Add 'if' to (implicit
struct|union|alternate) members" (v4.0.0) neglected test coverage, and
promptly failed to check the conditions.  Review fail.

Recent commit "tests/qapi-schema: Demonstrate insufficient 'if'
checking" added test coverage, demonstrating the bug.  Fix it by add
the missing check_if().

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: fe9c4dcf9021f4111f37373bb71ef9e08863c349
      
https://github.com/qemu/qemu/commit/fe9c4dcf9021f4111f37373bb71ef9e08863c349
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Normalize 'if' in check_exprs(), like other sugar

We normalize shorthand to longhand forms in check_expr(): enumeration
values with normalize_enum(), feature values with
normalize_features(), struct members, union branches and alternate
branches with normalize_members().  If conditions are an exception: we
normalize them in QAPISchemaEntity.check() and
QAPISchemaMember.__init(), with listify_cond().  The idea goes back to
commit 2cbc94376e "qapi: pass 'if' condition into QAPISchemaEntity
objects", v3.0.0.

Normalize in check_expr() instead, with new helper normalize_if().

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: dc234189f8d1b129785a5933c15a4b2fb89d7e1b
      
https://github.com/qemu/qemu/commit/dc234189f8d1b129785a5933c15a4b2fb89d7e1b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Simplify check_keys()

check_keys() parameter expr_elem expects a dictionary with keys 'expr'
and 'info'.  Passing the two values separately is simpler, so do that.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 6955397677859ada5a65f430edee8035fb4e4b7c
      
https://github.com/qemu/qemu/commit/6955397677859ada5a65f430edee8035fb4e4b7c
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Clean up around check_known_keys()

All callers pass a dict argument to @keys, except check_keys() passes
a dict's .keys().  Drop .keys() there, and rename parameter @keys to
@value.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: e31fe1266c7daa49bd086c45efeb5af06309c0ef
      
https://github.com/qemu/qemu/commit/e31fe1266c7daa49bd086c45efeb5af06309c0ef
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Delete useless check_exprs() code for simple union kind

Commit bceae7697f "qapi script: support enum type as discriminator in
union" made check_exprs() add the implicit enum types of simple unions
to global @enum_types.  I'm not sure it was needed even then.  It's
certainly not needed now.  Delete it.

discriminator_find_enum_define() and add_name() parameter @implicit
are now dead.  Bury them.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: b1bc31f4b7db07ca7b76de604bef4088be0c18b7
      
https://github.com/qemu/qemu/commit/b1bc31f4b7db07ca7b76de604bef4088be0c18b7
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Fix to .check() empty structs just once

QAPISchemaObjectType.check() does nothing for types that have been
checked already.  Except the "has been checked" predicate is broken
for empty types: self.members is [] then, which isn't true.  The bug
is harmless, but fix it anyway: use self.member is not None instead.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: f9d1743b9b07a27d4f17b3316b5e491e366ddc35
      
https://github.com/qemu/qemu/commit/f9d1743b9b07a27d4f17b3316b5e491e366ddc35
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Fix excessive QAPISchemaEntity.check() recursion

Entity checking goes back to commit ac88219a6c "qapi: New QAPISchema
intermediate representation", v2.5.0.  It's designed to work as
follows: QAPISchema.check() calls .check() for all the schema's
entities.  An entity's .check() recurses into another entity's
.check() only if the C struct generated for the former contains the C
struct generated for the latter (pointers don't count).  This is used
to detect "object contains itself".

There are two instances of this:

* An object's C struct contains its base's C struct

  QAPISchemaObjectType.check() calls self.base.check()

* An object's C struct contains its variants' C structs

  QAPISchemaObjectTypeVariants().check calls v.type.check().  Since
  commit b807a1e1e3 "qapi: Check for QAPI collisions involving variant
  members", v2.6.0.

Thus, only object types can participate in recursion.

QAPISchemaObjectType.check() is made for that: it checks @self when
called the first time, recursing into base and variants, it reports an
"contains itself" error when this recursion reaches an object being
checked, and does nothing it reaches an object that has been checked
already.

The other .check() may safely assume they get called exactly once.

Sadly, this design has since eroded:

* QAPISchemaCommand.check() and QAPISchemaEvent.check() call
  .args_type.check().  Since commit c818408e44 "qapi: Implement boxed
  types for commands/events", v2.7.0.  Harmless, since args_type can
  only be an object type.

* QAPISchemaEntity.check() calls ._ifcond.check() when inheriting the
  condition from another type.  Since commit 4fca21c1b0 qapi: leave
  the ifcond attribute undefined until check(), v3.0.0.  This makes
  simple union wrapper types recurse into the wrapped type (nothing
  else uses this condition inheritance).  The .check() of types used
  as simple union branch type get called multiple times.

* QAPISchemaObjectType.check() calls its super type's .check()
  *before* the conditional handling multiple calls.  Also since commit
  4fca21c1b0.  QAPISchemaObjectType.check()'s guard against multiple
  checking doesn't protect QAPISchemaEntity.check().

* QAPISchemaArrayType.check() calls .element_type.check().  Also since
  commit 4fca21c1b0.  The .check() of types used as array element
  types get called multiple times.

  Commit 56a4689582 "qapi: Fix array first used in a different module"
  (v4.0.0) added more code relying on this .element_type.check().

The absence of explosions suggests the .check() involved happen to be
effectively idempotent.

Fix the unwanted recursion anyway:

* QAPISchemaCommand.check() and QAPISchemaEvent.check() calling
  .args_type.check() is unnecessary.  Delete the calls.

* Fix QAPISchemaObjectType.check() to call its super type's .check()
  after the conditional handling multiple calls.

* A QAPISchemaEntity's .ifcond becomes valid at .check().  This is due
  to arrays and simple unions.

  Most types get ifcond and info passed to their constructor.

  Array types don't: they get it from their element type, which
  becomes known only in .element_type.check().

  The implicit wrapper object types for simple union branches don't:
  they get it from the wrapped type, which might be an array.

  Ditch the idea to set .ifcond in .check().  Instead, turn it into a
  property and compute it on demand.  Safe because it's only used
  after the schema has been checked.

  Most types simply return the ifcond passed to their constructor.

  Array types forward to their .element_type instead, and the wrapper
  types forward to the wrapped type.

* A QAPISchemaEntity's .module becomes valid at .check().  This is
  because computing it needs info and schema.fname, and because array
  types get it from their element type instead.

  Make it a property just like .ifcond.

Additionally, have QAPISchemaEntity.check() assert it gets called at
most once, so the design invariant will stick this time.  Neglecting
that was entirely my fault.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[Commit message tidied up]


  Commit: 56176412e7fcfae1c69e4426d94e856b75358231
      
https://github.com/qemu/qemu/commit/56176412e7fcfae1c69e4426d94e856b75358231
  Author: Markus Armbruster <address@hidden>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Assert .visit() and .check_clash() run only after .check()

Easy since the previous commit provides .checked.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 4142b011cac481356c6d0cf7a9046621a67484af
      
https://github.com/qemu/qemu/commit/4142b011cac481356c6d0cf7a9046621a67484af
  Author: Peter Maydell <address@hidden>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M include/qapi/visitor.h
    M qapi/opts-visitor.c
    M scripts/git.orderfile
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M tests/Makefile.include
    A tests/qapi-schema/alternate-branch-if-invalid.err
    A tests/qapi-schema/alternate-branch-if-invalid.exit
    A tests/qapi-schema/alternate-branch-if-invalid.json
    A tests/qapi-schema/alternate-branch-if-invalid.out
    M tests/qapi-schema/alternate-empty.err
    M tests/qapi-schema/alternate-empty.json
    R tests/qapi-schema/args-boxed-empty.err
    R tests/qapi-schema/args-boxed-empty.exit
    R tests/qapi-schema/args-boxed-empty.json
    R tests/qapi-schema/args-boxed-empty.out
    M tests/qapi-schema/args-invalid.err
    M tests/qapi-schema/bad-if-list.err
    M tests/qapi-schema/bad-if-list.json
    M tests/qapi-schema/bad-type-int.err
    M tests/qapi-schema/bad-type-int.json
    M tests/qapi-schema/doc-missing-colon.err
    M tests/qapi-schema/doc-missing.err
    M tests/qapi-schema/doc-no-symbol.err
    R tests/qapi-schema/double-data.err
    R tests/qapi-schema/double-data.exit
    R tests/qapi-schema/double-data.json
    R tests/qapi-schema/double-data.out
    M tests/qapi-schema/duplicate-key.err
    M tests/qapi-schema/duplicate-key.json
    M tests/qapi-schema/enum-bad-name.err
    M tests/qapi-schema/enum-bad-name.json
    M tests/qapi-schema/enum-clash-member.err
    M tests/qapi-schema/enum-dict-member-unknown.err
    M tests/qapi-schema/enum-int-member.err
    M tests/qapi-schema/enum-member-case.err
    M tests/qapi-schema/escape-outside-string.err
    R tests/qapi-schema/escape-outside-string.exit
    R tests/qapi-schema/escape-outside-string.json
    R tests/qapi-schema/escape-outside-string.out
    R tests/qapi-schema/escape-too-big.err
    R tests/qapi-schema/escape-too-big.exit
    R tests/qapi-schema/escape-too-big.json
    R tests/qapi-schema/escape-too-big.out
    R tests/qapi-schema/escape-too-short.err
    R tests/qapi-schema/escape-too-short.exit
    R tests/qapi-schema/escape-too-short.json
    R tests/qapi-schema/escape-too-short.out
    A tests/qapi-schema/features-if-invalid.err
    A tests/qapi-schema/features-if-invalid.exit
    A tests/qapi-schema/features-if-invalid.json
    A tests/qapi-schema/features-if-invalid.out
    A tests/qapi-schema/flat-union-discriminator-bad-name.err
    A tests/qapi-schema/flat-union-discriminator-bad-name.exit
    A tests/qapi-schema/flat-union-discriminator-bad-name.json
    A tests/qapi-schema/flat-union-discriminator-bad-name.out
    M tests/qapi-schema/flat-union-empty.err
    M tests/qapi-schema/flat-union-empty.json
    M tests/qapi-schema/flat-union-invalid-discriminator.err
    M tests/qapi-schema/flat-union-invalid-discriminator.json
    M tests/qapi-schema/flat-union-invalid-if-discriminator.err
    M tests/qapi-schema/flat-union-invalid-if-discriminator.json
    M tests/qapi-schema/flat-union-optional-discriminator.err
    M tests/qapi-schema/flat-union-optional-discriminator.json
    M tests/qapi-schema/funny-char.err
    A tests/qapi-schema/funny-word.err
    A tests/qapi-schema/funny-word.exit
    A tests/qapi-schema/funny-word.json
    A tests/qapi-schema/funny-word.out
    M tests/qapi-schema/ident-with-escape.err
    M tests/qapi-schema/ident-with-escape.exit
    M tests/qapi-schema/ident-with-escape.json
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/include-before-err.err
    R tests/qapi-schema/include-format-err.err
    R tests/qapi-schema/include-format-err.exit
    R tests/qapi-schema/include-format-err.json
    R tests/qapi-schema/include-format-err.out
    M tests/qapi-schema/include-nested-err.err
    M tests/qapi-schema/leading-comma-list.err
    M tests/qapi-schema/leading-comma-object.err
    M tests/qapi-schema/missing-colon.err
    M tests/qapi-schema/missing-comma-list.err
    M tests/qapi-schema/missing-comma-object.err
    M tests/qapi-schema/non-objects.err
    M tests/qapi-schema/pragma-name-case-whitelist-crap.json
    M tests/qapi-schema/pragma-non-dict.err
    A tests/qapi-schema/pragma-unknown.err
    A tests/qapi-schema/pragma-unknown.exit
    A tests/qapi-schema/pragma-unknown.json
    A tests/qapi-schema/pragma-unknown.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/quoted-structural-chars.err
    A tests/qapi-schema/string-code-point-127.err
    A tests/qapi-schema/string-code-point-127.exit
    A tests/qapi-schema/string-code-point-127.json
    A tests/qapi-schema/string-code-point-127.out
    A tests/qapi-schema/string-code-point-31.err
    A tests/qapi-schema/string-code-point-31.exit
    A tests/qapi-schema/string-code-point-31.json
    A tests/qapi-schema/string-code-point-31.out
    M tests/qapi-schema/struct-data-invalid.err
    A tests/qapi-schema/struct-member-if-invalid.err
    A tests/qapi-schema/struct-member-if-invalid.exit
    A tests/qapi-schema/struct-member-if-invalid.json
    A tests/qapi-schema/struct-member-if-invalid.out
    M tests/qapi-schema/trailing-comma-list.err
    M tests/qapi-schema/unclosed-list.err
    M tests/qapi-schema/unclosed-object.err
    R tests/qapi-schema/unicode-str.err
    R tests/qapi-schema/unicode-str.exit
    R tests/qapi-schema/unicode-str.json
    R tests/qapi-schema/unicode-str.out
    M tests/qapi-schema/union-base-empty.err
    A tests/qapi-schema/union-branch-if-invalid.err
    A tests/qapi-schema/union-branch-if-invalid.exit
    A tests/qapi-schema/union-branch-if-invalid.json
    A tests/qapi-schema/union-branch-if-invalid.out
    M tests/qapi-schema/union-empty.err
    M tests/qapi-schema/union-empty.json
    M tests/qapi-schema/unknown-escape.json
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-09-24' into 
staging

QAPI patches for 2019-09-24

# gpg: Signature made Tue 24 Sep 2019 13:10:36 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Markus Armbruster <address@hidden>" [full]
# gpg:                 aka "Markus Armbruster <address@hidden>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2019-09-24: (37 commits)
  qapi: Assert .visit() and .check_clash() run only after .check()
  qapi: Fix excessive QAPISchemaEntity.check() recursion
  qapi: Fix to .check() empty structs just once
  qapi: Delete useless check_exprs() code for simple union kind
  qapi: Clean up around check_known_keys()
  qapi: Simplify check_keys()
  qapi: Normalize 'if' in check_exprs(), like other sugar
  qapi: Fix missing 'if' checks in struct, union, alternate 'data'
  qapi: Reject blank 'if' conditions in addition to empty ones
  qapi: Fix broken discriminator error messages
  qapi: Remove null from schema language
  qapi: Improve reporting of lexical errors
  qapi: Use quotes more consistently in frontend error messages
  tests/qapi-schema: Demonstrate suboptimal lexical errors
  tests/qapi-schema: Demonstrate insufficient 'if' checking
  tests/qapi-schema: Demonstrate broken discriminator errors
  tests/qapi-schema: Demonstrate misleading optional tag error
  tests/qapi-schema: Delete two redundant tests
  tests/qapi-schema: Cover unknown pragma
  qapi: Tweak code to match docs/devel/qapi-code-gen.txt
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/240ab11fb720...4142b011cac4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]