qemu-e2k/scripts/qapi
Markus Armbruster 9d55380b5a 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 <armbru@redhat.com>
Message-Id: <20190914153506.2151-10-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2019-09-24 14:07:23 +02:00
..
__init__.py
commands.py qapi: Permit 'boxed' with empty type 2019-09-24 14:07:22 +02:00
common.py qapi: Remove null from schema language 2019-09-24 14:07:23 +02:00
doc.py qapi: Allow documentation for features 2019-06-12 18:35:57 +02:00
events.py qapi: Adjust frontend errors to say enum value, not member 2019-09-24 14:07:22 +02:00
introspect.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00
types.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00
visit.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00