summaryrefslogtreecommitdiff
path: root/ctdb/tests/src/protocol_basic_test.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-14ctdb-tests: Iterate protocol tests internallyMartin Schwenke1-6/+5
Instead of repeatedly running a test binary. Run time for these tests reduces from ~90s to ~75s. When run under valgrind, the run time for protocol_test_001.sh reduces from ~390s to <1s. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Feb 14 04:32:29 UTC 2022 on sn-devel-184
2019-07-05ctdb-tests: Fix signed/unsigned comparisons by declaring as unsignedMartin Schwenke1-1/+2
Change declarations of variable and parameters, usually loop variables and limits, from int to unsigned int, size_t or uint32_t. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-05ctdb-tests: Separate testing code for basic data typesAmitay Isaacs1-3/+1
This will be used for testing other daemons' protocol code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add padding data type to handle structure paddingAmitay Isaacs1-0/+20
This takes care of alignment sizes, so that it works on both 32-bit and 64-bit architectures. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for struct timevalAmitay Isaacs1-0/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for pid_tAmitay Isaacs1-14/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for a string with lengthAmitay Isaacs1-17/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for a stringAmitay Isaacs1-17/+3
Always return NULL terminated strings. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for fixed size char arrayAmitay Isaacs1-0/+24
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for boolAmitay Isaacs1-0/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for doubleAmitay Isaacs1-16/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for uint64_tAmitay Isaacs1-15/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for uint32_tAmitay Isaacs1-15/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for int32_tAmitay Isaacs1-15/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for uint16_tAmitay Isaacs1-0/+2
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for uint8_tAmitay Isaacs1-0/+4
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-tests: Reorganize protocol testsAmitay Isaacs1-0/+148
This patch splits the protocol tests from: protocol_types_test.c protocol_client_test.c and creates the following files: protocol_common.[ch] - common code for data types protocol_common_ctdb.[ch] - common code for ctdb protocol elements protocol_common_event.[ch] - common code for eventd protocol elements protocol_basic_test.c - basic data types protocol_types_test.c - ctdb data types protocol_ctdb_test.c - ctdb protocol protocol_event_test.c - eventd protocol Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>