28 #define SERVER_LOG_FILE_NAME "reqh_service_ctx.log" 37 static char *
sargs[] = {
"m0d",
"-T",
"linux",
38 "-D",
"cs_sdb",
"-S",
"cs_stob",
39 "-A",
"linuxstob:cs_addb_stob",
41 "-H",
"0@lo:12345:34:1",
47 void (*ut_body)(
void))
75 .rhia_dtm = (
void *)1,
77 .rhia_mdstore = (
void *)1,
234 .
ts_name =
"reqh-service-ctx-ut",
242 .ts_owners =
"Igor Vartanov",
static void reqh_service_ctx_ut__wait_all_online(void)
M0_INTERNAL const char * m0_rpc_link_end_point(const struct m0_rpc_link *rlink)
void m0_rpc_machine_fini(struct m0_rpc_machine *machine)
void m0_net_domain_fini(struct m0_net_domain *dom)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
struct m0_ut_suite reqh_service_ctx_ut
static bool ut_dead_end__cb(struct m0_clink *clink)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
#define SERVER_LOG_FILE_NAME
#define M0_REQH_INIT(reqh,...)
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
static void ut_dead_end__connecting(void)
static struct m0_reqh_service_ctx * reqh_service_ctx_ut__find(struct m0_fid *fid, int stype, const char *ep)
static const char * ut_ep_addr_remote
static void reqh_service_ctx_ut_test_helper(char *ut_argv[], int ut_argc, void(*ut_body)(void))
static struct m0_rpc_machine ut_rmach
static void reqh_service_ctx_sm_unlock(struct m0_reqh_service_ctx *ctx)
#define M0_SRC_PATH(name)
M0_INTERNAL void m0_reqh_fini(struct m0_reqh *reqh)
static struct m0_net_buffer_pool ut_buf_pool
M0_INTERNAL struct m0_reqh_service_ctx * m0_pools_common_service_ctx_find(const struct m0_pools_common *pc, const struct m0_fid *id, enum m0_conf_service_type type)
static struct m0_pools_common pc
static void test_dead_end_connect(void)
#define M0_FID_TINIT(type, container, key)
static const struct socktype stype[]
static void ut_dead_end__disconnecting(void)
#define M0_NET_XPRT_PREFIX_DEFAULT
static struct m0_net_domain ut_client_net_dom
M0_INTERNAL int m0_rpc_net_buffer_pool_setup(struct m0_net_domain *ndom, struct m0_net_buffer_pool *app_pool, uint32_t bufs_nr, uint32_t tm_nr)
static struct m0_reqh_service_ctx * reqh_service_ctx_ut__find_remote(void)
struct m0_ut_suite reqh_service_ut
M0_INTERNAL uint32_t m0_rpc_bufs_nr(uint32_t len, uint32_t tms_nr)
M0_INTERNAL int m0_rpc_machine_init(struct m0_rpc_machine *machine, struct m0_net_domain *net_dom, const char *ep_addr, struct m0_reqh *reqh, struct m0_net_buffer_pool *receive_pool, uint32_t colour, m0_bcount_t msg_size, uint32_t queue_len)
struct m0_net_xprt * m0_net_xprt_default_get(void)
struct m0_net_xprt ** rsx_xprts
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static struct m0_rpc_server_ctx ut_sctx
static struct m0_clink clink[RDWR_REQUEST_MAX]
static struct fdmi_ctx ctx
static struct m0_reqh ut_reqh
static void test_dead_end_disconnect(void)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
static int reqh_service_ctx_ut__remote_rmach_init(void)
static void reqh_service_ctx_sm_lock(struct m0_reqh_service_ctx *ctx)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
struct m0_net_xprt ** m0_net_all_xprt_get(void)
static void ut_dead_end__disconnected(void)
static void reqh_service_ctx_ut__remote_rmach_fini(void)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_reqh_service_disconnect(struct m0_reqh_service_ctx *ctx)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
struct m0_pools_common cc_pools_common
void m0_rpc_net_buffer_pool_cleanup(struct m0_net_buffer_pool *app_pool)
#define m0_tl_for(name, head, obj)
static struct m0_semaphore g_sem
struct m0_fid g_process_fid
struct m0_motr rsx_motr_ctx
static void reqh_service_ctx_ut__wait_online(struct m0_reqh_service_ctx *ctx)