]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qapi: Avoid redundant definition references in error messages
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Sep 2019 13:46:34 +0000 (15:46 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 28 Sep 2019 15:17:32 +0000 (17:17 +0200)
Many error messages refer to the offending definition even though
they're preceded by an "in definition" line.  Rephrase them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190927134639.4284-22-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
53 files changed:
scripts/qapi/common.py
tests/qapi-schema/alternate-array.err
tests/qapi-schema/alternate-base.err
tests/qapi-schema/alternate-empty.err
tests/qapi-schema/alternate-invalid-dict.err
tests/qapi-schema/args-array-empty.err
tests/qapi-schema/args-boxed-anon.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/bad-data.err
tests/qapi-schema/bad-ident.err
tests/qapi-schema/doc-bad-symbol.err
tests/qapi-schema/double-type.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-dict-member-unknown.err
tests/qapi-schema/enum-member-case.err
tests/qapi-schema/enum-missing-data.err
tests/qapi-schema/enum-wrong-data.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-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-discriminator.err
tests/qapi-schema/flat-union-inline-invalid-dict.err
tests/qapi-schema/flat-union-inline.err
tests/qapi-schema/flat-union-no-base.err
tests/qapi-schema/nested-struct-data-invalid-dict.err
tests/qapi-schema/nested-struct-data.err
tests/qapi-schema/reserved-command-q.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/reserved-type-kind.err
tests/qapi-schema/reserved-type-list.err
tests/qapi-schema/returns-array-bad.err
tests/qapi-schema/returns-dict.err
tests/qapi-schema/struct-data-invalid.err
tests/qapi-schema/struct-member-invalid-dict.err
tests/qapi-schema/struct-member-invalid.err
tests/qapi-schema/union-base-no-discriminator.err
tests/qapi-schema/union-branch-case.err
tests/qapi-schema/union-branch-invalid-dict.err
tests/qapi-schema/union-optional-branch.err
tests/qapi-schema/unknown-expr-key.err

index 42b9c2e36b480f06d80e6fbc7d56d1654aaaaea3..81c217cd608092b4921a382080125b594dee24d4 100644 (file)
@@ -657,13 +657,6 @@ valid_name = re.compile(r'^(__[a-zA-Z0-9.-]+_)?'
                         '[a-zA-Z][a-zA-Z0-9_-]*$')
 
 
-def check_name(name, info, source,
-               allow_optional=False, enum_member=False, permit_upper=False):
-    check_name_is_str(name, info, source)
-    check_name_str(name, info, source,
-                   allow_optional, enum_member, permit_upper)
-
-
 def check_name_is_str(name, info, source):
     if not isinstance(name, str):
         raise QAPISemError(info, "%s requires a string name" % source)
@@ -685,10 +678,10 @@ def check_name_str(name, info, source,
     # and 'q_obj_*' implicit type names.
     if not valid_name.match(membername) or \
        c_name(membername, False).startswith('q_'):
-        raise QAPISemError(info, "%s uses invalid name '%s'" % (source, name))
+        raise QAPISemError(info, "%s has an invalid name" % source)
     if not permit_upper and name.lower() != name:
         raise QAPISemError(
-            info, "%s uses uppercase in name '%s'" % (source, name))
+            info, "%s uses uppercase in name" % source)
     assert not membername.startswith('*')
 
 
@@ -696,7 +689,7 @@ def check_defn_name_str(name, info, meta):
     check_name_str(name, info, meta, permit_upper=True)
     if name.endswith('Kind') or name.endswith('List'):
         raise QAPISemError(
-            info, "%s '%s' should not end in '%s'" % (meta, name, name[-4:]))
+            info, "%s name should not end in '%s'" % (meta, name[-4:]))
 
 
 def check_if(expr, info):
