qapi: Prefix frontend errors with an "in definition" line
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Sep 2019 13:46:17 +0000 (15:46 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 28 Sep 2019 15:17:18 +0000 (17:17 +0200)
We take pains to include the offending expression in error messages,
e.g.

    tests/qapi-schema/alternate-any.json:2: alternate 'Alt' member 'one' cannot use type 'any'

But not always:

    tests/qapi-schema/enum-if-invalid.json:2: 'if' condition must be a string or a list of strings

Instead of improving them one by one, report the offending expression
whenever it is known, like this:

    tests/qapi-schema/enum-if-invalid.json: In enum 'TestIfEnum':
    tests/qapi-schema/enum-if-invalid.json:2: 'if' condition must be a string or a list of strings

Error messages that mention the offending expression become a bit
redundant, e.g.

    tests/qapi-schema/alternate-any.json: In alternate 'Alt':
    tests/qapi-schema/alternate-any.json:2: alternate 'Alt' member 'one' cannot use type 'any'

I'll take care of that later in this series.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190927134639.4284-5-armbru@redhat.com>

97 files changed:
scripts/qapi/common.py
tests/qapi-schema/alternate-any.err
tests/qapi-schema/alternate-array.err
tests/qapi-schema/alternate-branch-if-invalid.err
tests/qapi-schema/alternate-clash.err
tests/qapi-schema/alternate-conflict-bool-string.err
tests/qapi-schema/alternate-conflict-dict.err
tests/qapi-schema/alternate-conflict-enum-bool.err
tests/qapi-schema/alternate-conflict-enum-int.err
tests/qapi-schema/alternate-conflict-num-string.err
tests/qapi-schema/alternate-conflict-string.err
tests/qapi-schema/alternate-empty.err
tests/qapi-schema/alternate-invalid-dict.err
tests/qapi-schema/alternate-nested.err
tests/qapi-schema/alternate-unknown.err
tests/qapi-schema/args-alternate.err
tests/qapi-schema/args-any.err
tests/qapi-schema/args-array-empty.err
tests/qapi-schema/args-array-unknown.err
tests/qapi-schema/args-boxed-anon.err
tests/qapi-schema/args-boxed-string.err
tests/qapi-schema/args-int.err
tests/qapi-schema/args-invalid.err
tests/qapi-schema/args-member-array-bad.err
tests/qapi-schema/args-member-case.err
tests/qapi-schema/args-member-unknown.err
tests/qapi-schema/args-name-clash.err
tests/qapi-schema/args-union.err
tests/qapi-schema/args-unknown.err
tests/qapi-schema/bad-base.err
tests/qapi-schema/bad-data.err
tests/qapi-schema/base-cycle-direct.err
tests/qapi-schema/base-cycle-indirect.err
tests/qapi-schema/doc-bad-symbol.err
tests/qapi-schema/enum-bad-member.err
tests/qapi-schema/enum-bad-name.err
tests/qapi-schema/enum-bad-prefix.err
tests/qapi-schema/enum-clash-member.err
tests/qapi-schema/enum-dict-member-unknown.err
tests/qapi-schema/enum-if-invalid.err
tests/qapi-schema/enum-member-case.err
tests/qapi-schema/enum-wrong-data.err
tests/qapi-schema/event-boxed-empty.err
tests/qapi-schema/event-member-invalid-dict.err
tests/qapi-schema/event-nest-struct.err
tests/qapi-schema/features-bad-type.err
tests/qapi-schema/features-duplicate-name.err
tests/qapi-schema/features-if-invalid.err
tests/qapi-schema/features-missing-name.err
tests/qapi-schema/features-name-bad-type.err
tests/qapi-schema/features-no-list.err
tests/qapi-schema/features-unknown-key.err
tests/qapi-schema/flat-union-array-branch.err
tests/qapi-schema/flat-union-bad-base.err
tests/qapi-schema/flat-union-bad-discriminator.err
tests/qapi-schema/flat-union-base-any.err
tests/qapi-schema/flat-union-base-union.err
tests/qapi-schema/flat-union-clash-member.err
tests/qapi-schema/flat-union-discriminator-bad-name.err
tests/qapi-schema/flat-union-empty.err
tests/qapi-schema/flat-union-inline-invalid-dict.err
tests/qapi-schema/flat-union-inline.err
tests/qapi-schema/flat-union-int-branch.err
tests/qapi-schema/flat-union-invalid-branch-key.err
tests/qapi-schema/flat-union-invalid-discriminator.err
tests/qapi-schema/flat-union-invalid-if-discriminator.err
tests/qapi-schema/flat-union-no-base.err
tests/qapi-schema/flat-union-optional-discriminator.err
tests/qapi-schema/flat-union-string-discriminator.err
tests/qapi-schema/nested-struct-data-invalid-dict.err
tests/qapi-schema/nested-struct-data.err
tests/qapi-schema/reserved-enum-q.err
tests/qapi-schema/reserved-member-has.err
tests/qapi-schema/reserved-member-q.err
tests/qapi-schema/reserved-member-u.err
tests/qapi-schema/reserved-member-underscore.err
tests/qapi-schema/returns-alternate.err
tests/qapi-schema/returns-array-bad.err
tests/qapi-schema/returns-dict.err
tests/qapi-schema/returns-unknown.err
tests/qapi-schema/returns-whitelist.err
tests/qapi-schema/struct-base-clash-deep.err
tests/qapi-schema/struct-base-clash.err
tests/qapi-schema/struct-data-invalid.err
tests/qapi-schema/struct-member-if-invalid.err
tests/qapi-schema/struct-member-invalid-dict.err
tests/qapi-schema/struct-member-invalid.err
tests/qapi-schema/union-base-empty.err
tests/qapi-schema/union-base-no-discriminator.err
tests/qapi-schema/union-branch-case.err
tests/qapi-schema/union-branch-if-invalid.err
tests/qapi-schema/union-branch-invalid-dict.err
tests/qapi-schema/union-clash-branches.err
tests/qapi-schema/union-empty.err
tests/qapi-schema/union-invalid-base.err
tests/qapi-schema/union-optional-branch.err
tests/qapi-schema/union-unknown.err

index 5843f3eeb2a86b5e70126f54d4b586306decae02..f0e7d5ad347cd608b33df2a1d05e93d3e2cb2bee 100644 (file)
@@ -64,6 +64,12 @@ class QAPISourceInfo(object):
         self.fname = fname
         self.line = line
         self.parent = parent
+        self.defn_meta = None
+        self.defn_name = None
+
+    def set_defn(self, meta, name):
+        self.defn_meta = meta
+        self.defn_name = name
 
     def next_line(self):
         info = copy.copy(self)
@@ -73,6 +79,12 @@ class QAPISourceInfo(object):
     def loc(self):
         return '%s:%d' % (self.fname, self.line)
 
+    def in_defn(self):
+        if self.defn_name:
+            return "%s: In %s '%s':\n" % (self.fname,
+                                          self.defn_meta, self.defn_name)
+        return ''
+
     def include_path(self):
         ret = ''
         parent = self.parent
@@ -82,7 +94,7 @@ class QAPISourceInfo(object):
         return ret
 
     def __str__(self):
-        return self.include_path() + self.loc()
+        return self.include_path() + self.in_defn() + self.loc()
 
 
 class QAPIError(Exception):
@@ -1127,6 +1139,7 @@ def check_exprs(exprs):
         normalize_if(expr)
         name = expr[meta]
         add_name(name, info, meta)
+        info.set_defn(meta, name)
         if doc and doc.symbol != name:
             raise QAPISemError(info, "Definition of '%s' follows documentation"
                                " for '%s'" % (name, doc.symbol))
index aaa0154731074d5c44dad6b8b6629ffb02b2597c..177a11cc1277ad7170fd5eecdd59ed29b06fce07 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-any.json: In alternate 'Alt':
 tests/qapi-schema/alternate-any.json:2: Alternate 'Alt' member 'one' cannot use type 'any'
index 7b930c64abf6baebc4d283e3b2ab99f0ac01139b..f16f266c76a87e9f67ff889ab48d86acf13f5d50 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-array.json: In alternate 'Alt':
 tests/qapi-schema/alternate-array.json:5: Member 'two' of alternate 'Alt' cannot be an array
index f1d6c10e001b12c47b022d1c3ad793de0ccb36f7..8684829aca3570004f4221c7c84f00d30db86cdc 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-branch-if-invalid.json: In alternate 'Alt':
 tests/qapi-schema/alternate-branch-if-invalid.json:2: 'if' condition ' ' makes no sense
index 604d8495eb055dfaaa1562502c7c418c4e691555..426ff6a7c48bed3af64550816a5ccd17292a5164 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-clash.json: In alternate 'Alt1':
 tests/qapi-schema/alternate-clash.json:7: 'a_b' (branch of Alt1) collides with 'a-b' (branch of Alt1)
index e52fee762013dda72c9c0ecaee4935965991a359..edfd36b7ad60f3c6e67b30e170a7443ff2902b01 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-bool-string.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-bool-string.json:2: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index 0f411f4faf5c2c3c8b62c2c83a268b094265b829..61ae93273a36ad246b175e449fb61180f69495ed 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-dict.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-dict.json:6: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index 0dfc00242d850d465c74875ef4a9347619335433..b006d1efbc56446348cca79b26d0af8d85bb9464 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-enum-bool.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-enum-bool.json:4: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index 2cc8e7b9aa42d756e67ddc4569030e9f39b87887..817b5c01913f947317135dd7d40235cee34b54ec 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-enum-int.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-enum-int.json:4: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index 5ba3827dd120edcf4f1876409c52edcc390e318d..abc188e0a6eae9ee1a9cfcd46c51922ac4146572 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-num-string.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-num-string.json:2: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index fe2f188295ba194a816083575aba7677e5716059..77ccd80cd733b47fd1f37494a3dc1468898e0bc6 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-conflict-string.json: In alternate 'Alt':
 tests/qapi-schema/alternate-conflict-string.json:2: Alternate 'Alt' member 'two' can't be distinguished from member 'one'
index 86dbc666ebe182ba71a54c51de3960e6bb1c99e9..9daac031e47a9c3ca0a7649b3bc67d1b1dc84cf2 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-empty.json: In alternate 'Alt':
 tests/qapi-schema/alternate-empty.json:2: Alternate 'Alt' cannot have empty 'data'
index 631d46628e4a1bc778989d41006ff0dd0a44b913..701db8cdcededf5b6c1d28d2f4161d9a680c0e54 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-invalid-dict.json: In alternate 'Alt':
 tests/qapi-schema/alternate-invalid-dict.json:2: Key 'type' is missing from member 'two' of alternate 'Alt'
index 4d1187e60ec0df48eb2e04a943f241e7ca78d372..4ab5328025962632ac653b98aa97c72d7bc80a15 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-nested.json: In alternate 'Alt2':
 tests/qapi-schema/alternate-nested.json:4: Member 'nested' of alternate 'Alt2' cannot use alternate type 'Alt1'
index dea45dc7302d4cc58701edf29290ad11c7cbbce8..5bd473325eaf6ecc683a710ff4a4959fc939a1e2 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/alternate-unknown.json: In alternate 'Alt':
 tests/qapi-schema/alternate-unknown.json:2: Member 'unknown' of alternate 'Alt' uses unknown type 'MissingType'
index 3086eae56b0895c5f8723a48a499aad6732e14a4..915f5d463b8436c0378477675fc189a806df1ac4 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-alternate.json: In command 'oops':
 tests/qapi-schema/args-alternate.json:3: 'data' for command 'oops' cannot use alternate type 'Alt'
index bf9b5e0730bc4db8a051cf7c2d78ca8042279e01..8c4f9aeef4145ff8853274838955c67c6855772e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-any.json: In command 'oops':
 tests/qapi-schema/args-any.json:2: 'data' for command 'oops' cannot use built-in type 'any'
index cb7ed33b3fb5c7956c5991339b0b1699e9ea44f4..fb95f0c4deba60671af71dd86a72f66286059d31 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-array-empty.json: In command 'oops':
 tests/qapi-schema/args-array-empty.json:2: Member 'empty' of 'data' for command 'oops': array type must contain single type name
index cd7a0f98d799a55948dd8f1bc6aff4fe44ca9cb4..c88a5612b26aab6fb1182cd94284778f8a203fd9 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-array-unknown.json: In command 'oops':
 tests/qapi-schema/args-array-unknown.json:2: Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType'
index f24f34521857acf1110b7e0d1ca25dccfc007eda..27460e6c07a0681241ce912eb2f3ed5879347fa2 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-boxed-anon.json: In command 'foo':
 tests/qapi-schema/args-boxed-anon.json:2: 'data' for command 'foo' should be a type name
index d326b48aefd24ae3802acab8063ec305880bf88f..f284406f0f775dfe55df35a2756050e61ba33932 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-boxed-string.json: In command 'foo':
 tests/qapi-schema/args-boxed-string.json:2: 'data' for command 'foo' cannot use built-in type 'str'
index dc1d2504ff8fcf4ea4b31d8cf11a623640fa1375..419268186ecaafaf28605cd283c9694a7108b32f 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-int.json: In command 'oops':
 tests/qapi-schema/args-int.json:2: 'data' for command 'oops' cannot use built-in type 'int'
index bfb2e4133e9fe2e90e6845d14b55f2d04a44ef1c..212c2076fcb93268c209eee03259516a34419f80 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-invalid.json: In command 'foo':
 tests/qapi-schema/args-invalid.json:1: 'data' for command 'foo' should be an object or type name
index 881b4d954f2d317c118797071e0d922cb00251ce..81e1e95523e47339e9cba4b4f3084afefe898239 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-member-array-bad.json: In command 'oops':
 tests/qapi-schema/args-member-array-bad.json:2: Member 'member' of 'data' for command 'oops': array type must contain single type name
index 19c44266015fe291ce2ca3fb98b49eef6e47b6ec..725ba161920920e56a9e0a16366a27548eba0de5 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-member-case.json: In command 'no-way-this-will-get-whitelisted':
 tests/qapi-schema/args-member-case.json:2: 'Arg' (parameter of no-way-this-will-get-whitelisted) should not use uppercase
index f6f82828ce595d00328f63eeba33fdcaae42555f..9d43e54ca94c958cb5c06b2cd5a2d75913d18fb1 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-member-unknown.json: In command 'oops':
 tests/qapi-schema/args-member-unknown.json:2: Member 'member' of 'data' for command 'oops' uses unknown type 'NoSuchType'
index d953e8d241672c6d6ce378d95e53f9c60e3f655b..eeb4e1b4dd98c76c45c29d5d2af87e18a4ad3ec1 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-name-clash.json: In command 'oops':
 tests/qapi-schema/args-name-clash.json:4: 'a_b' (parameter of oops) collides with 'a-b' (parameter of oops)
index f8ad223ddee62310aaa802b7b805dff3554c8654..30a1534b4c88797fd725ed5ebabbf2b19e15644c 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-union.json: In command 'oops':
 tests/qapi-schema/args-union.json:3: 'data' for command 'oops' cannot use union type 'Uni'
index 4d91ec869f9d76e2a17ac025f1b00dcf16f5e4f5..cb835d74896437ca4b551381a377c06a808351af 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/args-unknown.json: In command 'oops':
 tests/qapi-schema/args-unknown.json:2: 'data' for command 'oops' uses unknown type 'NoSuchType'
index 154274bdd3f2678da93b90328976892be6e10503..fdfd288f5ca117b5dd99e6c582a381ffdc4c3f92 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/bad-base.json: In struct 'MyType':
 tests/qapi-schema/bad-base.json:3: 'base' for struct 'MyType' cannot use union type 'Union'
index 8523ac4f46d6bb1984c78ca275edb8b42c179622..8ef6bbd2b5b2a0f1ddc9fc7358b41de758616ca3 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/bad-data.json: In command 'oops':
 tests/qapi-schema/bad-data.json:2: 'data' for command 'oops' cannot be an array
index 9c68f6543d3414c5e02b208b5bcaf2094c8acb64..52c21bc2b8aca6b6e77b9ce33a49dae85e167be4 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/base-cycle-direct.json: In struct 'Loopy':
 tests/qapi-schema/base-cycle-direct.json:2: Object Loopy contains itself
index fc92fe47f82a36df8b0f79253903bc4f5757d205..1f60cd78f6befb3e68c88e48be8128fd081c10f6 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/base-cycle-indirect.json: In struct 'Base1':
 tests/qapi-schema/base-cycle-indirect.json:2: Object Base1 contains itself
index 8472030c7919d84bfacb36df8932aaa348458418..375cdff939d0890850104df308d1382732f86e00 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/doc-bad-symbol.json: In command 'foo':
 tests/qapi-schema/doc-bad-symbol.json:6: Definition of 'foo' follows documentation for 'food'
index 211db9e6fc784e4ce06a24c2e388197dbd1daf80..49e4160dc4cfb0ac4556ecfdb80bea5b4161f468 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-bad-member.json: In enum 'MyEnum':
 tests/qapi-schema/enum-bad-member.json:2: Member of enum 'MyEnum' requires a string name
index 26a09f84ad4169362f7ac3be4d9212818dc3de05..3af7345792399cd14138deefa3030d8f29365034 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-bad-name.json: In enum 'MyEnum':
 tests/qapi-schema/enum-bad-name.json:3: Member of enum 'MyEnum' uses invalid name 'not\possible'
index 399f5f7af5c3d3464d0f1ac756f51dccd2de0b42..383ebaea7e94337c0c4b80184a8ee3efb28e2aec 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-bad-prefix.json: In enum 'MyEnum':
 tests/qapi-schema/enum-bad-prefix.json:2: Enum 'MyEnum' requires a string for 'prefix'
index 8238d2e807c1b6e1a7952a3282db3fc874e10078..26944f5e06212e61671e7bcd956e9e4bb8863570 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-clash-member.json: In enum 'MyEnum':
 tests/qapi-schema/enum-clash-member.json:2: 'one_two' (value of MyEnum) collides with 'one-two' (value of MyEnum)
index 7fd9c032bf6d9d6c0ff3524aa6b783a1433398df..02952f472a2a4c47d2b3c72f0372967b5e21e9ee 100644 (file)
@@ -1,2 +1,3 @@
+tests/qapi-schema/enum-dict-member-unknown.json: In enum 'MyEnum':
 tests/qapi-schema/enum-dict-member-unknown.json:2: Unknown key 'bad-key' in member of enum 'MyEnum'
 Valid keys are 'if', 'name'.
index 54c3cf887bd085318a9c34d9f679835b384b8f7d..db9eb45b25b4ecd8d34dc13c83daffe4b1863a1d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-if-invalid.json: In enum 'TestIfEnum':
 tests/qapi-schema/enum-if-invalid.json:2: 'if' condition must be a string or a list of strings
index 5d689e92d52b71d608df1c1947289e7f827bdf63..f6c872d3bfd27164d0883f6a62bd710424f76ac2 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-member-case.json: In enum 'NoWayThisWillGetWhitelisted':
 tests/qapi-schema/enum-member-case.json:4: 'Value' (value of NoWayThisWillGetWhitelisted) should not use uppercase
index 11b43471cf34a1f028e75b3756fa6eda93d1a36b..4ab0c44e48a036a09b19f203bbecda360002e959 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/enum-wrong-data.json: In enum 'MyEnum':
 tests/qapi-schema/enum-wrong-data.json:2: Enum 'MyEnum' requires an array for 'data'
index 68ec6f2d2bdbd90adfa0c0e2c637faa3792c6485..6ccbdf7b220da8128e9178fa25eec706affbf8c8 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/event-boxed-empty.json: In event 'FOO':
 tests/qapi-schema/event-boxed-empty.json:2: Use of 'boxed' requires 'data'
index 1a57fa29b0b993fa29c4757e2eb33f2b9143be40..9981a48b8174feffa61af5ea3f0e708c21faf068 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/event-member-invalid-dict.json: In event 'EVENT_A':
 tests/qapi-schema/event-member-invalid-dict.json:1: Key 'type' is missing from member 'a' of 'data' for event 'EVENT_A'
index 5a42701b8f2f4164909ced660e891147a1426c28..2dd57f1784891e0e84249b11e208153b753c306e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/event-nest-struct.json: In event 'EVENT_A':
 tests/qapi-schema/event-nest-struct.json:1: Member 'a' of 'data' for event 'EVENT_A' should be a type name
index 5fb95c2f9047dd47f3fc680f100f07ab00fc4ec2..a08485387abb118093b675a6324b3bcb441586ef 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-bad-type.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
index c0a4cccae65ade86d68e2a503995df14f7c5be0d..0ebec8e4b07d846c1f71a129b955d4737ba96deb 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-duplicate-name.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-duplicate-name.json:1: 'foo' (feature of FeatureStruct0) collides with 'foo' (feature of FeatureStruct0)
index 295800b4fc02f940f5bb8b37a6912888d53546ff..90f4119ae7493368047b136d4c83a65cfcedc42d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-if-invalid.json: In struct 'Stru':
 tests/qapi-schema/features-if-invalid.json:2: 'if' condition must be a string or a list of strings
index 4f1d2715aa2b1875b7709ba7a2caa44894041d94..d445936b0ce54686870d7c468528062f720e28ad 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-missing-name.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-missing-name.json:1: Key 'name' is missing from feature of struct FeatureStruct0
index 8a3eecb97299bc275c4b9c344161c61f8899fe8a..cc4bd33e7f6d71f6145fa2713d2df5060420816f 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-name-bad-type.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-name-bad-type.json:1: Feature of struct FeatureStruct0 requires a string name
index 61ed68612bd1a94f16a4dd911720e27ace6ac135..663d9cd15841e544b293b42dc421b3c7374814f6 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/features-no-list.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-no-list.json:1: Struct 'FeatureStruct0' requires an array for 'features'
index a1d693030d97d979659880f9aa95dbe30b6992eb..2aeca4c1a6784eddd8388729c3d97e65df9012ee 100644 (file)
@@ -1,2 +1,3 @@
+tests/qapi-schema/features-unknown-key.json: In struct 'FeatureStruct0':
 tests/qapi-schema/features-unknown-key.json:1: Unknown key 'colour' in feature of struct FeatureStruct0
 Valid keys are 'if', 'name'.
index 8ea91eadb2dfff257adb802d4e09183528943555..13b4e6065858f2767ce8d30175fa8938410fb870 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-array-branch.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-array-branch.json:8: Member 'value1' of union 'TestUnion' cannot be an array
index bee24a217ae52fbe711630d59e53bcaf0d98be14..ae8adc39470c5048f72c9a2bea2a6673865dbaed 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-bad-base.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-bad-base.json:8: 'string' (member of TestTypeA) collides with 'string' (base of TestUnion)
index c38cc8e4dfd6ced3d9a73ed40f86782b01e813b2..9b3746343f850363489dd47ea6d6d4255176c92d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-bad-discriminator.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-bad-discriminator.json:11: Discriminator of flat union 'TestUnion' requires a string name
index 646f1c9cd1168ce8beead3e49bee7448699f6178..039b9a68b947a1111ae8c7481a84541311ef2d21 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-base-any.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-base-any.json:8: 'base' for union 'TestUnion' cannot use built-in type 'any'
index f138395e456a6f30b6ca9dffd1cd9ea1685dbac0..93ab91378f8efe8f1e9f2e6e3d81cdf5a41922d3 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-base-union.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-base-union.json:14: 'base' for union 'TestUnion' cannot use union type 'UnionBase'
index 2adf69755ab82a8efe666320be0ed785ed562e81..48e939db1910f545faafbb1d8047fb6fc871d6ee 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-clash-member.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-clash-member.json:11: 'name' (member of Branch1) collides with 'name' (member of Base)
index 7238d126ca0f86fc976de26c559940d9c8ce3124..72dc328bad4d0e4c3d7547b5ff53c1fef1086233 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-discriminator-bad-name.json: In union 'MyUnion':
 tests/qapi-schema/flat-union-discriminator-bad-name.json:7: Discriminator of flat union 'MyUnion' does not allow optional name '*switch'
index fedbc0d1cfee76ab879efe7c6a924bcf1680aca3..3fa79a6a47940cbb6c250f49ec250b66fe9c5bd9 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-empty.json: In union 'Union':
 tests/qapi-schema/flat-union-empty.json:4: Union 'Union' has no branches
index 9c4c45b7f077aabbb7aee7342a0e3dc332227746..3716c02a9b5bad33136661daba32b08a7b9fa360 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-inline-invalid-dict.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-inline-invalid-dict.json:7: Key 'type' is missing from member 'value1' of union 'TestUnion'
index 2333358d28b7850ddeb1d604d4871e75cecbe2db..0a7a94b03f609cf729a2ed8e83d3959227883cba 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-inline.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-inline.json:7: Member 'value1' of union 'TestUnion' should be a type name
index faf01573b79db7826661c290f3d273848292ef51..075751bcf60ba857a7670ca369086132e1b98572 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-int-branch.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-int-branch.json:8: Member 'value1' of union 'TestUnion' cannot use built-in type 'int'
index ccf72d2dfe2f9c500811cf8bf2723f93467d6f6e..a4d0e3ee661708c2209782d1ae741ea66b4a51f2 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-invalid-branch-key.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-invalid-branch-key.json:13: Discriminator value 'value_wrong' is not found in enum 'TestEnum'
index 495d5a520eb872e43569a0127809b4ccd34d1275..ca9a413dae5994fb0feab0e8a4a20eeb5556b938 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-invalid-discriminator.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-invalid-discriminator.json:10: Discriminator 'enum_wrong' is not a member of 'base'
index cc5c3fb80bf78566a4b46045c8ca79ba72cd7bb9..c06307db980853c9c1b9fb7b76ae791809f0926e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-invalid-if-discriminator.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-invalid-if-discriminator.json:10: The discriminator 'enum1' for union TestUnion must not be conditional
index 841c93b55443eef661e4fb4e1980a7ee12f4d2b1..6e2035495ce9e170de7478d2f945b6c69f9544f9 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-no-base.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-no-base.json:9: Flat union 'TestUnion' must have a base
index 45f5407c34e58ae2d8556be456214aa1e36f953c..db268fffaa38fe7e4fe948b4775e3f6a76c0075e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-optional-discriminator.json: In union 'MyUnion':
 tests/qapi-schema/flat-union-optional-discriminator.json:7: Discriminator 'switch' is not a member of 'base'
index 200016bd5c5099cbfffea604d75ee9839835b475..9bca7082bb2f244047826d5e7fb835ac5a325cf7 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/flat-union-string-discriminator.json: In union 'TestUnion':
 tests/qapi-schema/flat-union-string-discriminator.json:13: Discriminator 'kind' must be of enumeration type
index 5bd364e8d9bb40b12b03c6f8183459ece5e56a8e..4d9c9b491a2045669139a2f7a2fcce16abc6c575 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/nested-struct-data-invalid-dict.json: In command 'foo':
 tests/qapi-schema/nested-struct-data-invalid-dict.json:2: Key 'type' is missing from member 'a' of 'data' for command 'foo'
index da767bade2317b4f41924ffe13ceb2a42ead6c2b..74d44ab111c10160b23cb25e4b344412601d930d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/nested-struct-data.json: In command 'foo':
 tests/qapi-schema/nested-struct-data.json:2: Member 'a' of 'data' for command 'foo' should be a type name
index e1c3480ee227adc41f3a66fb535d3b48a804ee08..e3eecd29dc6aa0d4cddd6193bf5ff5c0418ff226 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/reserved-enum-q.json: In enum 'Foo':
 tests/qapi-schema/reserved-enum-q.json:4: Member of enum 'Foo' uses invalid name 'q-Unix'
index e75577144613cccc031fd515b51e3cb584963d70..2c6d0418db1e0558db2453f3c09a9c68843df04e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/reserved-member-has.json: In command 'oops':
 tests/qapi-schema/reserved-member-has.json:5: Member of 'data' for command 'oops' uses reserved name 'has-a'
index f3d5dd78187759a3b515333e26688760e505ee09..eaabe579bcb39282503e17b5957e24833c9f396a 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/reserved-member-q.json: In struct 'Foo':
 tests/qapi-schema/reserved-member-q.json:4: Member of 'data' for struct 'Foo' uses invalid name 'q-unix'
index 87d42296cc1e3d3f4818c34742ba425b9b9aa84e..b01629da29c4681667bd68d4e4a09b4bab00107d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/reserved-member-u.json: In struct 'Oops':
 tests/qapi-schema/reserved-member-u.json:7: Member of 'data' for struct 'Oops' uses reserved name 'u'
index 65ff0da8ce95ba1e561ebc9d44a01be15b12a9db..6089cc1d3bf50a50738fede3f3f052f4cfe01e8c 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/reserved-member-underscore.json: In struct 'Oops':
 tests/qapi-schema/reserved-member-underscore.json:4: Member of 'data' for struct 'Oops' uses invalid name '_oops'
index dfbb419cac287e386e90fef2addec8f57ce35858..b98cf84cef23bfbf129d3b32682d090f81802491 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/returns-alternate.json: In command 'oops':
 tests/qapi-schema/returns-alternate.json:3: 'returns' for command 'oops' cannot use alternate type 'Alt'
index 138095ccde1cfb056cb088bd6be2b56b43165cab..6295ba89c0d1a54ed2bea10f46752b6c5d26ca1f 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/returns-array-bad.json: In command 'oops':
 tests/qapi-schema/returns-array-bad.json:2: 'returns' for command 'oops': array type must contain single type name
index eb2d0c466158e225da714558d416307eab582bc2..7329b9526fac6175d901306c52e72b0eaa03ea56 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/returns-dict.json: In command 'oops':
 tests/qapi-schema/returns-dict.json:2: 'returns' for command 'oops' should be a type name
index 1f43e3ac9f6116ab2a78b99e468fa7f2fdd432bf..cbece00bd25f3bcfec979dababe41380ab8b029c 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/returns-unknown.json: In command 'oops':
 tests/qapi-schema/returns-unknown.json:2: 'returns' for command 'oops' uses unknown type 'NoSuchType'
index b2ba7a9debaf1fbae813350cfa8b9e2b1ee289f0..1ccd7d8de2415f66322c0b3fc157a20d2efa284d 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/returns-whitelist.json: In command 'no-way-this-will-get-whitelisted':
 tests/qapi-schema/returns-whitelist.json:14: 'returns' for command 'no-way-this-will-get-whitelisted' cannot use built-in type 'int'
index e2d7943f2174e82f7588a0f4bb33ff05d0ba6abb..53e9bb108e965cf7827f8a05d50d09fab9d168ce 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-base-clash-deep.json: In struct 'Sub':
 tests/qapi-schema/struct-base-clash-deep.json:10: 'name' (member of Sub) collides with 'name' (member of Base)
index c52f33d27bf316b3a3ac71234149bca6096dbd3e..bf94eee8b3bc0aa760ed11106e925629a94ca3be 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-base-clash.json: In struct 'Sub':
 tests/qapi-schema/struct-base-clash.json:5: 'name' (member of Sub) collides with 'name' (member of Base)
index 4bf5bcc255bae08f85da33c1a49d7787bdb20fd7..a88754869fd2cb8101a17c9fcec5c674ab52bdfa 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-data-invalid.json: In struct 'foo':
 tests/qapi-schema/struct-data-invalid.json:1: 'data' for struct 'foo' should be an object or type name
index bfd65db97b9e1ed63e7d148d8811ff92b135f702..e8ad02b9fc5099b34a81907516a1eefc9424d1a8 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-member-if-invalid.json: In struct 'Stru':
 tests/qapi-schema/struct-member-if-invalid.json:2: 'if' condition must be a string or a list of strings
index 6a765bc668bfca5c4043c68fd5d3fbab8fe21a54..e8b0ee72e0265783a38e82755d6a610ce53ed406 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-member-invalid-dict.json: In struct 'foo':
 tests/qapi-schema/struct-member-invalid-dict.json:2: Key 'type' is missing from member '*a' of 'data' for struct 'foo'
index 69a326d450e9fbf9c6fb7e5464e99f59a441e485..466c1af1d0ae2c020525e818a299586c75aa66c6 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/struct-member-invalid.json: In struct 'foo':
 tests/qapi-schema/struct-member-invalid.json:1: Member 'a' of 'data' for struct 'foo' should be a type name
index 9453720eded0eecb6a321c4c79dd752712b87315..1e243418196f8f4e22409b359a6fd4f2767f973a 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-base-empty.json: In union 'TestUnion':
 tests/qapi-schema/union-base-empty.json:5: Discriminator 'type' is not a member of 'base'
index 8b7a24260ffa8d900f3ffa73d3af8f5616803be6..fa9343fb8ee87a46c07df11b023a0237f0bcce4c 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-base-no-discriminator.json: In union 'TestUnion':
 tests/qapi-schema/union-base-no-discriminator.json:11: Simple union 'TestUnion' must not have a base
index 11521901d88ef1fe4689d588b5e3e103020ddc29..8e81a2d0b6e953ae0d85a1f3bcce8263bd6ed055 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-branch-case.json: In union 'NoWayThisWillGetWhitelisted':
 tests/qapi-schema/union-branch-case.json:2: 'Branch' (branch of NoWayThisWillGetWhitelisted) should not use uppercase
index 607edee382ec419a07e5f7f2c8193f5df47ad7d7..b49cf9b664d4e4e47ddb8163ba2d04b6cf69cd09 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-branch-if-invalid.json: In union 'Uni':
 tests/qapi-schema/union-branch-if-invalid.json:4: 'if' condition '' makes no sense
index 89f9b36791ba91e0868ad0f7b5c2ef4803277007..5b8b68432c6f9a8e3e468711304aaa3050f6a66e 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-branch-invalid-dict.json: In union 'UnionInvalidBranch':
 tests/qapi-schema/union-branch-invalid-dict.json:2: Key 'type' is missing from member 'integer' of union 'UnionInvalidBranch'
index e5b21135bb8538042e6337e7d0df3124c0298ff9..145efebd9f89079f1762991bdcfca206a59d3a3f 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-clash-branches.json: In union 'TestUnion':
 tests/qapi-schema/union-clash-branches.json:4: 'a_b' (branch of TestUnion) collides with 'a-b' (branch of TestUnion)
index d4241a38a2c450ab8fe700972821d1caadd928b2..75f2fa9f2187e123f7486fb3ba4e577f4ae8ecbc 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-empty.json: In union 'Union':
 tests/qapi-schema/union-empty.json:2: Union 'Union' has no branches
index 03d7b97a93ba94853c8e2a78824f69c8bb25305e..be908709d254efd785151f9e7f903397930dfd9a 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-invalid-base.json: In union 'TestUnion':
 tests/qapi-schema/union-invalid-base.json:8: 'base' for union 'TestUnion' cannot use built-in type 'int'
index 3ada1334dc6317df276ad28648941c29f3826563..09320416adbc9cbd6bb524dc55b61b9dc2401515 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-optional-branch.json: In union 'Union':
 tests/qapi-schema/union-optional-branch.json:2: Member of union 'Union' does not allow optional name '*a'
index 54fe456f9cd850132c752aaaefd81f27183b7826..7c6cabb8cc4393c6c44c5be00964d5593c901df5 100644 (file)
@@ -1 +1,2 @@
+tests/qapi-schema/union-unknown.json: In union 'Union':
 tests/qapi-schema/union-unknown.json:2: Member 'unknown' of union 'Union' uses unknown type 'MissingType'