1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

1507 Commits

Author SHA1 Message Date
Amitay Isaacs
9d892aeb49 ctdb-tests: Add test templates for eventd protocol elements
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
b9b0c68315 ctdb-tests: Remove unused #defines
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
f02a1a1149 ctdb-protocol: Add marshalling for ctdb_req_keepalive
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
3f2495a4eb ctdb-protocol: Fix marshalling for ctdb_req_message_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
582ebec08e ctdb-protocol: Fix marshalling for ctdb_req_message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
504c486b7d ctdb-protocol: Fix marshalling for ctdb_message_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
955426d47c ctdb-protocol: Fix marshalling for ctdb_reply_control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
bf782343a5 ctdb-protocol: Fix marshalling for ctdb_req_control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
e4fa09fae3 ctdb-protocol: Fix marshalling for ctdb_reply_control_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
c88c317a66 ctdb-protocol: Fix marshalling for ctdb_req_control_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
4c4094cd94 ctdb-protocol: Fix marshalling for ctdb_reply_dmaster
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
dbe16ce002 ctdb-protocol: Fix marshalling for ctdb_req_dmaster
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
5eac715023 ctdb-protocol: Fix marshalling for ctdb_reply_error
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
aad7a3e0be ctdb-protocol: Fix marshalling for ctdb_reply_call
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
abbf6626a3 ctdb-protocol: Fix marshalling for ctdb_req_call
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
97184a8d46 ctdb-protocol: Fix marshalling for ctdb_req_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
b0ce8183ba ctdb-tests: Add compatibility test for ctdb protocol elements
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
a8e50c1b78 ctdb-tests: Add test templates for ctdb protocol elements
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
3f5f61b903 ctdb-protocol: Fix marshalling for ctdb_g_lock_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
0d5cc74a91 ctdb-protocol: Fix marshalling for ctdb_g_lock
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
a0bce37089 ctdb-protocol: Fix marshalling for ctdb_server_id
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
4d8359ada0 ctdb-protocol: Fix marshalling for ctdb_disable_message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
95ae006d5c ctdb-protocol: Fix marshalling for ctdb_srvid_message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
d8309d9548 ctdb-protocol: Fix marshalling for ctdb_election_message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
2abf9c1bdb ctdb-protocol: Fix marshalling for ctdb_db_statistics
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:25 +02:00
Amitay Isaacs
819b6310cb ctdb-protocol: Fix marshalling for ctdb_key_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
132f201fc1 ctdb-protocol: Fix marshalling for ctdb_statistics_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
b03f3b5663 ctdb-protocol: Fix marshalling for ctdb_public_ip_info
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
a8569128f5 ctdb-protocol: Fix marshalling for ctdb_iface_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
1790509bca ctdb-protocol: Fix marshalling for ctdb_iface
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
091ef60ed2 ctdb-protocol: Fix marshalling for ctdb_notify_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
57a4d2e631 ctdb-protocol: Fix marshalling for ctdb_ban_state
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
74eaa0361b ctdb-protocol: Fix marshalling for ctdb_script_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
21171290bd ctdb-protocol: Fix marshalling for ctdb_script
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
85d0825f21 ctdb-protocol: Fix marshalling for ctdb_node_map
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
c060d01b3f ctdb-protocol: Fix marshalling for ctdb_node_and_flags
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
2a8dd02549 ctdb-protocol: Fix marshalling for ctdb_public_ip_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
9e11de448d ctdb-protocol: Fix marshalling for ctdb_public_ip
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
d7c247dd72 ctdb-protocol: Fix marshalling for ctdb_uptime
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:24 +02:00
Amitay Isaacs
e893b46e5e ctdb-protocol: Fix marshalling for ctdb_transdb
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
4d70b972f2 ctdb-protocol: Fix marshalling for ctdb_addr_info
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
bac67e1af5 ctdb-protocol: Fix marshalling for ctdb_tickle_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
9573260954 ctdb-protocol: Fix marshalling for ctdb_tunable_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
c78d69b258 ctdb-protocol: Fix marshalling for ctdb_var_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
7f57cc0ec2 ctdb-protocol: Fix marshalling for ctdb_node_flag_change
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
60cb067885 ctdb-protocol: Fix marshalling for ctdb_tunable
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
7f34ad2a82 ctdb-protocol: Fix marshalling for ctdb_connection
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
32539cd5cc ctdb-protocol: Fix marshalling for ctdb_sock_addr
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
6f4867664c ctdb-protocol: Fix marshalling for ctdb_traverse_all_ext
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
5caafc2857 ctdb-protocol: Fix marshalling for ctdb_traverse_start_ext
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
bad58078fa ctdb-protocol: Fix marshalling for ctdb_traverse_all
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
c882182ecd ctdb-protocol: Fix marshalling for ctdb_traverse_start
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
676df8770b ctdb-protocol: Fix marshalling for ctdb_rec_buffer
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
adab372e56 ctdb-protocol: Fix marshalling for ctdb_rec_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:23 +02:00
Amitay Isaacs
25217a9bb5 ctdb-protocol: Fix marshalling for ctdb_ltdb_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
04d0b30592 ctdb-protocol: Fix marshalling for ctdb_pulldb_ext
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
ba0b0903ea ctdb-protocol: Fix marshalling for ctdb_pulldb
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
e347e2b496 ctdb-protocol: Fix marshalling for ctdb_dbid_map
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
917c0eca0d ctdb-protocol: Add marshalling for ctdb_dbid
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
28734f1bb1 ctdb-protocol: Fix marshalling for ctdb_vnn_map
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
1cb6640ff2 ctdb-protocol: Fix marshalling for ctdb_statistics
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
82b7ec031d ctdb-tests: Add compatibility test for protocol data types
This patch prepares for testing old and new marshalling codes for
various data types to ensure backward compatibility.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
fc3f614718 ctdb-protocol: Add marshalling for ctdb_latency_counter
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
ed4b4a2b55 ctdb-protocol: Add marshalling for tdb_data with size
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
3b86c24183 ctdb-protocol: Fix marshalling for tdb_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
c9b541b0fa ctdb-protocol: Add padding data type to handle structure padding
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-30 14:59:22 +02:00
Amitay Isaacs
0056a9d7eb ctdb-protocol: Add marshalling for struct timeval
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
e0cb2f7b83 ctdb-protocol: Fix marshalling for pid_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
1d6840982b ctdb-protocol: Fix marshalling for a string with length
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
120210670c ctdb-protocol: Fix marshalling for a string
Always return NULL terminated strings.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
4ce3e682a4 ctdb-protocol: Add marshalling for fixed size char array
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
c1a2f42317 ctdb-protocol: Add marshalling for bool
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:22 +02:00
Amitay Isaacs
222b63779f ctdb-protocol: Fix marshalling for double
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
890b696a6c ctdb-protocol: Fix marshalling for uint64_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
69a2cb880d ctdb-protocol: Fix marshalling for uint32_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
5ee30249b2 ctdb-protocol: Fix marshalling for int32_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
453ff93bb3 ctdb-protocol: Add marshalling for uint16_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
5a2b2cc141 ctdb-protocol: Add marshalling for uint8_t
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
62229f4c93 ctdb-tests: Add test templates for various data types
These test templates will use new style of len/push/pull functions.
The differences in the new style of marshalling functions are:

