summaryrefslogtreecommitdiff
path: root/ctdb/libctdb/test/ctdb-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/libctdb/test/ctdb-test.h')
-rw-r--r--ctdb/libctdb/test/ctdb-test.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/ctdb/libctdb/test/ctdb-test.h b/ctdb/libctdb/test/ctdb-test.h
new file mode 100644
index 00000000000..68ab2ea8f39
--- /dev/null
+++ b/ctdb/libctdb/test/ctdb-test.h
@@ -0,0 +1,19 @@
+#ifndef __HAVE_CTDB_TEST_H
+#define __HAVE_CTDB_TEST_H
+#include <stdlib.h>
+
+/* We hang all libctdb allocations off this talloc tree. */
+extern void *allocations;
+
+void check_allocations(void);
+
+/* Our own working state gets hung off this tree. */
+extern void *working;
+
+/* The ctdb connection; created by 'connect' command. */
+struct ctdb_connection *get_ctdb(void);
+
+/* Talloc bytes from an fd until EOF. Nul terminate. */
+void *grab_fd(int fd, size_t *size);
+
+#endif /* __HAVE_CTDB_TEST_H */