diff options
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 9a92aa70e4..12d65bd1e6 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -652,6 +652,13 @@ void qtest_add_func(const char *str, void (*fn)) g_free(path); } +void qtest_add_data_func(const char *str, const void *data, void (*fn)) +{ + gchar *path = g_strdup_printf("/%s/%s", qtest_get_arch(), str); + g_test_add_data_func(path, data, fn); + g_free(path); +} + void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size) { const uint8_t *ptr = data; |