diff options
author | Peter Xu <peterx@redhat.com> | 2018-03-26 14:38:59 +0800 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2018-03-27 10:17:45 -0500 |
commit | 1a1b11dc0fb519f6dbc420925bde032e772fd610 (patch) | |
tree | 9ea485a78d0988d595a2a658965d61be0a28f878 /tests/qapi-schema | |
parent | 4bebca1e429a276bf9553dc2221862d2ea23a939 (diff) | |
download | qemu-1a1b11dc0fb519f6dbc420925bde032e772fd610.zip qemu-1a1b11dc0fb519f6dbc420925bde032e772fd610.tar.gz qemu-1a1b11dc0fb519f6dbc420925bde032e772fd610.tar.bz2 |
tests: add oob-test for qapi-schema
It simply tests the new OOB capability, and make sure the QAPISchema can
parse it correctly.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180326063901.27425-7-peterx@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/oob-test.err | 1 | ||||
-rw-r--r-- | tests/qapi-schema/oob-test.exit | 1 | ||||
-rw-r--r-- | tests/qapi-schema/oob-test.json | 2 | ||||
-rw-r--r-- | tests/qapi-schema/oob-test.out | 0 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.json | 3 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.out | 2 |
6 files changed, 9 insertions, 0 deletions
diff --git a/tests/qapi-schema/oob-test.err b/tests/qapi-schema/oob-test.err new file mode 100644 index 0000000..35b60f7 --- /dev/null +++ b/tests/qapi-schema/oob-test.err @@ -0,0 +1 @@ +tests/qapi-schema/oob-test.json:2: 'allow-oob' of command 'oob-command-1' should only use true value diff --git a/tests/qapi-schema/oob-test.exit b/tests/qapi-schema/oob-test.exit new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/qapi-schema/oob-test.exit @@ -0,0 +1 @@ +1 diff --git a/tests/qapi-schema/oob-test.json b/tests/qapi-schema/oob-test.json new file mode 100644 index 0000000..da96359 --- /dev/null +++ b/tests/qapi-schema/oob-test.json @@ -0,0 +1,2 @@ +# Check against oob illegal value +{ 'command': 'oob-command-1', 'allow-oob': 'some-string' } diff --git a/tests/qapi-schema/oob-test.out b/tests/qapi-schema/oob-test.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/qapi-schema/oob-test.out diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index c72dbd8..06e30f4 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -139,6 +139,9 @@ { 'command': 'boxed-struct', 'boxed': true, 'data': 'UserDefZero' } { 'command': 'boxed-union', 'data': 'UserDefNativeListUnion', 'boxed': true } +# Smoke test on Out-Of-Band +{ 'command': 'an-oob-command', 'allow-oob': true } + # For testing integer range flattening in opts-visitor. The following schema # corresponds to the option format: # diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index 4f43370..467577d 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -166,6 +166,8 @@ command boxed-struct UserDefZero -> None gen=True success_response=True boxed=True oob=False command boxed-union UserDefNativeListUnion -> None gen=True success_response=True boxed=True oob=False +command an-oob-command None -> None + gen=True success_response=True boxed=False oob=True object UserDefOptions member i64: intList optional=True member u64: uint64List optional=True |