summaryrefslogtreecommitdiff
path: root/ctdb/tests/src/ctdb_test.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-09-04 13:30:09 +1000
committerAmitay Isaacs <amitay@samba.org>2014-09-10 01:36:14 +0200
commit6336b958d61ba6901edbaddac8bc10539c8f30ab (patch)
tree5a47e2bff22ea937e03215618594b8d4a9bfa349 /ctdb/tests/src/ctdb_test.c
parent6674949317dd4b2c1855571ea378eb6bc3b2e86c (diff)
downloadsamba-6336b958d61ba6901edbaddac8bc10539c8f30ab.tar.gz
ctdb-tests: Add missing declarations caused by #define magic
Some declarations get lost because they basically get #define-d away, so they need to be repeated after the #undef-s. Also, some functions are introduced due the #define-s. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/src/ctdb_test.c')
-rw-r--r--ctdb/tests/src/ctdb_test.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/ctdb/tests/src/ctdb_test.c b/ctdb/tests/src/ctdb_test.c
index 863c486bbed..f4dccbaa340 100644
--- a/ctdb/tests/src/ctdb_test.c
+++ b/ctdb/tests/src/ctdb_test.c
@@ -24,6 +24,7 @@
/* Define our own main() and usage() functions */
#define main(argc, argv) main_foobar(argc, argv)
+int main_foobar(int argc, const char **argv);
#define usage usage_foobar
#endif /* CTDB_TEST_USE_MAIN */
@@ -63,8 +64,9 @@
#undef ctdb_cmdline_client
#undef tevent_context_init
/* This is called in client/ctdb_client.c so needs a declaration... */
+struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev,
+ struct timeval req_timeout);
struct tevent_context *tevent_context_init(TALLOC_CTX *mem_ctx);
-
#include "common/cmdline.c"
#undef ctdb_ctrl_getnodemap
@@ -77,6 +79,33 @@ struct tevent_context *tevent_context_init(TALLOC_CTX *mem_ctx);
#undef ctdb_client_check_message_handlers
#undef ctdb_ctrl_getcapabilities
#undef ctdb_sys_have_ip
+int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
+ struct timeval timeout, uint32_t destnode,
+ TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap);
+int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
+ struct timeval timeout, uint32_t destnode,
+ TALLOC_CTX *mem_ctx,
+ struct ctdb_control_get_ifaces **ifaces);
+int ctdb_ctrl_getpnn(struct ctdb_context *ctdb, struct timeval timeout,
+ uint32_t destnode);
+int ctdb_ctrl_getrecmode(struct ctdb_context *ctdb,
+ TALLOC_CTX *mem_ctx, struct timeval timeout,
+ uint32_t destnode, uint32_t *recmode);
+int ctdb_ctrl_getrecmaster(struct ctdb_context *ctdb,
+ TALLOC_CTX *mem_ctx, struct timeval timeout,
+ uint32_t destnode, uint32_t *recmaster);
+int ctdb_ctrl_getvnnmap(struct ctdb_context *ctdb,
+ struct timeval timeout, uint32_t destnode,
+ TALLOC_CTX *mem_ctx, struct ctdb_vnn_map **vnnmap);
+int ctdb_ctrl_getdbseqnum(struct ctdb_context *ctdb, struct timeval timeout,
+ uint32_t destnode, uint32_t dbid, uint64_t *seqnum);
+int ctdb_client_check_message_handlers(struct ctdb_context *ctdb,
+ uint64_t *ids, uint32_t num,
+ uint8_t *result);
+int ctdb_ctrl_getcapabilities(struct ctdb_context *ctdb,
+ struct timeval timeout, uint32_t destnode,
+ uint32_t *capabilities);
+bool ctdb_sys_have_ip(ctdb_sock_addr *addr);
#undef TIMELIMIT
#include "tools/ctdb_vacuum.c"