Motr
M0
|
#include "lib/trace.h"
#include <unistd.h>
#include "conf/rconfc.h"
#include "conf/rconfc_internal.h"
#include "conf/confd.h"
#include "conf/helpers.h"
#include "conf/ut/common.h"
#include "conf/ut/confc.h"
#include "conf/ut/rpc_helpers.h"
#include "rpc/rpclib.h"
#include "lib/finject.h"
#include "lib/fs.h"
#include "module/instance.h"
#include "ut/misc.h"
#include "ut/ut.h"
Go to the source code of this file.
Data Structures | |
struct | root_object |
struct | _ha_notify_ctx |
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | M0_UT_TRACE 0 |
#define | NAME(ext) "rconfc-ut" ext |
Enumerations | |
enum | { CLIENT_COB_DOM_ID = 16, SESSION_SLOTS = 1, MAX_RPCS_IN_FLIGHT = 1 } |
enum | ut_confc_control { UT_CC_KEEP_AS_IS, UT_CC_DISCONNECT, UT_CC_DEINITIALISE } |
Functions | |
static int | rconfc_ut_motr_start (struct m0_rpc_machine *mach, struct m0_rpc_server_ctx *rctx) |
static void | rconfc_ut_motr_stop (struct m0_rpc_machine *mach, struct m0_rpc_server_ctx *rctx) |
static void | test_null_exp_cb (struct m0_rconfc *rconfc) |
static void | conflict_exp_cb (struct m0_rconfc *rconfc) |
static void | conflict_ready_cb (struct m0_rconfc *rconfc) |
static void | test_init_fini (void) |
static void | test_start_stop (void) |
static void | test_start_stop_local (void) |
static void | test_local_load_fail (void) |
static void | test_start_failures (void) |
static void | rconfc_ut_fatal_cb (struct m0_rconfc *rconfc) |
static bool | ha_clink_cb_suppress (struct m0_clink *clink) |
static void | test_fail_abort (void) |
static char * | suffix_subst (const char *src, char delim, const char *suffix) |
static bool | ha_clink_cb_bad_rm (struct m0_clink *clink) |
static void | test_fail_retry_rm (void) |
static bool | ha_clink_cb_bad_confd (struct m0_clink *clink) |
static void | test_fail_retry_confd (void) |
static void | _stop_rms (struct m0_rpc_machine *rmach) |
static void | test_no_rms (void) |
static void | rconfc_ut_ha_state_set (const struct m0_fid *fid, uint32_t state) |
M0_TL_DESCR_DECLARE (rpc_conn, M0_EXTERN) | |
M0_TL_DECLARE (rpc_conn, M0_INTERNAL, struct m0_rpc_conn) | |
static void | _on_death_cb (struct rconfc_link *lnk) |
M0_TL_DESCR_DECLARE (rcnf_herd, M0_EXTERN) | |
M0_TL_DECLARE (rcnf_herd, M0_INTERNAL, struct rconfc_link) | |
static void | on_death_cb_install (struct m0_rconfc *rconfc, enum ut_confc_control ctrl) |
static void | test_dead_down (void) |
static void | test_dead_stop (void) |
static void | test_reading (void) |
static bool | quorum_impossible_clink_cb (struct m0_clink *cl) |
static void | test_quorum_impossible (void) |
static void | test_quorum_retry (void) |
static void | test_gops (void) |
static void | update_confd_version (struct m0_rpc_server_ctx *rctx, uint64_t new_ver) |
static void | test_version_change (void) |
static void | test_cache_drop (void) |
static void | test_confc_ctx_block (void) |
static int | _skip (struct m0_confc *confc) |
static void | test_reconnect_success (void) |
static void | _subscribe_to_service (struct m0_rconfc *rconfc, struct m0_fid *fid, struct m0_clink *clink) |
static void | _notify_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static bool | _clink_cb (struct m0_clink *link) |
static M0_UNUSED void | test_ha_notify (void) |
static void | drain_expired_cb (struct m0_rconfc *rconfc) |
static bool | fs_expired (struct m0_clink *clink) |
static void | drain_ready_cb (struct m0_rconfc *rconfc) |
static bool | fs_ready (struct m0_clink *clink) |
static void | test_drain (void) |
static int | rconfc_ut_init (void) |
static int | rconfc_ut_fini (void) |
Variables | |
static struct m0_semaphore | g_expired_sem |
static struct m0_semaphore | g_ready_sem |
static struct m0_semaphore | g_fatal_sem |
static struct m0_reqh * | ut_reqh |
static struct m0_net_domain | client_net_dom |
static struct m0_fid | profile = M0_FID_TINIT('p', 1, 0) |
static bool(* | ha_clink_cb_orig )(struct m0_clink *clink) |
M0_EXTERN struct m0_confc_gate_ops | m0_rconfc_gate_ops |
M0_EXTERN struct m0_rm_incoming_ops | m0_rconfc_ri_ops |
static struct m0_rpc_client_ctx | cctx |
static bool | do_fake = true |
static struct m0_semaphore | sem_death |
static bool | expected_fom_queued_value |
struct m0_semaphore | gops_sem |
struct m0_fid | drain_fs_fid = M0_FID0 |
struct m0_ut_suite | rconfc_ut |
#define NAME | ( | ext | ) | "rconfc-ut" ext |
anonymous enum |
enum ut_confc_control |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
M0_TL_DECLARE | ( | rpc_conn | , |
M0_INTERNAL | , | ||
struct m0_rpc_conn | |||
) |
M0_TL_DECLARE | ( | rcnf_herd | , |
M0_INTERNAL | , | ||
struct rconfc_link | |||
) |
M0_TL_DESCR_DECLARE | ( | rpc_conn | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DECLARE | ( | rcnf_herd | , |
M0_EXTERN | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct m0_semaphore gops_sem |
M0_EXTERN struct m0_confc_gate_ops m0_rconfc_gate_ops |
M0_EXTERN struct m0_rm_incoming_ops m0_rconfc_ri_ops |
|
static |
struct m0_ut_suite rconfc_ut |
|
static |