1 #ifndef __HAVE_CTDB_TEST_H
2 #define __HAVE_CTDB_TEST_H
5 /* We hang all libctdb allocations off this talloc tree. */
6 extern void *allocations
;
8 void check_allocations(void);
10 /* Our own working state gets hung off this tree. */
13 /* The ctdb connection; created by 'connect' command. */
14 struct ctdb_connection
*get_ctdb(void);
16 /* Talloc bytes from an fd until EOF. Nul terminate. */
17 void *grab_fd(int fd
, size_t *size
);
19 /* Check the databases are still ok. */
20 void check_databases(void);
22 /* Save and restore databases, in case children do damage. */
23 void *save_databases(void);
24 void restore_databases(void *);
26 struct ctdb_db
*find_db_by_id(unsigned int id
);
28 #endif /* __HAVE_CTDB_TEST_H */