@@ -753,42 +746,35 @@ def check_type(value, info, source,
 
     # value is a dictionary, check that each member is okay
     for (key, arg) in value.items():
-        check_name_str(key, info, "member of %s" % source,
+        key_source = "%s member '%s'" % (source, key)
+        check_name_str(key, info, key_source,
                        allow_optional=True, permit_upper=permit_upper)
         if c_name(key, False) == 'u' or c_name(key, False).startswith('has_'):
-            raise QAPISemError(
-                info, "member of %s uses reserved name '%s'" % (source, key))
-        check_known_keys(arg, info, "member '%s' of %s" % (key, source),
-                         ['type'], ['if'])
+            raise QAPISemError(info, "%s uses reserved name" % key_source)
+        check_known_keys(arg, info, key_source, ['type'], ['if'])
         check_if(arg, info)
         normalize_if(arg)
-        check_type(arg['type'], info, "member '%s' of %s" % (key, source),
-                   allow_array=True)
+        check_type(arg['type'], info, key_source, allow_array=True)
 
 
 def check_command(expr, info):
-    name = expr['command']
     args = expr.get('data')
+    rets = expr.get('returns')
     boxed = expr.get('boxed', False)
 
     if boxed and args is None:
         raise QAPISemError(info, "'boxed': true requires 'data'")
-    check_type(args, info, "'data' for command '%s'" % name,
-               allow_dict=not boxed)
-    check_type(expr.get('returns'), info,
-               "'returns' for command '%s'" % name,
-               allow_array=True)
+    check_type(args, info, "'data'", allow_dict=not boxed)
+    check_type(rets, info, "'returns'", allow_array=True)
 
 
 def check_event(expr, info):
-    name = expr['event']
     args = expr.get('data')
     boxed = expr.get('boxed', False)
 
     if boxed and args is None:
         raise QAPISemError(info, "'boxed': true requires 'data'")
-    check_type(args, info, "'data' for event '%s'" % name,
-               allow_dict=not boxed)
+    check_type(args, info, "'data'", allow_dict=not boxed)
 
 
 def check_union(expr, info):
@@ -799,45 +785,34 @@ def check_union(expr, info):
 
     if discriminator is None:   # simple union
         if base is not None:
-            raise QAPISemError(
-                info, "simple union '%s' must not have a base" % name)
+            raise QAPISemError(info, "'base' requires 'discriminator'")
     else:                       # flat union
-        check_type(base, info, "'base' for union '%s'" % name,
-                   allow_dict=name)
+        check_type(base, info, "'base'", allow_dict=name)
         if not base:
-            raise QAPISemError(
-                info, "flat union '%s' must have a base" % name)
-        check_name_is_str(discriminator, info,
-                          "discriminator of flat union '%s'" % name)
+            raise QAPISemError(info, "'discriminator' requires 'base'")
+        check_name_is_str(discriminator, info, "'discriminator'")
 
     for (key, value) in members.items():
-        check_name_str(key, info, "member of union '%s'" % name)
-        check_known_keys(value, info,
-                         "member '%s' of union '%s'" % (key, name),
-                         ['type'], ['if'])
+        source = "'data' member '%s'" % key
+        check_name_str(key, info, source)
+        check_known_keys(value, info, source, ['type'], ['if'])
         check_if(value, info)
         normalize_if(value)
-        check_type(value['type'], info,
-                   "member '%s' of union '%s'" % (key, name),
-                   allow_array=not base)
+        check_type(value['type'], info, source, allow_array=not base)
 
 
 def check_alternate(expr, info):
-    name = expr['alternate']
     members = expr['data']
 
     if len(members) == 0:
-        raise QAPISemError(info,
-                           "alternate '%s' cannot have empty 'data'" % name)
+        raise QAPISemError(info, "'data' must not be empty")
     for (key, value) in members.items():
-        check_name_str(key, info, "member of alternate '%s'" % name)
-        check_known_keys(value, info,
-                         "member '%s' of alternate '%s'" % (key, name),
-                         ['type'], ['if'])
+        source = "'data' member '%s'" % key
+        check_name_str(key, info, source)
+        check_known_keys(value, info, source, ['type'], ['if'])
         check_if(value, info)
         normalize_if(value)
-        check_type(value['type'], info,
-                   "member '%s' of alternate '%s'" % (key, name))
+        check_type(value['type'], info, source)
 
 
 def check_enum(expr, info):
@@ -846,21 +821,21 @@ def check_enum(expr, info):
     prefix = expr.get('prefix')
 
     if not isinstance(members, list):
-        raise QAPISemError(info,
-                           "enum '%s' requires an array for 'data'" % name)
+        raise QAPISemError(info, "'data' must be an array")
     if prefix is not None and not isinstance(prefix, str):
-        raise QAPISemError(info,
-                           "enum '%s' requires a string for 'prefix'" % name)
+        raise QAPISemError(info, "'prefix' must be a string")
 
     permit_upper = name in name_case_whitelist
 
     for member in members:
-        check_known_keys(member, info, "member of enum '%s'" % name,
-                         ['name'], ['if'])
+        source = "'data' member"
+        check_known_keys(member, info, source, ['name'], ['if'])
+        check_name_is_str(member['name'], info, source)
+        source = "%s '%s'" % (source, member['name'])
+        check_name_str(member['name'], info, source,
+                       enum_member=True, permit_upper=permit_upper)
         check_if(member, info)
         normalize_if(member)
-        check_name(member['name'], info, "member of enum '%s'" % name,
-                   enum_member=True, permit_upper=permit_upper)
 
 
 def check_struct(expr, info):
@@ -868,22 +843,21 @@ def check_struct(expr, info):
     members = expr['data']
     features = expr.get('features')
 
-    check_type(members, info, "'data' for struct '%s'" % name,
-               allow_dict=name)
-    check_type(expr.get('base'), info, "'base' for struct '%s'" % name)
+    check_type(members, info, "'data'", allow_dict=name)
+    check_type(expr.get('base'), info, "'base'")
 
     if features:
         if not isinstance(features, list):
-            raise QAPISemError(
-                info, "struct '%s' requires an array for 'features'" % name)
+            raise QAPISemError(info, "'features' must be an array")
         for f in features:
+            source = "'features' member"
             assert isinstance(f, dict)
-            check_known_keys(f, info, "feature of struct %s" % name,
-                             ['name'], ['if'])
-
+            check_known_keys(f, info, source, ['name'], ['if'])
+            check_name_is_str(f['name'], info, source)
+            source = "%s '%s'" % (source, f['name'])
+            check_name_str(f['name'], info, source)
             check_if(f, info)
             normalize_if(f)
-            check_name(f['name'], info, "feature of struct %s" % name)
 
 
 def check_known_keys(value, info, source, required, optional):
@@ -895,24 +869,21 @@ def check_known_keys(value, info, source, required, optional):
     if missing:
         raise QAPISemError(
             info,
-            "key%s %s %s missing from %s"
-            % ('s' if len(missing) > 1 else '', pprint(missing),
-               'are' if len(missing) > 1 else 'is', source))
+            "%s misses key%s %s"
+            % (source, 's' if len(missing) > 1 else '',
+               pprint(missing)))
     allowed = set(required + optional)
     unknown = set(value) - allowed
     if unknown:
         raise QAPISemError(
             info,
-            "unknown key%s %s in %s\nValid keys are %s."
-            % ('s' if len(unknown) > 1 else '', pprint(unknown),
-               source, pprint(allowed)))
+            "%s has unknown key%s %s\nValid keys are %s."
+            % (source, 's' if len(unknown) > 1 else '',
+               pprint(unknown), pprint(allowed)))
 
 
 def check_keys(expr, info, meta, required, optional=[]):
-    name = expr[meta]
-    required = required + [meta]
-    source = "%s '%s'" % (meta, name)
-    check_known_keys(expr, info, source, required, optional)
+    check_known_keys(expr, info, meta, required + [meta], optional)
 
 
 def check_flags(expr, info):
@@ -987,9 +958,7 @@ def check_exprs(exprs):
 
         if doc and doc.symbol != name:
             raise QAPISemError(
-                info,
-                "definition of '%s' follows documentation for '%s'"
-                % (name, doc.symbol))
+                info, "documentation comment is for '%s'" % doc.symbol)
 
         if meta == 'enum':
             check_keys(expr, info, 'enum', ['data'], ['if', 'prefix'])
index a72e4b274dd9aaa62438894f47e706ad6f7ec56f..dfbe3ee99896b69504b6f9b168785100602bddbc 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/alternate-array.json:5: 'data' member 'two' cannot be an array
index 6290665ac2a1b589df155b269b4aa3ceb3f45e74..04cea97e5c5fb1e10960889c66ad1abe1e44281b 100644 (file)
@@ -1,3 +1,3 @@
 tests/qapi-schema/alternate-base.json: In alternate 'Alt':
-tests/qapi-schema/alternate-base.json:4: unknown key 'base' in alternate 'Alt'
+tests/qapi-schema/alternate-base.json:4: alternate has unknown key 'base'
 Valid keys are 'alternate', 'data', 'if'.
index db92d70f10869a0412c0fcd99ef13e7369a25fda..908c309518fc9968fcee57f0159d33eae5a6ca13 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/alternate-empty.json: In alternate 'Alt':
-tests/qapi-schema/alternate-empty.json:2: alternate 'Alt' cannot have empty 'data'
+tests/qapi-schema/alternate-empty.json:2: 'data' must not be empty
index f85b941750edb4fe7ce0c1ebfd2305735e2f12bd..d6a18a294b74a5cacfa85b6cc25670498b65892f 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/alternate-invalid-dict.json:2: 'data' member 'two' misses key 'type'
index fe1480671bf85f53452e8817ce4ba56fda3672ee..c7d367730eea5a61e0dfd259b83204abeb8b1d9d 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/args-array-empty.json:2: 'data' member 'empty': array type must contain single type name
index 27460e6c07a0681241ce912eb2f3ed5879347fa2..5e0c2979b7ce87695fbd991fb7bdcef956ea2c18 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/args-boxed-anon.json:2: 'data' should be a type name
index 212c2076fcb93268c209eee03259516a34419f80..c4971e1399332af77d6212841b9f79f74e729a3d 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/args-invalid.json:1: 'data' should be an object or type name
index 89b8b1ce016d464aad7583c51dc9ffa7f69f39e3..f95ac01372da2a40f01b272eaab72da70e5f8216 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/args-member-array-bad.json:2: 'data' member 'member': array type must contain single type name
index faa8168d362e5ad417a15e2d2e52086e73b1eaa1..3ecd276040c7124e340694113881012680f4d9d8 100644 (file)
@@ -1,2 +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: member of 'data' for command 'no-way-this-will-get-whitelisted' uses uppercase in name 'Arg'
+tests/qapi-schema/args-member-case.json:2: 'data' member 'Arg' uses uppercase in name
index 8ef6bbd2b5b2a0f1ddc9fc7358b41de758616ca3..5227bdce7e9afe7aa7abc2f72ba6556c7795b85e 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/bad-data.json:2: 'data' cannot be an array
index 79d14758ce04c76a07bc86deaed85f7246b313a4..ad38a679c72fd51c6314dd65680fe39552818350 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/bad-ident.json: In struct '*oops':
-tests/qapi-schema/bad-ident.json:2: struct uses invalid name '*oops'
+tests/qapi-schema/bad-ident.json:2: struct has an invalid name
index 205d0ed6192ab2208d9884bfc902771d26ded8e6..b23e99d160aecd3203fd863bddfa4677671fccf6 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/doc-bad-symbol.json:6: documentation comment is for 'food'
index ddb22af638af8db81062662e6371f387fdf0a128..23f88aae99b72df99a1093793fd405d4d2853d7d 100644 (file)
@@ -1,3 +1,3 @@
 tests/qapi-schema/double-type.json: In struct 'bar':
-tests/qapi-schema/double-type.json:2: unknown key 'command' in struct 'bar'
+tests/qapi-schema/double-type.json:2: struct has unknown key 'command'
 Valid keys are 'base', 'data', 'features', 'if', 'struct'.
index 1e59d42fca12afbf8dee85605bb6fb6f09af0af5..2b1b4f98d0d204e4c0c563364d4ade311d6da6a1 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/enum-bad-member.json:2: 'data' member requires a string name
index ed2d608098e0d4849481c0e38cceb0b118820c7a..3273a9808ae54f607cee414248b1a8d000f80c06 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/enum-bad-name.json:3: 'data' member 'not\possible' has an invalid name
index 4f92736e521121dcf8ba1a85ad9a0b3e21cd4654..933e33aa1834b047aa2a17ff0d008d9fc7702450 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/enum-bad-prefix.json:2: 'prefix' must be a string
index 79062729a100a393fbae8117e5022401b735ec6f..5df0236343f9deb45ebb689e54850b2d229c9fd2 100644 (file)
@@ -1,3 +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'
+tests/qapi-schema/enum-dict-member-unknown.json:2: 'data' member has unknown key 'bad-key'
 Valid keys are 'if', 'name'.
