aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqos/libqtest.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2021-02-23 14:46:44 +0000
committerKevin Wolf <kwolf@redhat.com>2021-03-08 14:55:19 +0100
commit7a23c523762371fd26a7a9ecfa8f16b64618a1ad (patch)
tree23ad3d2f2b05a905a0b532b643c90df73946713d /tests/qtest/libqos/libqtest.h
parent9fb7bb06986741b7fd8427fac9f22177ca38dcff (diff)
libqtest: add qtest_kill_qemu()
Tests that manage multiple processes may wish to kill QEMU before destroying the QTestState. Expose a function to do that. The vhost-user-blk-test testcase will need this. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210223144653.811468-4-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qtest/libqos/libqtest.h')
-rw-r--r--tests/qtest/libqos/libqtest.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h
index e5f1ec590c..51287b9276 100644
--- a/tests/qtest/libqos/libqtest.h
+++ b/tests/qtest/libqos/libqtest.h
@@ -75,6 +75,17 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args);
QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd);
/**
+ * qtest_kill_qemu:
+ * @s: #QTestState instance to operate on.
+ *
+ * Kill the QEMU process and wait for it to terminate. It is safe to call this
+ * function multiple times. Normally qtest_quit() is used instead because it
+ * also frees QTestState. Use qtest_kill_qemu() when you just want to kill QEMU
+ * and qtest_quit() will be called later.
+ */
+void qtest_kill_qemu(QTestState *s);
+
+/**
* qtest_quit:
* @s: #QTestState instance to operate on.
*