Re: [Qemu-devel] [PATCH v2 4/4] iotests: fix expected error message
- Original Message - > On 09/21/2016 03:10 PM, Marc-André Lureau wrote: > > Missing argument returns a corresponding error message for all types > > now. > > > > The "old" qmp dispatch code didn't return QERR_MISSING_PARAMETER for > > argument structure members (it returned QERR_INVALID_PARAMETER). Only > > for top-level argument it did return QERR_MISSING_PARAMETER. It is > > preferable to have a consistent error for missing fields in inner > > structs as well. > > > > Signed-off-by: Marc-André Lureau> > Reviewed-by: Alberto Garcia > > --- > > tests/qemu-iotests/087.out | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Yes, this looks better. > > If the message is changed earlier in this series, then this should be > squashed into that patch (3/4?); if the message changed as the result of > an earlier commit, the commit message should call out the id at which > the tree was temporarily broken. I checked, it's the previous patch that introduce the change (I wasn't sure given that in alternate case qapi already returned MISSING_PARAMETER), it can be squashed with it.
Re: [Qemu-devel] [PATCH v2 4/4] iotests: fix expected error message
On 09/21/2016 03:10 PM, Marc-André Lureau wrote: > Missing argument returns a corresponding error message for all types > now. > > The "old" qmp dispatch code didn't return QERR_MISSING_PARAMETER for > argument structure members (it returned QERR_INVALID_PARAMETER). Only > for top-level argument it did return QERR_MISSING_PARAMETER. It is > preferable to have a consistent error for missing fields in inner > structs as well. > > Signed-off-by: Marc-André Lureau> Reviewed-by: Alberto Garcia > --- > tests/qemu-iotests/087.out | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Yes, this looks better. If the message is changed earlier in this series, then this should be squashed into that patch (3/4?); if the message changed as the result of an earlier commit, the commit message should call out the id at which the tree was temporarily broken. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
[Qemu-devel] [PATCH v2 4/4] iotests: fix expected error message
Missing argument returns a corresponding error message for all types now. The "old" qmp dispatch code didn't return QERR_MISSING_PARAMETER for argument structure members (it returned QERR_INVALID_PARAMETER). Only for top-level argument it did return QERR_MISSING_PARAMETER. It is preferable to have a consistent error for missing fields in inner structs as well. Signed-off-by: Marc-André LureauReviewed-by: Alberto Garcia --- tests/qemu-iotests/087.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out index a95c4b0..b213db2 100644 --- a/tests/qemu-iotests/087.out +++ b/tests/qemu-iotests/087.out @@ -60,7 +60,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on Testing: -S QMP_VERSION {"return": {}} -{"error": {"class": "GenericError", "desc": "Invalid parameter type for 'driver', expected: string"}} +{"error": {"class": "GenericError", "desc": "Parameter 'driver' is missing"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} -- 2.10.0