diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-02-28 22:26:55 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-03-07 16:07:47 +0100 |
commit | 53f991520ea866a315ef946deb79e4c92b71fe3d (patch) | |
tree | b1198c3132bf702aebfc79526b60a4e56dc6edd4 /tests/libqtest.c | |
parent | 99dbfd1db1110f579f47b40155b9bf750d2cd6ad (diff) | |
download | qemu-53f991520ea866a315ef946deb79e4c92b71fe3d.zip qemu-53f991520ea866a315ef946deb79e4c92b71fe3d.tar.gz qemu-53f991520ea866a315ef946deb79e4c92b71fe3d.tar.bz2 |
libqtest: Fix qmp() & friends to abort on JSON parse errors
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <1488317230-26248-10-git-send-email-armbru@redhat.com>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 9033c5f..a5c3d2b 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -21,6 +21,7 @@ #include <sys/wait.h> #include <sys/un.h> +#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. */ |