Statistics
| Branch: | Revision:

root / tests / qapi-schema @ 8cfd0495

Name Size
comments.err 0 Bytes
comments.exit 2 Bytes
comments.json 143 Bytes
comments.out 85 Bytes
empty.err 0 Bytes
empty.exit 2 Bytes
empty.json 0 Bytes
empty.out 9 Bytes
funny-char.err 24 Bytes
funny-char.exit 2 Bytes
funny-char.json 59 Bytes
funny-char.out 0 Bytes
indented-expr.err 0 Bytes
indented-expr.exit 2 Bytes
indented-expr.json 37 Bytes
indented-expr.out 69 Bytes
missing-colon.err 27 Bytes
missing-colon.exit 2 Bytes
missing-colon.json 57 Bytes
missing-colon.out 0 Bytes
missing-comma-list.err 34 Bytes
missing-comma-list.exit 2 Bytes
missing-comma-list.json 57 Bytes
missing-comma-list.out 0 Bytes
missing-comma-object.err 33 Bytes
missing-comma-object.exit 2 Bytes
missing-comma-object.json 57 Bytes
missing-comma-object.out 0 Bytes
non-objects.err 26 Bytes
non-objects.exit 2 Bytes
non-objects.json 13 Bytes
non-objects.out 0 Bytes
qapi-schema-test.err 0 Bytes
qapi-schema-test.exit 2 Bytes
qapi-schema-test.json 2.2 kB
qapi-schema-test.out 3.2 kB
quoted-structural-chars.err 26 Bytes
quoted-structural-chars.exit 2 Bytes
quoted-structural-chars.json 51 Bytes
quoted-structural-chars.out 0 Bytes
test-qapi.py 507 Bytes
trailing-comma-list.err 42 Bytes
trailing-comma-list.exit 2 Bytes
trailing-comma-list.json 59 Bytes
trailing-comma-list.out 0 Bytes
trailing-comma-object.err 30 Bytes
trailing-comma-object.exit 2 Bytes
trailing-comma-object.json 59 Bytes
trailing-comma-object.out 0 Bytes
unclosed-list.err 34 Bytes
unclosed-list.exit 2 Bytes
unclosed-list.json 21 Bytes
unclosed-list.out 0 Bytes
unclosed-object.err 34 Bytes
unclosed-object.exit 2 Bytes
unclosed-object.json 21 Bytes
unclosed-object.out 0 Bytes
unclosed-string.err 38 Bytes
unclosed-string.exit 2 Bytes
unclosed-string.json 23 Bytes
unclosed-string.out 0 Bytes

Latest revisions

# Date Author Comment
3953e3a5 08/20/2013 06:52 pm Laszlo Ersek

OptsVisitor: introduce unit tests, with test cases for range flattening

According to commit 4f193e34
("tests: Use qapi-schema-test.json as schema parser test")
the "tests/qapi-schema/qapi-schema-test.out" file must be updated as well.

Signed-off-by: Laszlo Ersek <>...

9213aa53 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Reject invalid characters in schema file

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

6974ccd5 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix schema parser to check syntax systematically

Fixes at least the following parser bugs:

  • accepts any token in place of a colon
  • treats comma as optional
  • crashes when closing braces or brackets are missing

Signed-off-by: Markus Armbruster <>...

5f3cd2b7 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix diagnosing non-objects at a schema's top-level

Report syntax error instead of crashing.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id: ...

f1a145e1 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Permit comments starting anywhere on the line

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

98626572 07/29/2013 06:37 pm Markus Armbruster

tests: QAPI schema parser tests

The parser handles erroneous input badly. To be improved shortly.

Signed-off-by: Markus Armbruster <>
Message-id:
Signed-off-by: Anthony Liguori <>

4f193e34 07/29/2013 06:37 pm Markus Armbruster

tests: Use qapi-schema-test.json as schema parser test

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

c7a3f252 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Restructure lexer and parser

The parser has a rather unorthodox structure:

Until EOF:
Read a section:
Generator function get_expr() yields one section after the
other, as a string. An unindented, non-empty line that...
2caba36c 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Decent syntax error reporting

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

View revisions

Also available in: Atom