mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
QAPI patches patches for 2021-05-20
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmCme90SHGFybWJydUBy ZWRoYXQuY29tAAoJEDhwtADrkYZTnIcP/1XUG8dn8jI57s1D4Dq9XUgyFYHAK7oZ gNwY9uzlNWxJLpVQthSuOlUS/9f50/xc7wEoRpuAYR8v+480bpu77FEy6NAD+KH3 yO1iSlHZtivSzNvpLWxj5vGUZE4SOWRyUiEBrBXcwhZ2YCz/FsxtGLK5heCubPQw QFGg70FaFrblZZp6RCUp3O/OLNG93DptrhM7Mcr6XeUOyU884pgSZwodjyoYE8KZ bwiYgppiiydeFexZgyyJ7+IWREAlb/2bOCIgS3bziaQBJHJPAkteRRCt1BKCv4F0 q4blIiF8TsNQ/oqVM0KaX8WsbU2F3Ci4+RWyzJCNHi4Ickf9tcNBJ/RMRiUIOk9U A6zIGhm/L6g8h7ia1avfgqjGmoZIA6lUn1GEhudoQcgagM3hPbrFdZoPLDtfi639 bher5gTPHyVb2B/xpqKEoek2bRKtpIGPdHzoCsvttQuUh787dM7QbPOPJZ8tHrCu uLmRIXg64BZZ7kzSxmrYiN2Z2ptY9+xxmBOds2cm3jO6DjCEC9LEe583Gcn+yf5N MKo72SEv9/ctyXs8CvNtBDjzabltMg7qwJCqmna9r6PdGh2rR6jVMzUWXsZDsc2Z lCrn7srlG4TkeTSr0o7pmqdWjWgr7ryQlbF2Fp2EpZQBh4KyBY21EHs5mOJBp8Mp aSEgdeyO+l9+ =GxcF -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-05-20' into staging QAPI patches patches for 2021-05-20 # gpg: Signature made Thu 20 May 2021 16:10:21 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2021-05-20: qapi/parser: add docstrings qapi/parser: allow 'ch' variable name qapi/parser: Remove superfluous list comprehension qapi/parser: add type hint annotations qapi/parser: Rework _check_pragma_list_of_str as a TypeGuard qapi/parser: Fix token membership tests when token can be None qapi: add must_match helper qapi/parser: Use @staticmethod where appropriate qapi/parser: assert object keys are strings qapi/parser: enforce all top-level expressions must be dict in _parse() qapi/parser: Assert lexer value is a string qapi/parser: factor parsing routine into method qapi/source: Remove line number from QAPISourceInfo initializer qapi: Add test for nonexistent schema file qapi/parser: Don't try to handle file errors Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0b5acf89c1
18 changed files with 209 additions and 81 deletions
|
@ -134,9 +134,11 @@ schemas = [
|
|||
'indented-expr.json',
|
||||
'leading-comma-list.json',
|
||||
'leading-comma-object.json',
|
||||
'missing-array-rsqb.json',
|
||||
'missing-colon.json',
|
||||
'missing-comma-list.json',
|
||||
'missing-comma-object.json',
|
||||
'missing-object-member-element.json',
|
||||
'missing-type.json',
|
||||
'nested-struct-data.json',
|
||||
'nested-struct-data-invalid-dict.json',
|
||||
|
@ -199,11 +201,16 @@ schemas = [
|
|||
'unknown-escape.json',
|
||||
'unknown-expr-key.json',
|
||||
]
|
||||
schemas = files(schemas)
|
||||
|
||||
# Intentionally missing schema file test -- not passed through files():
|
||||
schemas += [meson.current_source_dir() / 'missing-schema.json']
|
||||
|
||||
# Because people may want to use test-qapi.py from the command line, we
|
||||
# are not using the "#! /usr/bin/env python3" trick here. See
|
||||
# docs/devel/build-system.txt
|
||||
test('QAPI schema regression tests', python, args: files('test-qapi.py', schemas),
|
||||
test('QAPI schema regression tests', python,
|
||||
args: files('test-qapi.py') + schemas,
|
||||
env: test_env, suite: ['qapi-schema', 'qapi-frontend'])
|
||||
|
||||
diff = find_program('diff')
|
||||
|
|
1
tests/qapi-schema/missing-array-rsqb.err
Normal file
1
tests/qapi-schema/missing-array-rsqb.err
Normal file
|
@ -0,0 +1 @@
|
|||
missing-array-rsqb.json:1:44: expected '{', '[', string, or boolean
|
1
tests/qapi-schema/missing-array-rsqb.json
Normal file
1
tests/qapi-schema/missing-array-rsqb.json
Normal file
|
@ -0,0 +1 @@
|
|||
['Daisy,', 'Daisy,', 'Give me your answer',
|
0
tests/qapi-schema/missing-array-rsqb.out
Normal file
0
tests/qapi-schema/missing-array-rsqb.out
Normal file
1
tests/qapi-schema/missing-object-member-element.err
Normal file
1
tests/qapi-schema/missing-object-member-element.err
Normal file
|
@ -0,0 +1 @@
|
|||
missing-object-member-element.json:1:8: expected '{', '[', string, or boolean
|
1
tests/qapi-schema/missing-object-member-element.json
Normal file
1
tests/qapi-schema/missing-object-member-element.json
Normal file
|
@ -0,0 +1 @@
|
|||
{'key':
|
0
tests/qapi-schema/missing-object-member-element.out
Normal file
0
tests/qapi-schema/missing-object-member-element.out
Normal file
1
tests/qapi-schema/missing-schema.err
Normal file
1
tests/qapi-schema/missing-schema.err
Normal file
|
@ -0,0 +1 @@
|
|||
can't read schema file 'missing-schema.json': No such file or directory
|
0
tests/qapi-schema/missing-schema.out
Normal file
0
tests/qapi-schema/missing-schema.out
Normal file
|
@ -1 +1 @@
|
|||
non-objects.json:1:1: expected '{'
|
||||
non-objects.json:1: top-level expression must be an object
|
||||
|
|
|
@ -1 +1 @@
|
|||
quoted-structural-chars.json:1:1: expected '{'
|
||||
quoted-structural-chars.json:1: top-level expression must be an object
|
||||
|
|
|
@ -128,9 +128,6 @@ def test_and_diff(test_name, dir_name, update):
|
|||
try:
|
||||
test_frontend(os.path.join(dir_name, test_name + '.json'))
|
||||
except QAPIError as err:
|
||||
if err.info.fname is None:
|
||||
print("%s" % err, file=sys.stderr)
|
||||
return 2
|
||||
errstr = str(err) + '\n'
|
||||
if dir_name:
|
||||
errstr = errstr.replace(dir_name + '/', '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue