tests/qapi-schema: Rename returns-whitelist to returns-bad-type
authorMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 09:40:15 +0000 (10:40 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 21:31:05 +0000 (22:31 +0100)
This test covers returning "bad" types.  Pragma returns-whitelist is
just one aspect.  Naming it returns-whitelist is suboptimal.  Rename
to returns-bad-type.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-19-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qapi-schema/meson.build
tests/qapi-schema/returns-bad-type.err [new file with mode: 0644]
tests/qapi-schema/returns-bad-type.json [new file with mode: 0644]
tests/qapi-schema/returns-bad-type.out [new file with mode: 0644]
tests/qapi-schema/returns-whitelist.err [deleted file]
tests/qapi-schema/returns-whitelist.json [deleted file]
tests/qapi-schema/returns-whitelist.out [deleted file]

index ffc276b765e7b440b979cacde34fa087c3defc27..4e7635f0a80c93472e24becc15858b8767d2b2a4 100644 (file)
@@ -166,9 +166,9 @@ schemas = [
   'reserved-type-list.json',
   'returns-alternate.json',
   'returns-array-bad.json',
+  'returns-bad-type.json',
   'returns-dict.json',
   'returns-unknown.json',
-  'returns-whitelist.json',
   'string-code-point-31.json',
   'string-code-point-127.json',
   'struct-base-clash-deep.json',
diff --git a/tests/qapi-schema/returns-bad-type.err b/tests/qapi-schema/returns-bad-type.err
new file mode 100644 (file)
index 0000000..2c270de
--- /dev/null
@@ -0,0 +1,2 @@
+returns-bad-type.json: In command 'no-way-this-will-get-whitelisted':
+returns-bad-type.json:14: command's 'returns' cannot take array type ['int']
diff --git a/tests/qapi-schema/returns-bad-type.json b/tests/qapi-schema/returns-bad-type.json
new file mode 100644 (file)
index 0000000..da20932
--- /dev/null
@@ -0,0 +1,15 @@
+# we enforce that 'returns' be a dict or array of dict unless whitelisted
+
+{ 'pragma': { 'returns-whitelist': [
+    'human-monitor-command', 'query-tpm-models', 'guest-get-time' ] } }
+
+{ 'command': 'human-monitor-command',
+  'data': {'command-line': 'str', '*cpu-index': 'int'},
+  'returns': 'str' }
+{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
+{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
+{ 'command': 'guest-get-time',
+  'returns': 'int' }
+
+{ 'command': 'no-way-this-will-get-whitelisted',
+  'returns': [ 'int' ] }
diff --git a/tests/qapi-schema/returns-bad-type.out b/tests/qapi-schema/returns-bad-type.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/qapi-schema/returns-whitelist.err b/tests/qapi-schema/returns-whitelist.err
deleted file mode 100644 (file)
index c6e46b9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-returns-whitelist.json: In command 'no-way-this-will-get-whitelisted':
-returns-whitelist.json:14: command's 'returns' cannot take array type ['int']
diff --git a/tests/qapi-schema/returns-whitelist.json b/tests/qapi-schema/returns-whitelist.json
deleted file mode 100644 (file)
index da20932..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# we enforce that 'returns' be a dict or array of dict unless whitelisted
-
-{ 'pragma': { 'returns-whitelist': [
-    'human-monitor-command', 'query-tpm-models', 'guest-get-time' ] } }
-
-{ 'command': 'human-monitor-command',
-  'data': {'command-line': 'str', '*cpu-index': 'int'},
-  'returns': 'str' }
-{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
-{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
-{ 'command': 'guest-get-time',
-  'returns': 'int' }
-
-{ 'command': 'no-way-this-will-get-whitelisted',
-  'returns': [ 'int' ] }
diff --git a/tests/qapi-schema/returns-whitelist.out b/tests/qapi-schema/returns-whitelist.out
deleted file mode 100644 (file)
index e69de29..0000000