aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqtest.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-09-02 13:57:33 +0200
committerThomas Huth <thuth@redhat.com>2020-09-03 12:47:33 +0200
commit3bc1b8ee8cea6823295d161c0313e8441b7321f7 (patch)
tree4a35048416f6e668341d4569179e8c106073d8d2 /tests/qtest/libqtest.c
parent978382b453b0e40cc17a983b8c1676386fd3cc5e (diff)
libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref()
qmp_assert_error_class() does more than just assert: it also unrefs the @rsp argument. Rename to qmp_expect_error_and_unref() to reduce confusion. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200902115733.1229537-1-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r--tests/qtest/libqtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 26f1223642..58f58e1ece 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1359,7 +1359,7 @@ bool qmp_rsp_is_err(QDict *rsp)
return !!error;
}
-void qmp_assert_error_class(QDict *rsp, const char *class)
+void qmp_expect_error_and_unref(QDict *rsp, const char *class)
{
QDict *error = qdict_get_qdict(rsp, "error");