aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-07-23 21:22:39 +0200
committerThomas Huth <thuth@redhat.com>2019-08-15 19:24:10 +0200
commit6fc9f3d347aee337421f8afc4d0984294f8ea6c3 (patch)
treecc551dfcc927f02a95c9666d26c87caeded1c4f0 /tests/libqtest.h
parente5758de4e836c3b2edc2befd904651fc6967d74f (diff)
tests/libqtest: Make qmp_assert_success() independent from global_qtest
The normal libqtest library functions should never depend on global_qtest. Pass in the test state via parameter instead. And while we're at it, also rename this function to qtest_qmp_assert_success() to make it clear that it is part of libqtest. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190813093047.27948-7-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index d93144fb74..7833148358 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -666,7 +666,8 @@ static inline void qtest_end(void)
QDict *qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
/**
- * qmp_assert_success:
+ * qtest_qmp_assert_success:
+ * @qts: QTestState instance to operate on
* @fmt...: QMP message to send to qemu, formatted like
* qobject_from_jsonf_nofail(). See parse_escape() for what's
* supported after '%'.
@@ -674,7 +675,8 @@ QDict *qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
* Sends a QMP message to QEMU and asserts that a 'return' key is present in
* the response.
*/
-void qmp_assert_success(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+void qtest_qmp_assert_success(QTestState *qts, const char *fmt, ...)
+ GCC_FMT_ATTR(2, 3);
/*
* qmp_eventwait: