aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-06 08:53:27 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-16 08:42:06 +0200
commit6ce80fd80355d29b3ed8c2fa14251a9b8276a86a (patch)
tree6d048a675aaa10b377a5470a4ae94b06084ca679 /tests/libqtest.h
parentbb340eb2387edfc59098bde4caea387c369005b1 (diff)
downloadqemu-6ce80fd80355d29b3ed8c2fa14251a9b8276a86a.zip
qemu-6ce80fd80355d29b3ed8c2fa14251a9b8276a86a.tar.gz
qemu-6ce80fd80355d29b3ed8c2fa14251a9b8276a86a.tar.bz2
qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail()
Commit ab45015a968 "qobject: Let qobject_from_jsonf() fail instead of abort" fails to accomplish its stated aim: the function can still abort due to its use of &error_abort. Its rationale for letting it fail is that all remaining users cope fine with failure. Well, they're just fine with aborting, too; it's what they do on failure. Simply reverting the broken commit would bring back the unfortunate asymmetry between qobject_from_jsonf() and qobject_from_jsonv(): one aborts, the other returns null. So also rename it to qobject_from_jsonf_nofail(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-7-armbru@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index da13ea0..0eff876 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -77,8 +77,8 @@ void qtest_quit(QTestState *s);
* qtest_qmp:
* @s: #QTestState instance to operate on.
* @fmt...: QMP message to send to qemu, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
*
* Sends a QMP message to QEMU and returns the response.
*/
@@ -88,8 +88,8 @@ QDict *qtest_qmp(QTestState *s, const char *fmt, ...);
* qtest_qmp_send:
* @s: #QTestState instance to operate on.
* @fmt...: QMP message to send to qemu, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
*
* Sends a QMP message to QEMU and leaves the response in the stream.
*/
@@ -99,8 +99,8 @@ void qtest_qmp_send(QTestState *s, const char *fmt, ...);
* qtest_qmpv:
* @s: #QTestState instance to operate on.
* @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
* @ap: QMP message arguments
*
* Sends a QMP message to QEMU and returns the response.
@@ -111,8 +111,8 @@ QDict *qtest_qmpv(QTestState *s, const char *fmt, va_list ap);
* qtest_qmp_vsend:
* @s: #QTestState instance to operate on.
* @fmt: QMP message to send to QEMU, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
* @ap: QMP message arguments
*
* Sends a QMP message to QEMU and leaves the response in the stream.
@@ -552,8 +552,8 @@ static inline void qtest_end(void)
/**
* qmp:
* @fmt...: QMP message to send to qemu, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
*
* Sends a QMP message to QEMU and returns the response.
*/
@@ -562,8 +562,8 @@ QDict *qmp(const char *fmt, ...);
/**
* qmp_send:
* @fmt...: QMP message to send to qemu, formatted like
- * qobject_from_jsonf(). See parse_escape() for what's supported
- * after '%'.
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
*
* Sends a QMP message to QEMU and leaves the response in the stream.
*/