From: Markus Armbruster Date: Tue, 28 Feb 2017 21:26:55 +0000 (+0100) Subject: libqtest: Fix qmp() & friends to abort on JSON parse errors X-Git-Tag: v2.9.0-rc0~14^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53f991520ea866a315ef946deb79e4c92b71fe3d;p=thirdparty%2Fqemu.git libqtest: Fix qmp() & friends to abort on JSON parse errors Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-10-git-send-email-armbru@redhat.com> --- diff --git a/tests/libqtest.c b/tests/libqtest.c index 9033c5f82cc..a5c3d2bf485 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -21,6 +21,7 @@ #include #include +#include "qapi/error.h" #include "qapi/qmp/json-parser.h" #include "qapi/qmp/json-streamer.h" #include "qapi/qmp/qjson.h" @@ -442,7 +443,7 @@ void qmp_fd_sendv(int fd, const char *fmt, va_list ap) * is an array type. */ va_copy(ap_copy, ap); - qobj = qobject_from_jsonv(fmt, &ap_copy, NULL); + qobj = qobject_from_jsonv(fmt, &ap_copy, &error_abort); va_end(ap_copy); /* No need to send anything for an empty QObject. */