Received: from eggs.gnu.org ([2001:4830:134:3::10]:34516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmnqz-0002CL-S4 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 16:10:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmnqx-0001Ez-Fw for qemu-devel@nongnu.org; Wed, 21 Sep 2016 16:10:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmnqx-0001Eo-9y for qemu-devel@nongnu.org; Wed, 21 Sep 2016 16:10:47 -0400 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 22 Sep 2016 00:10:18 +0400 Message-Id: <20160921201018.20957-5-marcandre.lureau@redhat.com> In-Reply-To: <20160921201018.20957-1-marcandre.lureau@redhat.com> References: <20160921201018.20957-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 4/4] iotests: fix expected error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: berto@igalia.com, eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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=C3=A9 Lureau Reviewed-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=3DIMGFMT size=3D134= 217728 encryption=3Don Testing: -S QMP_VERSION {"return": {}} -{"error": {"class": "GenericError", "desc": "Invalid parameter type for = 'driver', expected: string"}} +{"error": {"class": "GenericError", "desc": "Parameter 'driver' is missi= ng"}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "even= t": "SHUTDOWN"} =20 --=20 2.10.0