23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 79 {
"session_gen_fom_create",
"reply_fop_alloc_failed"},
80 {
"m0_rpc_fom_conn_establish_tick",
"conn-alloc-failed" },
83 {
"rpc_chan_get",
"fake_error" },
84 {
"session_zero_attach",
"out-of-memory"},
101 m0_fi_enable(
"m0_rpc_fom_conn_establish_tick",
"free-timer");
138 {
"session_gen_fom_create",
"reply_fop_alloc_failed",
140 {
"m0_rpc_fom_session_establish_tick",
141 "session-alloc-failed", -ENOMEM},
178 {
"session_gen_fom_create",
"reply_fop_alloc_failed",
232 {
"session_gen_fom_create",
"reply_fop_alloc_failed",
307 .
ts_name =
"rpc-rcv-session-ut",
320 #undef M0_TRACE_SUBSYSTEM
void(* rio_conflict)(struct m0_rm_incoming *in)
const m0_time_t M0_TIME_NEVER
M0_INTERNAL int m0_rpc_session_create(struct m0_rpc_session *session, struct m0_rpc_conn *conn, m0_time_t abs_timeout)
#define M0_LOG(level,...)
int m0_rpc_session_destroy(struct m0_rpc_session *session, m0_time_t abs_timeout)
M0_INTERNAL void m0_rconfc_stop_sync(struct m0_rconfc *rconfc)
static struct m0_rpc_client_ctx cctx
static const char * remote_addr
M0_INTERNAL int m0_sm_timedwait(struct m0_sm *mach, uint64_t states, m0_time_t deadline)
M0_INTERNAL int m0_confc_service_find(struct m0_confc *confc, enum m0_conf_service_type stype, const char *ep, struct m0_conf_obj **result)
M0_INTERNAL void m0_sm_group_unlock(struct m0_sm_group *grp)
M0_INTERNAL struct m0_fid * m0_reqh2profile(struct m0_reqh *reqh)
M0_INTERNAL int m0_rpc_conn_create(struct m0_rpc_conn *conn, struct m0_fid *svc_fid, struct m0_net_end_point *ep, struct m0_rpc_machine *rpc_machine, uint64_t max_rpcs_in_flight, m0_time_t abs_timeout)
static int ts_rcv_session_init(void)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
#define M0_FID_TINIT(type, container, key)
M0_EXTERN struct m0_rm_incoming_ops m0_rconfc_ri_ops
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
static void m0_fi_enable(const char *func, const char *tag)
static int ts_rcv_session_fini(void)
struct m0_net_transfer_mc rm_tm
static void test_session_establish(void)
struct m0_rm_incoming rlc_req
static void m0_fi_enable_func(const char *func, const char *tag, m0_fi_fpoint_state_func_t trigger_func, void *data)
struct m0_ut_suite rpc_rcv_session_ut
int m0_rpc_conn_destroy(struct m0_rpc_conn *conn, m0_time_t abs_timeout)
static void test_session_terminate(void)
static void stop_rpc_client_and_server(void)
static struct m0_rpc_machine * machine
struct m0_sm_group * sm_grp
static int m0_rconfc_start_sync(struct m0_rconfc *rconfc)
struct m0_chan co_ha_chan
static void test_conn_terminate(void)
static void test_conn_ha_subscribe()
M0_INTERNAL void m0_rconfc_fini(struct m0_rconfc *rconfc)
void m0_net_end_point_put(struct m0_net_end_point *ep)
static void test_conn_establish(void)
static struct m0_fid profile
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
const char * rcx_remote_addr
M0_INTERNAL void m0_sm_group_lock(struct m0_sm_group *grp)
static void m0_fi_enable_once(const char *func, const char *tag)
static struct m0_rconfc * rconfc(struct m0_client *m0c)
static bool enable_for_all_but_first_call(void *data)
struct m0_rconfc rh_rconfc
struct m0_rpc_machine rcx_rpc_machine
M0_INTERNAL void m0_confc_ready_cb(struct m0_rconfc *rconfc)
M0_INTERNAL int m0_rconfc_init(struct m0_rconfc *rconfc, const struct m0_fid *profile, struct m0_sm_group *sm_group, struct m0_rpc_machine *rmach, m0_rconfc_cb_t expired_cb, m0_rconfc_cb_t ready_cb)
M0_INTERNAL void m0_confc_expired_cb(struct m0_rconfc *rconfc)
M0_INTERNAL int m0_net_end_point_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const char *addr)
static void start_rpc_client_and_server(void)