33 #define M0_DEFAULT_EP "0@lo:12345:45:101" 34 #define M0_DEFAULT_HA_ADDR "0@lo:12345:66:1" 35 #define M0_DEFAULT_PROFILE "<0x7000000000000001:0>" 36 #define M0_DEFAULT_PROC_FID "<0x7200000000000000:0>" 37 #define SET_DEFAULT_CONFIG() \ 39 struct m0_config *confp = &default_config; \ 41 confp->mc_is_oostore = false; \ 42 confp->mc_is_read_verify = false; \ 43 confp->mc_layout_id = 1; \ 44 confp->mc_local_addr = M0_DEFAULT_EP;\ 45 confp->mc_ha_addr = M0_DEFAULT_HA_ADDR;\ 46 confp->mc_profile = M0_DEFAULT_PROFILE; \ 47 confp->mc_process_fid = M0_DEFAULT_PROC_FID; \ 48 confp->mc_tm_recv_queue_min_len = M0_NET_TM_RECV_QUEUE_DEF_LEN;\ 49 confp->mc_max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE; \ 58 #define INIT(instance) do_init(instance) 61 #define M0T1FS_LAYOUT_P 4 62 #define M0T1FS_LAYOUT_N 2 63 #define M0T1FS_LAYOUT_K 1 64 #define M0T1FS_LAYOUT_S 1 66 #define DUMMY_PTR 0xdeafdead 67 #define UT_DEFAULT_BLOCK_SIZE (1ULL << M0_DEFAULT_BUF_SHIFT)
M0_INTERNAL void ut_dummy_paritybufs_create(struct pargrp_iomap *map, bool do_alloc)
void ut_layout_domain_empty(struct m0_client *cinst)
M0_INTERNAL void ut_set_device_state(struct m0_poolmach *pm, int dev, enum m0_pool_nd_state state)
M0_INTERNAL void ut_dummy_pdclust_instance_delete(struct m0_pdclust_instance *pdi)
static struct m0_sm_group * grp
M0_INTERNAL void ut_shuffle_test_order(struct m0_ut_suite *suite)
struct m0_pool_version * pv
static struct net_test_cmd_node * node
M0_INTERNAL void ut_striped_layout_init(struct m0_striped_layout *stl, struct m0_layout_domain *dom)
M0_INTERNAL void ut_dummy_pargrp_iomap_delete(struct pargrp_iomap *map, struct m0_client *instance)
M0_INTERNAL void ut_dummy_target_ioreq_delete(struct target_ioreq *ti)
struct m0_layout_instance_ops ut_layout_instance_ops
M0_INTERNAL void ut_dummy_data_buf_fini(struct data_buf *db)
M0_INTERNAL void ut_dummy_xfer_req_fini(struct nw_xfer_request *xfer)
void ut_layout_domain_fill(struct m0_client *cinst)
int m0_client_init(struct m0_client **m0c, struct m0_config *conf, bool init_m0)
M0_INTERNAL void ut_striped_layout_fini(struct m0_striped_layout *stl, struct m0_layout_domain *dom)
M0_INTERNAL struct m0_obj * ut_dummy_obj_create(void)
M0_INTERNAL void ut_dummy_paritybufs_delete(struct pargrp_iomap *map, bool do_free)
M0_INTERNAL struct nw_xfer_request * ut_dummy_xfer_req_create(void)
M0_INTERNAL int ut_init(void)
static struct m0_sm_ast ast[NR]
M0_INTERNAL struct m0_pdclust_instance * ut_dummy_pdclust_instance_create(struct m0_pdclust_layout *pdl)
M0_INTERNAL struct m0_pdclust_layout * ut_get_pdclust_layout_from_ioo(struct m0_op_io *ioo)
M0_INTERNAL void ut_dummy_ioo_delete(struct m0_op_io *ioo, struct m0_client *instance)
void dummy_ioreq_fop_cb(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void ut_dummy_ioreq_fop_delete(struct ioreq_fop *fop)
M0_INTERNAL void ut_dummy_poolmach_delete(struct m0_pool_version *pv)
#define SET_DEFAULT_CONFIG()
M0_INTERNAL struct target_ioreq * ut_dummy_target_ioreq_create(void)
static struct m0_stob_domain * dom
M0_INTERNAL struct ioreq_fop * ut_dummy_ioreq_fop_create(void)
M0_INTERNAL int ut_dummy_poolmach_create(struct m0_pool_version *pv)
M0_INTERNAL struct pargrp_iomap * ut_dummy_pargrp_iomap_create(struct m0_client *instance, int num_blocks)
M0_INTERNAL void ut_dummy_pdclust_layout_delete(struct m0_pdclust_layout *pl, struct m0_client *instance)
M0_INTERNAL struct data_buf * ut_dummy_data_buf_create(void)
static struct m0_client cinst
struct m0_config default_config
M0_INTERNAL int ut_m0_client_init(struct m0_client **instance)
M0_INTERNAL struct m0_pdclust_layout * ut_dummy_pdclust_layout_create(struct m0_client *instance)
M0_INTERNAL struct m0_op_io * ut_dummy_ioo_create(struct m0_client *instance, int num_io_maps)
M0_INTERNAL void ut_dummy_xfer_req_init(struct nw_xfer_request *xfer)
static struct m0_realm realm
M0_INTERNAL void ut_dummy_xfer_req_delete(struct nw_xfer_request *xfer)
static struct m0_fop * fop
static struct m0 instance
M0_INTERNAL void ut_dummy_obj_delete(struct m0_obj *obj)
M0_INTERNAL int ut_fini(void)
M0_INTERNAL void ut_set_node_state(struct m0_poolmach *pm, int node, enum m0_pool_nd_state state)
M0_INTERNAL void ut_m0_client_fini(struct m0_client **instance)
struct m0_layout_enum ut_layout_enum
const struct pargrp_iomap_ops mock_iomap_ops
M0_INTERNAL void ut_dummy_data_buf_delete(struct data_buf *db)
M0_INTERNAL void ut_realm_entity_setup(struct m0_realm *realm, struct m0_entity *ent, struct m0_client *cinst)
static int do_init(struct m0_client **instance)
M0_INTERNAL void ut_dummy_data_buf_init(struct data_buf *db)