34 #define SERVER_ENDPOINT_ADDR "0@lo:12345:34:1" 35 #define SERVER_ENDPOINT M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR 49 "-D",
"cs_sdb",
"-S",
"cs_stob",
50 "-A",
"linuxstob:cs_addb_stob",
58 "-D",
"cs_sdb",
"-S",
"cs_stob",
59 "-A",
"linuxstob:cs_addb_stob",
62 "-e",
"bulk-mem:127.0.0.1:35678",
72 "-S",
"cs_stob",
"-A",
"linuxstob:cs_addb_stob",
77 "-D",
"cs_sdb",
"-S",
"cs_stob",
78 "-A",
"linuxstob:cs_addb_stob",
87 "-D",
"cs_sdb",
"-S",
"cs_stob",
88 "-A",
"linuxstob:cs_addb_sdb",
96 "-D",
"cs_sdb",
"-S",
"cs_stob",
97 "-A",
"linuxstob:cs_addb_sdb",
99 "-e",
"asdasdada:172.18.50.40@o2ib1:34567:2",
104 "-D",
"cs_sdb",
"-S",
"cs_stob",
105 "-A",
"linuxstob:cs_addb_sdb",
"-w",
"10",
106 "-e",
"lnet:asdad:asdsd:sadasd",
111 "-D",
"cs_sdb",
"-S",
"cs_stob",
112 "-A",
"linuxstob:cs_addb_sdb",
"-w",
"10",
113 "-e",
"lnet:172.18.50.40@o2ib1:12345:34:1",
118 "-S",
"cs_stob",
"-A",
"linuxstob:cs_addb_sdb",
120 "-e",
"lnet:172.18.50.40@o2ib1:12345:34:1",
125 "-D",
"cs_sdb",
"-S",
"cs_stob",
126 "-A",
"linuxstob:cs_addb_stob",
"-w",
"10",
133 "-q",
"4",
"-m",
"32768",
138 "-D",
"cs_sdb",
"-S",
"cs_stob",
139 "-A",
"linuxstob:cs_addb_sdb",
147 "-D",
"cs_sdb",
"-S",
"cs_stob",
148 "-A",
"linuxstob:cs_addb_stob",
151 "-e",
"lnet:172.18.50.40@tcp:12345:30:101",
152 "-e",
"lnet:172.18.50.40@o2ib0:12345:34:101",
160 "-D",
"cs_sdb",
"-S",
"cs_stob",
161 "-A",
"linuxstob:cs_addb_stob",
164 "-e",
"lnet:172.18.50.40@tcp:12345:30:101",
165 "-e",
"lnet:172.18.50.40@o2ib0:12345:34:101",
166 "-e",
"lnet:172.18.50.40@o2ib1:12345:30:101",
167 "-e",
"lnet:172.18.50.40@o2ib1:12345:30:101",
173 "-D",
"cs_sdb",
"-S",
"cs_stob",
174 "-A",
"linuxstob:cs_addb_stob",
177 "-e",
"lnet:172.18.50.40@tcp:12345:30:101",
178 "-e",
"lnet:172.18.50.40@tcp:12345:32:105",
184 "-D",
"cs_sdb",
"-S",
"cs_stob",
185 "-A",
"linuxstob:cs_addb_stob",
187 "-e",
"lnet:asdad:asdsd:sadasd",
191 static const char *
cdbnames[] = {
"cdb1",
"cdb2" };
192 static const char *
cl_ep_addrs[] = {
"0@lo:12345:34:2",
"127.0.0.1:34569" };
197 #define SERVER_LOG_FILE_NAME "cs_ut.errlog" 249 for (
i = 0;
i < 10; ++
i) {
262 for (
i = 0;
i < 10; ++
i) {
284 char *cs_argv[],
int cs_argc)
303 for (
i = 0;
i < cctx_nr; ++
i) {
311 for (
i = 0;
i < cctx_nr; ++
i, ++
stype)
314 for (
i = 0;
i < cctx_nr; ++
i)
373 f = fopen(
"d1",
"w");
376 f = fopen(
"d2",
"w");
473 out = fopen(
"temp",
"w");
543 static char *setup_conf[] = {
"m0d",
"-T",
"linux",
544 "-D",
"cs_sdb",
"-S",
"cs_stob",
545 "-A",
"linuxstob:cs_addb_stob",
565 m0_fi_enable(
"motr_ha_entrypoint_request_cb",
"ut_confc");
570 m0_fi_enable(
"motr_ha_entrypoint_rep_rm_fill",
"no_rms_fid");
574 m0_fi_disable(
"motr_ha_entrypoint_rep_rm_fill",
"no_rms_fid");
587 struct sigaction term_act;
592 sigemptyset(&term_act.sa_mask);
593 term_act.sa_flags = 0;
595 rc = sigaction(SIGUSR2, &term_act,
NULL);
689 "DUMMY Description, Dummy number[%d], Dummy text [%s]",
690 __LINE__, __FUNCTION__);
694 "DUMMY Description, Dummy number[%d], Dummy text [%s]",
695 __LINE__, __FUNCTION__);
699 "DUMMY Description, Dummy number[%d], Dummy text [%s]",
700 __LINE__, __FUNCTION__);
704 "DUMMY Description, Dummy number[%d], Dummy text [%s]",
705 __LINE__, __FUNCTION__);
709 "DUMMY Description, Dummy number[%d], Dummy text [%s]",
710 __LINE__, __FUNCTION__);
static const char * srv_ep_addr
M0_INTERNAL int rm_write_lock_get(struct m0_rpc_machine *rpc_mach, const char *rm_ep)
static const char * cl_ep_addrs[]
struct m0_ut_suite m0d_ut
m0_rconfc_cb_t rc_fatal_cb
static void test_cs_ut_rconfc_fatal(void)
void m0_net_domain_fini(struct m0_net_domain *dom)
static void cs_ut_test_helper_failure(char *cs_argv[], int cs_argc)
static void test_cs_ut_lnet(void)
static void test_cs_ut_services_many(void)
static void test_cs_ut_lnet_ep_mixed_dup(void)
static char * cs_ut_lnet_mult_if_cmd[]
static char * cs_ut_service_one_cmd[]
int m0_cs_ut_send_fops(struct m0_rpc_session *cl_rpc_session, int dstype)
static void test_cs_ut_service_one(void)
static char * cs_ut_stype_bad_cmd[]
static int cs_args_parse(struct m0_motr *cctx, int argc, char **argv)
static void test_cs_ut_service_bad(void)
M0_INTERNAL int m0_file_read(const char *path, char **out)
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
void m0_cs_fini(struct m0_motr *cctx)
static struct m0_rpc_machine * cs_ut_reqh2rmach(struct m0_reqh *reqh)
M0_INTERNAL int m0_confc_init(struct m0_confc *confc, struct m0_sm_group *sm_group, const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf)
static void dev_conf_file_create(void)
M0_INTERNAL void m0_rconfc_stop_sync(struct m0_rconfc *rconfc)
static struct m0_rpc_client_ctx cctx
void * m0_fop_data(const struct m0_fop *fop)
M0_INTERNAL void m0_rconfc_fatal_cb_set(struct m0_rconfc *rconfc, m0_rconfc_cb_t cb)
M0_INTERNAL void m0_confc_fini(struct m0_confc *confc)
volatile sig_atomic_t gotsignal
static void test_cs_ut_buffer_pool(void)
static char * cs_ut_args_bad_cmd[]
static int cs_ut_client_init(struct cl_ctx *cctx, const char *cl_ep_addr, const char *srv_ep_addr, const char *dbname, const struct m0_net_xprt *xprt)
M0_INTERNAL struct m0_confc * m0_ha_entrypoint_confc_override(void)
static const char * cl_ep_addr
static void test_cs_ut_dev_stob(void)
M0_INTERNAL struct m0_fid * m0_reqh2profile(struct m0_reqh *reqh)
static void cs_ut_write_lock_trigger(struct m0_reqh *reqh)
static void test_cs_ut_lnet_ep_duplicate(void)
static char * cs_ut_lnet_ep_bad_cmd[]
#define M0_MOTR_IEM(_sev_id, _mod_id, _evt_id)
static int cs_ut_test_helper_success(struct cl_ctx *cctx, size_t cctx_nr, char *cs_argv[], int cs_argc)
static void test_cs_ut_rconfc_fail(void)
const struct m0_rpc_item_ops cs_ds_req_fop_rpc_item_ops
static int cs_ut_register_signal(void)
static const struct socktype stype[]
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 struct m0_confc * confc
static int cs_reqh_ctx_validate(struct m0_motr *cctx)
static void test_cs_ut_setup_fail(void)
struct m0_tl rh_rpc_machines
struct m0_net_domain cl_ndom
struct m0_rpc_client_ctx cl_ctx
int m0_rpc_client_stop(struct m0_rpc_client_ctx *cctx)
static void test_cs_ut_ep_bad(void)
#define SERVER_ENDPOINT_ADDR
struct m0_net_xprt * m0_net_xprt_default_get(void)
int m0_rpc_client_start(struct m0_rpc_client_ctx *cctx)
struct m0_net_xprt ** rsx_xprts
static void test_cs_ut_linux_stob_cleanup(void)
static struct m0_rpc_server_ctx sctx
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)
static int m0_rconfc_start_sync(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_rconfc_lock(struct m0_rconfc *rconfc)
static void test_cs_ut_opts_jumbled(void)
static char * cs_ut_service_bad_cmd[]
struct ping_xprt xprts[1]
#define SERVER_LOG_FILE_NAME
struct m0_fop_type cs_ds2_req_fop_fopt
#define M0_MOTR_IEM_DESC(_sev_id, _mod_id, _evt_id, _desc,...)
struct m0_fop_type cs_ds1_req_fop_fopt
M0_INTERNAL void m0_rconfc_fini(struct m0_rconfc *rconfc)
static void cs_ut_term_sig_handler(int signum)
static void test_cs_ut_lnet_multiple_if(void)
M0_INTERNAL void m0_rconfc_unlock(struct m0_rconfc *rconfc)
int m0_cs_init(struct m0_motr *cctx, struct m0_net_xprt **xprts, size_t xprts_nr, FILE *out, bool mkfs)
static char * cs_ut_lnet_dup_tcp_if_cmd[]
static void test_cs_ut_xprt_bad(void)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
struct m0_reqh_context cc_reqh_ctx
static char * cs_ut_lnet_cmd[]
#define M0_UT_CONF_PROCESS
M0_INTERNAL void rm_write_lock_put()
struct m0_net_xprt ** m0_net_all_xprt_get(void)
static char * cs_ut_dev_stob_cmd[]
struct m0_fop * m0_fop_alloc_at(struct m0_rpc_session *sess, struct m0_fop_type *fopt)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
static char * cs_ut_services_many_cmd[]
static void test_cs_ut_iem(void)
static void m0_fi_enable_once(const char *func, const char *tag)
static struct m0_rconfc * rconfc(struct m0_client *m0c)
struct m0_rconfc rh_rconfc
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
static void test_cs_ut_cs_start_err(void)
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)
static void test_cs_ut_stype_bad(void)
struct m0_net_xprt * xprt
static char * cs_ut_buffer_pool_cmd[]
const struct m0_tl_descr ndoms_descr
static char * cs_ut_xprt_bad_cmd[]
static void cs_ut_client_fini(struct cl_ctx *cctx)
static void test_cs_ut_args_bad(void)
static char * cs_ut_opts_jumbled_cmd[]
struct m0_fid g_process_fid
static void test_cs_ut_lnet_ep_bad(void)
static const char * cdbnames[]
static char * cs_ut_ep_mixed_dup_cmd[]
struct m0_motr rsx_motr_ctx
static const char * srv_ep_addrs[]
static char * cs_ut_ep_bad_cmd[]
const struct m0_net_xprt m0_net_bulk_mem_xprt