summaryrefslogtreecommitdiff
path: root/tests/testutilsqemu.h
diff options
context:
space:
mode:
authorAndrea Bolognani <abologna@redhat.com>2019-03-07 15:54:55 +0100
committerAndrea Bolognani <abologna@redhat.com>2019-03-13 11:07:10 +0100
commit30439c1b81e6e3455d5f01e275f8361ac217461d (patch)
treedfcbaeab9598d0d38e0fd64f2744e4dcc2183972 /tests/testutilsqemu.h
parent6000bd134260d19292441d8d60a2fc2fb5d110f8 (diff)
downloadlibvirt-30439c1b81e6e3455d5f01e275f8361ac217461d.tar.gz
tests: Introduce testQemuCapsIterate()
This function iterates over a directory containing capabilities-related data, extract some useful bits of information from the file name, and calls a user-provided callback. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com>
Diffstat (limited to 'tests/testutilsqemu.h')
-rw-r--r--tests/testutilsqemu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h
index 5ae7f19473..183ce915f1 100644
--- a/tests/testutilsqemu.h
+++ b/tests/testutilsqemu.h
@@ -63,6 +63,14 @@ char *testQemuGetLatestCapsForArch(const char *dirname,
const char *arch,
const char *suffix);
+typedef int (*testQemuCapsIterateCallback)(const char *base,
+ const char *archName,
+ void *opaque);
+int testQemuCapsIterate(const char *dirname,
+ const char *suffix,
+ testQemuCapsIterateCallback callback,
+ void *opaque);
+
# endif
#endif /* LIBVIRT_TESTUTILSQEMU_H */