diff options
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 43fb97e035..e0ca19dbfe 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -1098,3 +1098,10 @@ void qtest_qmp_device_del(const char *id) qobject_unref(response1); qobject_unref(response2); } + +bool qmp_rsp_is_err(QDict *rsp) +{ + QDict *error = qdict_get_qdict(rsp, "error"); + qobject_unref(rsp); + return !!error; +} |