This website requires JavaScript.
Explore
Help
Sign In
OpenE2K
/
qemu-e2k
Watch
13
Star
4
Fork
0
You've already forked qemu-e2k
Code
Issues
4
Pull Requests
Projects
2
Releases
Activity
fcb6fcf63b
qemu-e2k
/
tests
/
qapi-schema
/
pragma-name-case-whitelist-crap.json
4 lines
96 B
JSON
Raw
Normal View
History
Unescape
Escape
qapi: Have each QAPI schema declare its name rule violations qapi.py has a hardcoded white-list of type names that may violate the rule on use of upper and lower case. Add a new pragma directive 'name-case-whitelist', and use it to replace the hard-coded white-list. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1489582656-31133-7-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-03-15 13:56:55 +01:00
#
'
n
a
m
e
-
c
a
s
e
-
w
h
i
t
e
l
i
s
t
'
m
u
s
t
b
e
l
i
s
t
o
f
s
t
r
i
n
g
s
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-14 17:34:56 +02:00
{
'
p
r
a
g
m
a
'
:
{
'
n
a
m
e
-
c
a
s
e
-
w
h
i
t
e
l
i
s
t
'
:
f
a
l
s
e
}
}
Reference in New Issue
Copy Permalink