summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2018-02-16 17:28:49 +1100
committerAmitay Isaacs <amitay@samba.org>2019-10-24 04:06:42 +0000
commit36f9b4953a8def40681a6f02f6576795a1ba5fbe (patch)
treee87fd2ec069edd900f36bf5c1a7aeab57b27709e /ctdb
parentb71d8cd80f84169bacf2dd1e753e468a305c50ce (diff)
downloadsamba-36f9b4953a8def40681a6f02f6576795a1ba5fbe.tar.gz
ctdb-tests: Add marshalling tests for new control
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/tests/UNIT/cunit/protocol_test_101.sh2
-rw-r--r--ctdb/tests/src/protocol_common_ctdb.c15
-rw-r--r--ctdb/tests/src/protocol_ctdb_test.c2
3 files changed, 17 insertions, 2 deletions
diff --git a/ctdb/tests/UNIT/cunit/protocol_test_101.sh b/ctdb/tests/UNIT/cunit/protocol_test_101.sh
index 36751d4fbe7..a0bf9d08754 100755
--- a/ctdb/tests/UNIT/cunit/protocol_test_101.sh
+++ b/ctdb/tests/UNIT/cunit/protocol_test_101.sh
@@ -2,7 +2,7 @@
. "${TEST_SCRIPTS_DIR}/unit.sh"
-last_control=153
+last_control=154
generate_control_output ()
{
diff --git a/ctdb/tests/src/protocol_common_ctdb.c b/ctdb/tests/src/protocol_common_ctdb.c
index 4aa4cfc5bde..b02976b5d67 100644
--- a/ctdb/tests/src/protocol_common_ctdb.c
+++ b/ctdb/tests/src/protocol_common_ctdb.c
@@ -588,6 +588,12 @@ void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_TUNNEL_DEREGISTER:
break;
+
+ case CTDB_CONTROL_VACUUM_FETCH:
+ cd->data.recbuf = talloc(mem_ctx, struct ctdb_rec_buffer);
+ assert(cd->data.recbuf != NULL);
+ fill_ctdb_rec_buffer(mem_ctx, cd->data.recbuf);
+ break;
}
}
@@ -974,6 +980,10 @@ void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
case CTDB_CONTROL_TUNNEL_DEREGISTER:
break;
+
+ case CTDB_CONTROL_VACUUM_FETCH:
+ verify_ctdb_rec_buffer(cd->data.recbuf, cd2->data.recbuf);
+ break;
}
}
@@ -1368,6 +1378,9 @@ void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_TUNNEL_DEREGISTER:
break;
+ case CTDB_CONTROL_VACUUM_FETCH:
+ break;
+
}
}
@@ -1703,6 +1716,8 @@ void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
case CTDB_CONTROL_TUNNEL_DEREGISTER:
break;
+ case CTDB_CONTROL_VACUUM_FETCH:
+ break;
}
}
diff --git a/ctdb/tests/src/protocol_ctdb_test.c b/ctdb/tests/src/protocol_ctdb_test.c
index 9eb25d96186..3ebf15dff6c 100644
--- a/ctdb/tests/src/protocol_ctdb_test.c
+++ b/ctdb/tests/src/protocol_ctdb_test.c
@@ -284,7 +284,7 @@ PROTOCOL_CTDB4_TEST(struct ctdb_req_dmaster, ctdb_req_dmaster,
PROTOCOL_CTDB4_TEST(struct ctdb_reply_dmaster, ctdb_reply_dmaster,
CTDB_REPLY_DMASTER);
-#define NUM_CONTROLS 154
+#define NUM_CONTROLS 155
PROTOCOL_CTDB2_TEST(struct ctdb_req_control_data, ctdb_req_control_data);
PROTOCOL_CTDB2_TEST(struct ctdb_reply_control_data, ctdb_reply_control_data);