1. len/push functions will be passed pointer to a value instead of the value
2. push/pull functions will additionally return the number of bytes consumed

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
936fc23e3c ctdb-tests: Reorganize protocol tests
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>
2017-08-30 14:59:21 +02:00
Amitay Isaacs
73748776d9 ctdb-protocol: Separate marshalling for basic data types
This splits protocol_types.c and creates new protocol_basic.c.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:21 +02:00
Martin Schwenke
5b7bc0ae13 ctdb-tests: Add sock daemon test for do_fork
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): Tue Aug 29 15:03:33 CEST 2017 on sn-devel-144
2017-08-29 15:03:33 +02:00
Martin Schwenke
b83801979f ctdb-tests: Add sock daemon test for create_session
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Martin Schwenke
94cc5eaddc ctdb-common: Allow sock_daemon to daemonise during startup
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Martin Schwenke
4cb560386a ctdb-tests: Add a sock_daemon test for PID file contention
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Amitay Isaacs
b67cc00c93 ctdb-common: Move PID file creation to sock_daemon_run_send()
Only create PID file when actually starting the daemon, rather than
when setting up the context.  This will facilitate future changes.

Tweak test to confirm that PID file is no longer created during setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Martin Schwenke
fc6fdde60f ctdb-tests: Add improved PID file check to test2
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Martin Schwenke
8149c9844e ctdb-tests: Add comments describing sock daemon tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-29 11:14:09 +02:00
Amitay Isaacs
9a92d71270 ctdb-tests: Add a test to check databases are attached with correct flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-25 09:41:25 +02:00
Amitay Isaacs
9691b72a87 ctdb-tests: Add functions to start/stop/restart a single local daemon
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-25 09:41:25 +02:00
Amitay Isaacs
205969dd94 ctdb-tests: Add functions to start/stop/restart ctdb on single node
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-25 09:41:25 +02:00
Amitay Isaacs
0772cf45b4 ctdb-protocol: Drop unused protocol data structures
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-14 09:01:22 +02:00
Amitay Isaacs
66694d8926 ctdb-protocol: Drop marshalling code for CHECK_SRVIDS control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-14 09:01:22 +02:00
Martin Schwenke
b171c090ec ctdb-tests: Indentation fixups
The rest of the code in this file now matches the coding guidelines,
so clean up the rest.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-14 05:15:25 +02:00
Martin Schwenke
e8c5d0e25e ctdb-tests: Fix logic to handle PATH additions for tests
When using non-standard test subdirectories, the current code can fail
to find the test bin directory and stupidly just adds /bin to PATH.

Switch to using CTDB_TESTS_ARE_INSTALLED along with some sanity checks
to determine the mode of operation.

With this change, test directories can now be created as
subdirectories of arbitrary component directories.  Tests can then be
run directly, either by specifying the subdirectory or individual test
cases.

Integration into the top-level tests/ directory is then done via a
symbolic link, which enables 2 things:

* Ability to run a directory of test cases from top level by simply
  specifying the link name.

* Ease of installation - the installation code just works with the
  symbolic link.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-14 05:15:25 +02:00
Martin Schwenke
661426df40 ctdb-tests: Move die() function to top of script
So it can be called within the script instead of just by scripts that
include it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-14 05:15:25 +02:00
Martin Schwenke
ac1b1d8c8a ctdb-tests: run_tests.sh sets evironment variable CTDB_TEST_DIR
Instead of just local variable test_dir.  The environment variable can
be accessed from other test infrastructure scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-08-14 05:15:25 +02:00
Martin Schwenke
d0381a3cf4 ctdb-tests: Add a big no-op LCP2 IP takeover test
Although this tests correctness it is most useful for testing that
changes to IP takeover algorithm do not cause obvious performance
regressions.

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): Thu Aug 10 10:30:58 CEST 2017 on sn-devel-144
2017-08-10 10:30:58 +02:00
Martin Schwenke
59ebb29e6a ctdb-common: Rename pidfile_create() -> pidfile_context_create()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2017-08-02 03:39:11 +02:00
Martin Schwenke
312947f89b ctdb-tests: Add event script startup/shutdown tests
For vsftpd, httpd, winbind.  These should help to catch typo
regressions.

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): Sun Jul 23 19:31:08 CEST 2017 on sn-devel-144
2017-07-23 19:31:08 +02:00