summaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2015-03-24 19:33:34 +0100
committerAndreas Färber <afaerber@suse.de>2015-03-30 19:20:34 +0200
commit7949c0e39f7638a85515a1dcbd8bc96d13fca6de (patch)
treeaa9ba80c5d7cfd74e1d7cbd7877e6e31ad823e82 /tests/libqtest.h
parent53850b8894cfca3cbe405979ba8a55539cd17516 (diff)
downloadqemu-7949c0e39f7638a85515a1dcbd8bc96d13fca6de.tar.gz
qtest: Add qtest_add_data_func() wrapper function
It calls g_test_add_data_func() with a path supplemented by the architecture, like qtest_add_func() does. Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
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 e7413d52dc..9281f5c134 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -345,6 +345,18 @@ const char *qtest_get_arch(void);
void qtest_add_func(const char *str, void (*fn));
/**
+ * qtest_add_data_func:
+ * @str: Test case path.
+ * @data: Test case data
+ * @fn: Test case function
+ *
+ * Add a GTester testcase with the given name, data and function.
+ * The path is prefixed with the architecture under test, as
+ * returned by qtest_get_arch().
+ */
+void qtest_add_data_func(const char *str, const void *data, void (*fn));
+
+/**
* qtest_start:
* @args: other arguments to pass to QEMU
*