aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-06-20 08:55:29 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-18 11:32:55 -0500
commit1d9358e686125c125b52529fa68baf36aa2d0d09 (patch)
treeef3640b3e4fdbaaca484154e8f0283e7335334e0 /tests/libqtest.h
parentfdd26fca3ce66863e547560fbde1a444fc5d71b7 (diff)
libqtest: New qtest_end() to go with qtest_start()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1371711329-9144-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index 437bda39f3..0f6aade092 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -17,6 +17,7 @@
#ifndef LIBQTEST_H
#define LIBQTEST_H
+#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
@@ -319,6 +320,17 @@ static inline QTestState *qtest_start(const char *args)
}
/**
+ * qtest_end:
+ *
+ * Shut down the QEMU process started by qtest_start().
+ */
+static inline void qtest_end(void)
+{
+ qtest_quit(global_qtest);
+ global_qtest = NULL;
+}
+
+/**
* qmp:
* @fmt...: QMP message to send to qemu
*