index c3c6f8d70938bafe81d9389a961d609003719331..e6b080c6e5603b05d139060f7d519dee3b2ba4c9 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/enum-member-case.json: In enum 'NoWayThisWillGetWhitelisted':
-tests/qapi-schema/enum-member-case.json:4: member of enum 'NoWayThisWillGetWhitelisted' uses uppercase in name 'Value'
+tests/qapi-schema/enum-member-case.json:4: 'data' member 'Value' uses uppercase in name
index ffde1082c3350f70d34ab5f00905135aed28e300..4809b01f34d25b6826fa1c3d3aff09607284b24e 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/enum-missing-data.json: In enum 'MyEnum':
-tests/qapi-schema/enum-missing-data.json:2: key 'data' is missing from enum 'MyEnum'
+tests/qapi-schema/enum-missing-data.json:2: enum misses key 'data'
index ab9af5e995a431dd129ac20962e52a3e05a9a0cc..ad5f0ce46fe46cfa94db11aeb99b9ded3f96657d 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/enum-wrong-data.json:2: 'data' must be an array
index 8bf89b7a3af5191839f09a807f49e88983645f7a..8406c43df716c859e3c94af1a7bf46fcf832f9e8 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/event-member-invalid-dict.json:1: 'data' member 'a' misses key 'type'
index 8900052e834a7ed79e69ba975a886ab8518a9685..1a3254a73cb4868d76e6acafb499e0d11e5a35ac 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/event-nest-struct.json:1: 'data' member 'a' should be a type name
index 2182c3ec752e21643ec5d0b0c8342649deb38493..30deb8b624da26633f29135fbfedfd5ec7a04286 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/features-bad-type.json:1: 'features' member requires a string name
index 8cbf1ef3f0ad7b12b9cd90af82d4f86e364bcc01..b8db328acc58809fe1f9cfc80b30b30f2ea08c63 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/features-missing-name.json:1: 'features' member misses key 'name'
index 19a7b61214b25fa98ee7c65ee73d66e078511a94..86db2c0ea2697102b168310cc959aa88a576d2ba 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/features-name-bad-type.json:1: 'features' member requires a string name
index 28f91824bd711e02a21b059a14700822aaa451a8..e493f8505725cd1b9332de7714fad1c7c7dc3351 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/features-no-list.json:1: 'features' must be an array
index 78e63c8cf7446d16f3d9df40257ce74c422f3d15..22f5dcf4b0c9ccb2668be963663f085130693769 100644 (file)
@@ -1,3 +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
+tests/qapi-schema/features-unknown-key.json:1: 'features' member has unknown key 'colour'
 Valid keys are 'if', 'name'.
index 323d79737ca62e17a6f31d709525518c01429fc4..de07a7b32a102e3e2dc88fff9471a121136363b3 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/flat-union-array-branch.json:8: 'data' member 'value1' cannot be an array
index 27a6c9f3fbf3d78ce95a8af9ad57a8472a3d3309..c1b4209ffdc498675eb4b0393c68bd262baa63be 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/flat-union-bad-discriminator.json:11: 'discriminator' requires a string name
index 85739c27330dfd61fa9eac713f35e60ca30d5930..d353bdd3389ea1976b6399a0407e88bebbbf5fa1 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/flat-union-inline-invalid-dict.json:7: 'data' member 'value1' misses key 'type'
index 33a8d6e3bdbd8745fa97a1fb72fe092bcf0e37dc..95b1e8c1b7bdb7d245b0d232f9fc213fa51ca602 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/flat-union-inline.json:7: 'data' member 'value1' should be a type name
index c84525982458a5275eb3b6b075ebe167c84cd32d..a16f3231f1391082f72b6f20a862a1fea020639f 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/flat-union-no-base.json:9: 'discriminator' requires 'base'
index f2c7a8096ca81fbc5c2950631395ef46cdc4977a..ed42d6323e2cccf7ac5f3b22e66bfb01db571b75 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/nested-struct-data-invalid-dict.json:2: 'data' member 'a' misses key 'type'
index b5e136674c6088af1736a58e1f5beb01e4e2b47e..b0ec410eb7b2944983f5e2f91d030cb93d3ab2e6 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/nested-struct-data.json:2: 'data' member 'a' should be a type name
index 631cb5cdcc9ab516e633ba9ef677523619b1da66..7f65cda02dd80d2c02e578368560de3bc15ece5e 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/reserved-command-q.json: In command 'q-unix':
-tests/qapi-schema/reserved-command-q.json:5: command uses invalid name 'q-unix'
+tests/qapi-schema/reserved-command-q.json:5: command has an invalid name
index d9c0af5a05ada7ed0144c7892d668dc36743c4e6..e202f9ff7b75cbfb709bd5ab4ac7393a2601edb8 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/reserved-enum-q.json:4: 'data' member 'q-Unix' has an invalid name
index 6f405ec2a98a3fe86d5c3272ce7cb5b97e1d788c..c7ad721ad1031ec87a53259a46f298cdf7458422 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/reserved-member-has.json:5: 'data' member 'has-a' uses reserved name
index ece26640051464d6119ea06b2c6eca5d6b339110..04078604fa1b71814aad1af651a5ddf2564323c2 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/reserved-member-q.json:4: 'data' member 'q-unix' has an invalid name
index e812a1e404c118c1fcc8dafd51302d9d18393e4f..2e92c11ba568ed9286a7df6ee77ac0fc4422c18b 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/reserved-member-u.json:7: 'data' member 'u' uses reserved name
index e1d54f0a273ce8aa5f53fea69d7e26ee3fd891fe..da62b48222d266abb0dd16580ea217bd99ee6719 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/reserved-member-underscore.json:4: 'data' member '_oops' has an invalid name
index 8d21479000d9203249eb4ed0a8df86914bbb88b5..f8112cf92e7bb875418064660389ccbb23769760 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/reserved-type-kind.json: In enum 'UnionKind':
-tests/qapi-schema/reserved-type-kind.json:2: enum 'UnionKind' should not end in 'Kind'
+tests/qapi-schema/reserved-type-kind.json:2: enum name should not end in 'Kind'
index 2bdd7d8a06a6be552bc457febe78b1a5f07c7690..c6eee0585cac9b038ae6a4037ff12fa555a9432a 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/reserved-type-list.json: In struct 'FooList':
-tests/qapi-schema/reserved-type-list.json:5: struct 'FooList' should not end in 'List'
+tests/qapi-schema/reserved-type-list.json:5: struct name should not end in 'List'
index 6295ba89c0d1a54ed2bea10f46752b6c5d26ca1f..1b86777d8f53d7e777452b34e8eefa38612eb65f 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/returns-array-bad.json:2: 'returns': array type must contain single type name
index 7329b9526fac6175d901306c52e72b0eaa03ea56..52e4f3ad71f7d51c4a31e4b8b256997eb4f9a7d0 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/returns-dict.json:2: 'returns' should be a type name
index a88754869fd2cb8101a17c9fcec5c674ab52bdfa..aa868bf974d2f4c6ef9032f889122d6a47566ff1 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/struct-data-invalid.json:1: 'data' should be an object or type name
index 0c770bb1e83ca4aeba7737d94dddcc7b48cf9834..46ec991c28162fa1b47fb93f3730f59cf7207d28 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/struct-member-invalid-dict.json:2: 'data' member '*a' misses key 'type'
index e5a19fc8af717c761f8b874a0ca3d862e5d5d88f..92d4973832d5d1df8b456559d57fde7f01797f4a 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/struct-member-invalid.json:1: 'data' member 'a' should be a type name
index 883a98866b7f906936d37f15bb473e51d26fcb4d..f4c16a2c1406f1278eebb61b725f7704d6bc858f 100644 (file)
@@ -1,2 +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
+tests/qapi-schema/union-base-no-discriminator.json:11: 'base' requires 'discriminator'
index f111210281e0fa2cd2417aceac00a17c22bd6756..a0684ae637c938248fca74b31a0b64b24e5b8cc2 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/union-branch-case.json: In union 'Uni':
-tests/qapi-schema/union-branch-case.json:2: member of union 'Uni' uses uppercase in name 'Branch'
+tests/qapi-schema/union-branch-case.json:2: 'data' member 'Branch' uses uppercase in name
index d11a739674c2d09ea287035c9ed52298219d419d..2967cd626026fed5778a91562d4c43ea9b3eb387 100644 (file)
@@ -1,2 +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'
+tests/qapi-schema/union-branch-invalid-dict.json:2: 'data' member 'integer' misses key 'type'
index 8e9b18d7c6e360fd0408bb66636764e553b40c54..9f24274923931df6bbea1a44f28213e51ca5b00e 100644 (file)
@@ -1,2 +1,2 @@
 tests/qapi-schema/union-optional-branch.json: In union 'Union':
-tests/qapi-schema/union-optional-branch.json:2: member of union 'Union' uses invalid name '*a'
+tests/qapi-schema/union-optional-branch.json:2: 'data' member '*a' has an invalid name
index e401efe148622ec302f784da4d1ee61e465cd3ad..be9f99c4ef41b01af89bbc6362f15b8d2c17bb35 100644 (file)
@@ -1,3 +1,3 @@
 tests/qapi-schema/unknown-expr-key.json: In struct 'bar':
-tests/qapi-schema/unknown-expr-key.json:2: unknown keys 'bogus', 'phony' in struct 'bar'
+tests/qapi-schema/unknown-expr-key.json:2: struct has unknown keys 'bogus', 'phony'
 Valid keys are 'base', 'data', 'features', 'if', 'struct'.