1382d4abdf
The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing parameters, but the qapi qmp_dispatch() code uses QERR_INVALID_PARAMETER_TYPE. Improve qapi code to return QERR_MISSING_PARAMETER where appropriate. Fix expected error message in iotests. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160930095948.3154-4-marcandre.lureau@redhat.com> [Drop incorrect error_setg() from qmp_input_type_any() and qmp_input_type_null()] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
QA output created by 087
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
|
|
|
=== Missing ID and node-name ===
|
|
|
|
Testing:
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "'node-name' must be specified for the root node"}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
|
|
=== Duplicate ID ===
|
|
|
|
Testing: -drive driver=IMGFMT,id=disk,node-name=test-node,file=TEST_DIR/t.IMGFMT
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "node-name=disk is conflicting with a device id"}}
|
|
{"error": {"class": "GenericError", "desc": "Duplicate node name"}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
|
|
=== aio=native without O_DIRECT ===
|
|
|
|
Testing:
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "aio=native was specified, but it requires cache.direct=on, which was not specified."}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
|
|
=== Encrypted image ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
|
|
Testing: -S
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "Use of AES-CBC encrypted IMGFMT images is no longer supported in system emulators"}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
Testing:
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "Use of AES-CBC encrypted IMGFMT images is no longer supported in system emulators"}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
|
|
=== Missing driver ===
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
|
|
Testing: -S
|
|
QMP_VERSION
|
|
{"return": {}}
|
|
{"error": {"class": "GenericError", "desc": "Parameter 'driver' is missing"}}
|
|
{"return": {}}
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
|
|
|
|
*** done
|