tools/ctdb: Pass memory context for returning nodes in parse_nodestring
[Samba/wip.git] / ctdb / libctdb / test / ctdb-test.h
blobc3e548bfaad812ded044e1cda82c73813b7d2855
1 #ifndef __HAVE_CTDB_TEST_H
2 #define __HAVE_CTDB_TEST_H
3 #include <stdlib.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. */
11 extern void *working;
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 */