All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, berto@igalia.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/4] qapi: return a 'missing parameter' error
Date: Thu, 22 Sep 2016 09:06:51 +0100	[thread overview]
Message-ID: <20160922080651.GD352@redhat.com> (raw)
In-Reply-To: <20160921201018.20957-4-marcandre.lureau@redhat.com>

On Thu, Sep 22, 2016 at 12:10:17AM +0400, Marc-André Lureau wrote:
> 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_INVALID_PARAMETER_TYPE where
> appropriate.

Surely this is meant to say 'return QERR_MISSING_PARAMETER', as
QERR_INVALID_PARAMETER_TYPE is what its already returning.

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Alberto Garcia <berto@igalia.com>
> ---
>  qapi/qmp-input-visitor.c | 73 +++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 56 insertions(+), 17 deletions(-)

There's a pretty detailed unit test for this visitor, which
should be further extended to cover this new behaviour.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2016-09-22  8:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 20:10 [Qemu-devel] [PATCH v2 0/4] qapi: return 'missing parameter' error Marc-André Lureau
2016-09-21 20:10 ` [Qemu-devel] [PATCH v2 1/4] qapi: add assert about root value Marc-André Lureau
2016-09-21 21:05   ` Eric Blake
2016-09-21 20:10 ` [Qemu-devel] [PATCH v2 2/4] qapi: assert list entry has a value Marc-André Lureau
2016-09-21 21:06   ` Eric Blake
2016-09-21 20:10 ` [Qemu-devel] [PATCH v2 3/4] qapi: return a 'missing parameter' error Marc-André Lureau
2016-09-21 21:35   ` Eric Blake
2016-09-22  8:06   ` Daniel P. Berrange [this message]
2016-09-22 12:46   ` Markus Armbruster
2016-09-22 12:58     ` Marc-André Lureau
2016-09-21 20:10 ` [Qemu-devel] [PATCH v2 4/4] iotests: fix expected error message Marc-André Lureau
2016-09-21 21:33   ` Eric Blake
2016-09-21 21:44     ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160922080651.GD352@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.