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>
This commit is contained in:
Markus Armbruster 2020-09-02 13:57:33 +02:00 committed by Thomas Huth
parent 978382b453
commit 3bc1b8ee8c
6 changed files with 29 additions and 29 deletions

View file

@ -704,13 +704,13 @@ void qtest_qmp_device_del(QTestState *qts, const char *id);
bool qmp_rsp_is_err(QDict *rsp);
/**
* qmp_assert_error_class:
* qmp_expect_error_and_unref:
* @rsp: QMP response to check for error
* @class: an error class
*
* Assert the response has the given error class and discard @rsp.
*/
void qmp_assert_error_class(QDict *rsp, const char *class);
void qmp_expect_error_and_unref(QDict *rsp, const char *class);
/**
* qtest_probe_child: