On 09/18/2015 06:00 AM, Markus Armbruster wrote:
> New convenience function hmp() to facilitate use of
> human-monitor-command in tests.  Use it to simplify its existing uses.
> 
> To blend into existing libqtest code, also add qtest_hmpv() and
> qtest_hmp().  That, and the egregiously verbose GTK-Doc comment format
> make this patch look bigger than it is.
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  tests/drive_del-test.c | 22 ++++++----------------
>  tests/ide-test.c       |  8 ++------
>  tests/libqtest.c       | 35 +++++++++++++++++++++++++++++++++++
>  tests/libqtest.h       | 33 +++++++++++++++++++++++++++++++++
>  4 files changed, 76 insertions(+), 22 deletions(-)
> 


> @@ -774,6 +801,14 @@ void qmp_discard_response(const char *fmt, ...)
>      qtest_qmpv_discard_response(global_qtest, fmt, ap);
>      va_end(ap);
>  }
> +char *hmp(const char *fmt, ...)
> +{
> +    va_list ap;
> +
> +    va_start(ap, fmt);
> +    return qtest_hmpv(global_qtest, fmt, ap);
> +    va_end(ap);

Umm, that isn't quite what you meant :)

With the dead code after return fixed,

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to