aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-06 08:53:43 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-16 08:42:06 +0200
commit88b988c895e3c226e264502cec03e13c34bb8f61 (patch)
tree4aa07775e66b6c7b69f9dde4c35d77d1871b0634 /tests/libqtest.h
parente3dc93be1ac46fdb58142383319b783b4c4ce8ca (diff)
downloadqemu-88b988c895e3c226e264502cec03e13c34bb8f61.zip
qemu-88b988c895e3c226e264502cec03e13c34bb8f61.tar.gz
qemu-88b988c895e3c226e264502cec03e13c34bb8f61.tar.bz2
libqtest: Replace qtest_startf() by qtest_initf()
qtest_init() creates a new QTestState, and leaves @global_qtest alone. qtest_start() additionally assigns it to @global_qtest, but qtest_startf() additionally assigns NULL to @global_qtest. This makes no sense. Replace it by qtest_initf() that works like qtest_init(), i.e. leaves @global_qtest alone. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-23-armbru@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index 712ac02..b92a807 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -22,33 +22,32 @@ typedef struct QTestState QTestState;
extern QTestState *global_qtest;
/**
- * qtest_startf:
+ * qtest_initf:
* @fmt...: Format for creating other arguments to pass to QEMU, formatted
* like sprintf().
*
- * Start QEMU and return the resulting #QTestState (but unlike qtest_start(),
- * #global_qtest is left at NULL).
+ * Convenience wrapper around qtest_start().
*
* Returns: #QTestState instance.
*/
-QTestState *qtest_startf(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+QTestState *qtest_initf(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
/**
- * qtest_vstartf:
+ * qtest_vinitf:
* @fmt: Format for creating other arguments to pass to QEMU, formatted
* like vsprintf().
* @ap: Format arguments.
*
- * Start QEMU and return the resulting #QTestState (but unlike qtest_start(),
- * #global_qtest is left at NULL).
+ * Convenience wrapper around qtest_start().
*
* Returns: #QTestState instance.
*/
-QTestState *qtest_vstartf(const char *fmt, va_list ap) GCC_FMT_ATTR(1, 0);
+QTestState *qtest_vinitf(const char *fmt, va_list ap) GCC_FMT_ATTR(1, 0);
/**
* qtest_init:
- * @extra_args: other arguments to pass to QEMU.
+ * @extra_args: other arguments to pass to QEMU. CAUTION: these
+ * arguments are subject to word splitting and shell evaluation.
*
* Returns: #QTestState instance.
*/