qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

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>

authored by

Peter Xu and committed by
Eric Blake
1a1b11dc 4bebca1e

+14
+1
tests/Makefile.include
··· 523 523 qapi-schema += missing-type.json 524 524 qapi-schema += nested-struct-data.json 525 525 qapi-schema += non-objects.json 526 + qapi-schema += oob-test.json 526 527 qapi-schema += pragma-doc-required-crap.json 527 528 qapi-schema += pragma-extra-junk.json 528 529 qapi-schema += pragma-name-case-whitelist-crap.json
+1
tests/qapi-schema/oob-test.err
··· 1 + tests/qapi-schema/oob-test.json:2: 'allow-oob' of command 'oob-command-1' should only use true value
+1
tests/qapi-schema/oob-test.exit
··· 1 + 1
+2
tests/qapi-schema/oob-test.json
··· 1 + # Check against oob illegal value 2 + { 'command': 'oob-command-1', 'allow-oob': 'some-string' }
tests/qapi-schema/oob-test.out

This is a binary file and will not be displayed.

+3
tests/qapi-schema/qapi-schema-test.json
··· 139 139 { 'command': 'boxed-struct', 'boxed': true, 'data': 'UserDefZero' } 140 140 { 'command': 'boxed-union', 'data': 'UserDefNativeListUnion', 'boxed': true } 141 141 142 + # Smoke test on Out-Of-Band 143 + { 'command': 'an-oob-command', 'allow-oob': true } 144 + 142 145 # For testing integer range flattening in opts-visitor. The following schema 143 146 # corresponds to the option format: 144 147 #
+2
tests/qapi-schema/qapi-schema-test.out
··· 166 166 gen=True success_response=True boxed=True oob=False 167 167 command boxed-union UserDefNativeListUnion -> None 168 168 gen=True success_response=True boxed=True oob=False 169 + command an-oob-command None -> None 170 + gen=True success_response=True boxed=False oob=True 169 171 object UserDefOptions 170 172 member i64: intList optional=True 171 173 member u64: uint64List optional=True
+4
tests/test-qmp-cmds.c
··· 16 16 { 17 17 } 18 18 19 + void qmp_an_oob_command(Error **errp) 20 + { 21 + } 22 + 19 23 Empty2 *qmp_user_def_cmd0(Error **errp) 20 24 { 21 25 return g_new0(Empty2, 1);