diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-07-11 02:16:24 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-09-01 08:52:07 +0200 |
commit | dfa87862fb3f2c17094bb8ac921b369c344c556d (patch) | |
tree | fd2ea72dda9f194f3c82357750bc0b4967b1b8fd /ctdb/tests/src | |
parent | 164d65ace283188d00224dd1e001b8776d393fd8 (diff) | |
download | samba-dfa87862fb3f2c17094bb8ac921b369c344c556d.tar.gz |
ctdb-protocol: Drop struct ctdb_event_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tests/src')
-rw-r--r-- | ctdb/tests/src/protocol_common_event.c | 13 | ||||
-rw-r--r-- | ctdb/tests/src/protocol_common_event.h | 4 | ||||
-rw-r--r-- | ctdb/tests/src/protocol_event_test.c | 31 |
3 files changed, 0 insertions, 48 deletions
diff --git a/ctdb/tests/src/protocol_common_event.c b/ctdb/tests/src/protocol_common_event.c index 6c71802aec2..891af8d29bd 100644 --- a/ctdb/tests/src/protocol_common_event.c +++ b/ctdb/tests/src/protocol_common_event.c @@ -256,19 +256,6 @@ void verify_ctdb_event_reply_data(struct ctdb_event_reply_data *r, } } -void fill_ctdb_event_header(struct ctdb_event_header *h) -{ - h->length = rand32(); - h->reqid = rand32(); -} - -void verify_ctdb_event_header(struct ctdb_event_header *h, - struct ctdb_event_header *h2) -{ - assert(h->length == h2->length); - assert(h->reqid == h2->reqid); -} - void fill_ctdb_event_request(TALLOC_CTX *mem_ctx, struct ctdb_event_request *r, uint32_t command) { diff --git a/ctdb/tests/src/protocol_common_event.h b/ctdb/tests/src/protocol_common_event.h index 00bfc736a8e..e0c237c5b33 100644 --- a/ctdb/tests/src/protocol_common_event.h +++ b/ctdb/tests/src/protocol_common_event.h @@ -73,10 +73,6 @@ void fill_ctdb_event_reply_data(TALLOC_CTX *mem_ctx, void verify_ctdb_event_reply_data(struct ctdb_event_reply_data *r, struct ctdb_event_reply_data *r2); -void fill_ctdb_event_header(struct ctdb_event_header *h); -void verify_ctdb_event_header(struct ctdb_event_header *h, - struct ctdb_event_header *h2); - void fill_ctdb_event_request(TALLOC_CTX *mem_ctx, struct ctdb_event_request *r, uint32_t command); void verify_ctdb_event_request(struct ctdb_event_request *r, diff --git a/ctdb/tests/src/protocol_event_test.c b/ctdb/tests/src/protocol_event_test.c index c48fdb12401..46123b4eeea 100644 --- a/ctdb/tests/src/protocol_event_test.c +++ b/ctdb/tests/src/protocol_event_test.c @@ -94,35 +94,6 @@ static void TEST_FUNC(NAME)(uint32_t command) \ talloc_free(mem_ctx); \ } -static void test_ctdb_event_header(void) -{ - TALLOC_CTX *mem_ctx; - size_t buflen, np = 0; - struct ctdb_event_header h, h2; - int ret; - - printf("ctdb_event_header\n"); - fflush(stdout); - - mem_ctx = talloc_new(NULL); - assert(mem_ctx != NULL); - - ctdb_event_header_fill(&h, REQID); - - buflen = ctdb_event_header_len(&h); - assert(buflen < sizeof(BUFFER)); - ctdb_event_header_push(&h, BUFFER, &np); - assert(np == buflen); - np = 0; - ret = ctdb_event_header_pull(BUFFER, buflen, mem_ctx, &h2, &np); - assert(ret == 0); - assert(np == buflen); - - verify_ctdb_event_header(&h, &h2); - - talloc_free(mem_ctx); -} - #define NUM_COMMANDS 5 PROTOCOL_TYPE3_TEST(struct ctdb_event_request_run, ctdb_event_request_run); @@ -157,8 +128,6 @@ int main(int argc, char *argv[]) TEST_FUNC(ctdb_event_reply_status)(); TEST_FUNC(ctdb_event_reply_script_list)(); - test_ctdb_event_header(); - for (command=1; command<=NUM_COMMANDS; command++) { TEST_FUNC(ctdb_event_request_data)(command); } |