From 7949c0e39f7638a85515a1dcbd8bc96d13fca6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 24 Mar 2015 19:33:34 +0100 Subject: qtest: Add qtest_add_data_func() wrapper function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It calls g_test_add_data_func() with a path supplemented by the architecture, like qtest_add_func() does. Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Andreas Färber --- tests/libqtest.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/libqtest.h') diff --git a/tests/libqtest.h b/tests/libqtest.h index e7413d52dc..9281f5c134 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -344,6 +344,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 -- cgit v1.2.1