diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-08-06 08:53:43 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-08-16 08:42:06 +0200 |
commit | 88b988c895e3c226e264502cec03e13c34bb8f61 (patch) | |
tree | 4aa07775e66b6c7b69f9dde4c35d77d1871b0634 /tests/libqtest.h | |
parent | e3dc93be1ac46fdb58142383319b783b4c4ce8ca (diff) | |
download | qemu-88b988c895e3c226e264502cec03e13c34bb8f61.zip |
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.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h index 712ac023d6..b92a8070a5 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. */ |