21 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 35 #define SERVER_ENDPOINT_ADDR "0@lo:12345:34:1" 36 #define SERVER_ENDPOINT M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR 37 #define CLIENT_ENDPOINT_ADDR "0@lo:12345:34:2" 38 #define F_CONT 0x12345 48 "-D",
"sr_db",
"-S",
"sr_stob",
49 "-A",
"linuxstob:sr_addb_stob",
124 {-ENOENT, -EINVAL, -ENOMEM, -EPROTO, -EPERM, -ENOMSG, 0};
211 return fom->fo_fop->f_item.ri_session->s_conn->c_rpc_machine;
236 instr = (
char *)in->
b_addr;
237 outstr = (
char *)
out->b_addr;
239 outstr[
i] = (instr[
i] + 1) % CHAR_MAX;
548 uint32_t phase,
struct m0_fop **arg_fop)
560 req_fop =
m0_alloc(
sizeof *req_fop);
630 memset(
data.b_addr,
'a',
data.b_nob);
737 if (M0_IN(exp_rc, (-EINVAL, -ENOMEM, -EPERM, -ENOMSG, 0))) {
755 if (!M0_IN(repl->
fir_rc, (-ENOENT, -EINVAL))) {
769 for (
i = 0;
i < recv_buf.
b_nob; ++
i) {
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_segment_size(struct m0_net_domain *dom)
M0_INTERNAL int m0_rpc_post(struct m0_rpc_item *item)
M0_INTERNAL void cc_block_launch(struct cnc_cntrl_block *cc_block, void(*t_op)(void *))
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
static struct m0_rpc_client_ctx isc_ut_cctx
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
static void remote_invocation(struct m0_fid *fid, int exp_rc, uint32_t f_type, uint32_t buf_type)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
void m0_net_domain_fini(struct m0_net_domain *dom)
struct m0_reqh * m0_cs_reqh_get(struct m0_motr *cctx)
M0_INTERNAL void m0_reqh_service_stop(struct m0_reqh_service *service)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
static struct io_request req
M0_INTERNAL bool m0_buf_streq(const struct m0_buf *buf, const char *str)
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
M0_INTERNAL void m0_rpc_at_init(struct m0_rpc_at_buf *ab)
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
struct m0_rpc_at_buf fir_ret
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
M0_INTERNAL void atut__bufdata_alloc(struct m0_buf *buf, size_t size, struct m0_rpc_machine *rmach)
#define SERVER_ENDPOINT_ADDR
static int null_computation(struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc)
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
M0_INTERNAL int m0_isc_comp_req_exec_sync(struct m0_isc_comp_req *comp_req)
static void test_remote_waiting(void)
struct m0_net_domain * ntm_dom
void * m0_fop_data(const struct m0_fop *fop)
M0_INTERNAL int m0_rpc_at_add(struct m0_rpc_at_buf *ab, const struct m0_buf *buf, const struct m0_rpc_conn *conn)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
static struct m0_reqh_service * iscs
struct m0_semaphore * ta_barrier
static struct m0_rpc_item * item
M0_INTERNAL int m0_rpc_at_rep_get(struct m0_rpc_at_buf *sent, struct m0_rpc_at_buf *rcvd, struct m0_buf *out)
static void isc_ut_client_stop()
static int strguess(struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc)
static void test_comp_signature(void)
void m0_fop_put0_lock(struct m0_fop *fop)
static void vis_entry_fini(void)
static void test_local_err_path(void)
M0_INTERNAL void m0_fid_set(struct m0_fid *fid, uint64_t container, uint64_t key)
return M0_ERR(-EOPNOTSUPP)
m0_bcount_t rm_bulk_cutoff
struct m0_reqh_service_type m0_iscs_type
char * isc_ut_server_args[]
static void ret_codes_postcond(int exp_rc, void *arg)
static void ret_codes_precond(int exp_rc, uint32_t buf_type, struct m0_fid *fid)
const char * rsx_log_file_name
static struct m0_rpc_machine * fom_rmach(const struct m0_fom *fom)
int isc_ut_server_start(void)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
M0_INTERNAL int m0_isc_comp_state_probe(const struct m0_fid *fid)
static void m0_fi_enable(const char *func, const char *tag)
struct m0_net_transfer_mc rm_tm
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
uint32_t rcx_max_rpc_msg_size
struct m0_fop_type m0_fop_isc_fopt
M0_INTERNAL m0_bcount_t m0_rpc_max_msg_size(struct m0_net_domain *ndom, m0_bcount_t rpc_size)
static void vis_entry_init(uint32_t barrier_cnt)
volatile uint32_t ve_count
M0_INTERNAL void m0_reqh_service_fini(struct m0_reqh_service *service)
static struct m0_fop reply_fop
struct m0_rpc_conn rcx_connection
static const char * SERVER_LOGFILE
struct m0_rpc_at_buf fi_args
struct remote_invoke_var remote_call_info
static void test_remote_err_path(void)
int m0_rpc_client_stop(struct m0_rpc_client_ctx *cctx)
static void fid_get(const char *f_name, struct m0_fid *fid)
struct m0_net_xprt * m0_net_xprt_default_get(void)
struct m0_cookie icr_cookie
struct m0_fop * m0_fop_get(struct m0_fop *fop)
int m0_rpc_client_start(struct m0_rpc_client_ctx *cctx)
struct m0_net_xprt ** rsx_xprts
struct m0_rpc_item * ri_reply
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
void * m0_alloc(size_t size)
static void isc_item_cb(struct m0_rpc_item *item)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
uint32_t rcx_recv_queue_min_length
int m0_rpc_post_sync(struct m0_fop *fop, struct m0_rpc_session *session, const struct m0_rpc_item_ops *ri_ops, m0_time_t deadline)
#define m0_cookie_of(cookie, type, field)
struct m0_ut_suite isc_service_ut
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
#define CLIENT_ENDPOINT_ADDR
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_size(struct m0_net_domain *dom)
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
M0_INTERNAL int m0_isc_comp_req_exec(struct m0_isc_comp_req *comp_req)
static struct m0_rpc_server_ctx isc_ut_sctx
static uint64_t min64u(uint64_t a, uint64_t b)
struct m0_net_domain * rcx_net_dom
M0_INTERNAL void m0_chan_signal_lock(struct m0_chan *chan)
M0_INTERNAL void m0_isc_comp_unregister(const struct m0_fid *fid)
int(* cra_comp)(struct m0_buf *arg_in, struct m0_buf *args_out, struct m0_isc_comp_private *comp_data, int *rc)
struct m0_cookie fir_comp_cookie
uint64_t rcx_max_rpcs_in_flight
void(* rio_replied)(struct m0_rpc_item *item)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
M0_INTERNAL void m0_isc_comp_req_fini(struct m0_isc_comp_req *comp_req)
static struct m0_net_domain isc_ut_client_ndom
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_find(const struct m0_reqh_service_type *st, const struct m0_reqh *reqh)
static void comp_remote_invoke(struct comp_req_aux *cra, uint32_t f_type)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
static uint32_t expected_output(uint32_t f_type)
struct m0_rpc_session rcx_session
#define M0_FI_ENABLED(tag)
static void isc_ut_server_stop(void)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
#define M0_ALLOC_PTR(ptr)
const struct m0_rpc_item_ops * ri_ops
#define M0_UT_CONF_PROCESS
struct m0_rpc_at_buf fi_ret
struct m0_net_xprt ** m0_net_all_xprt_get(void)
static const struct m0_rpc_item_ops isc_item_ops
struct m0_rpc_session * ri_session
static void req_fop_prepare(struct m0_fop *req_fop, uint32_t buf_type, struct m0_fid *fid, uint32_t f_type)
const char * rcx_remote_addr
M0_INTERNAL void m0_rpc_at_fini(struct m0_rpc_at_buf *ab)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
void m0_fop_put_lock(struct m0_fop *fop)
static void comp_req_init(void *arg, int tid)
static int barrier(struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc)
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
const char * rcx_local_addr
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
static int string_update(struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc)
struct m0_rpc_machine rcx_rpc_machine
M0_INTERNAL void m0_isc_comp_req_init(struct m0_isc_comp_req *comp_req, const struct m0_buf *comp_args, const struct m0_fid *comp_fid, const struct m0_cookie *comp_cookie, enum m0_isc_comp_req_type comp_req_type, struct m0_reqh *reqh)
static void local_invocation(struct m0_isc_comp_req *comp_req, struct m0_fid *fid, int exp_rc)
static void test_comp_launch(void)
static void comp_launch(void *args)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static void test_comp_state(void)
static void isc_ut_client_start(void)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
M0_INTERNAL int m0_isc_comp_register(int(*ftn)(struct m0_buf *arg_in, struct m0_buf *args_out, struct m0_isc_comp_private *comp_data, int *rc), const char *f_name, const struct m0_fid *ftn_fid)
struct m0_rpc_item f_item
M0_INTERNAL void m0_chan_broadcast(struct m0_chan *chan)
struct m0_fid g_process_fid
struct m0_fom_callback fo_cb
M0_INTERNAL unsigned int m0_full_name_hash(const unsigned char *name, unsigned int len)
struct m0_motr rsx_motr_ctx
struct m0_mutex riv_guard
static uint32_t remote_invocation_async(struct m0_fid *fid, int exp_rc, uint32_t buf_type, uint32_t phase, struct m0_fop **arg_fop)
const m0_time_t M0_TIME_IMMEDIATELY
M0_INTERNAL void cc_block_init(struct cnc_cntrl_block *cc_block, size_t size, void(*t_data_init)(void *, int))
struct visitor_entry vis_ent
M0_INTERNAL int m0_rpc_at_recv(struct m0_rpc_at_buf *ab, const struct m0_rpc_conn *conn, uint32_t len, bool force_bulk)