72 #define NUM_STRECORDS 10 111 struct m0_fop *request_fop;
314 int expect_ut_wait_for_reply_count,
315 int expect_ut_fop_fini_count,
316 uint64_t expect_txid,
317 size_t expect_locality)
502 int input_flag,
int expect_return,
503 int expect_ut_post_rpc_count,
504 int expect_ut_wait_for_reply_count,
505 int expect_ut_fop_fini_count)
605 int expect_ut_post_rpc_count,
606 int expect_ut_fop_fini_count)
670 {
"sync_request_launch_and_wait",
672 {
"sync_record_update",
676 {
"sync_request_fop_send",
static void fake_setup(void)
static int ut_post_rpc_count
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
struct m0_mutex en_pending_tx_lock
static int ut_post_rpc_delay
struct m0_mutex sc_max_pending_tx_lock
void ut_test_sync_record_update(void)
static int ut_wait_for_reply_count
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
int m0_entity_sync(struct m0_entity *ent)
static struct sync_interactions copy
struct m0_reqh_service_txid * sfw_stx
static struct sync_request sreq
void * m0_fop_data(const struct m0_fop *fop)
static void ut_reset_stub_counters(void)
M0_INTERNAL void m0_xcode_free_obj(struct m0_xcode_obj *obj)
static struct m0_rpc_conn conn
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_fop_type m0_fop_fsync_mds_fopt
static struct m0_rpc_item * item
static int ut_fop_fini_count
struct m0_tl en_pending_tx
void call_sync_reply_wait(struct m0_client *input_cinst, struct m0_obj *input_obj, struct sync_fop_wrapper *input_sfw, int expect_return, int expect_ut_wait_for_reply_count, int expect_ut_fop_fini_count, uint64_t expect_txid, size_t expect_locality)
static int ut_wait_for_reply_remote_return
struct m0_rpc_machine * c_rpc_machine
M0_INTERNAL int ut_sync_init(void)
struct m0_entity * srt_ent
void(* si_fop_fini)(struct m0_fop *fop)
static struct sync_target stgt
static int ut_post_rpc_early_return
static struct m0_reqh_service_txid sreq_stx[NUM_STRECORDS]
static int sync_request_launch_and_wait(struct sync_request *sreq, enum m0_fsync_mode mode)
struct m0_be_tx_remid stx_tri
struct m0_be_tx_remid ffr_be_remid
void test_sync_reply_wait_init(struct sync_fop_wrapper *sfw, struct m0_reqh_service_txid *stx)
int(* si_post_rpc)(struct m0_rpc_item *item)
struct m0_reqh_service_ctx * stx_service_ctx
enum m0_conf_service_type sc_type
struct m0_rpc_item * ri_reply
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL void ut_shuffle_test_order(struct m0_ut_suite *suite)
struct m0_ut_suite ut_suite_sync
void ut_test_m0_obj_sync(void)
static struct m0_reqh_service_ctx service
static struct m0_reqh_service_txid stx[NUM_STRECORDS]
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
struct sync_request * sfw_req
M0_INTERNAL void m0_tlink_init(const struct m0_tl_descr *d, void *obj)
static int ut_post_rpc_return
static int sync_request_fop_send(struct sync_request *sreq, struct m0_reqh_service_txid *stx, enum m0_fsync_mode mode, bool set_ri_ops, struct sync_fop_wrapper **sfw_out)
static void ut_fop_fini(struct m0_fop *fop)
static struct m0_client cinst
struct m0_fop_data f_data
static int ut_post_rpc(struct m0_rpc_item *item)
struct m0_realm * en_realm
void call_sync_request_launch_and_wait(struct m0_obj *input_obj, int input_flag, int expect_return, int expect_ut_post_rpc_count, int expect_ut_wait_for_reply_count, int expect_ut_fop_fini_count)
int(* si_wait_for_reply)(struct m0_rpc_item *item, m0_time_t timeout)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
struct m0_be_tx_remid ff_be_remid
static struct m0_realm realm
void(* si_fop_put)(struct m0_fop *fop)
static void ut_test_sync_request_launch_and_wait(void)
struct m0_rpc_session * ri_session
struct m0_entity ob_entity
void ut_test_sync_reply_wait(void)
M0_INTERNAL int ut_sync_fini(void)
static struct m0_fop * fop
void call_m0_obj_sync(struct m0_obj *obj, int expect_return, int expect_ut_post_rpc_count, int expect_ut_fop_fini_count)
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
static struct m0_fop reply_fop
struct m0_client * re_instance
struct m0_rpc_session rlk_sess
static int ut_wait_for_reply(struct m0_rpc_item *item, m0_time_t timeout)
static int sync_reply_wait(struct sync_fop_wrapper *sfw)
static struct m0_fop_fsync_rep reply_data
M0_INTERNAL void m0_client_init_io_op(void)
struct m0_rpc_link sc_rlink
#define M0_FOP_XCODE_OBJ(f)
void sync_record_update(struct m0_reqh_service_ctx *service, struct m0_entity *ent, struct m0_op *op, struct m0_be_tx_remid *btr)
struct m0_rpc_item f_item
static void ut_test_sync_request_fop_send(void)
union sync_target::@361 u
enum m0_entity_type en_type
static struct sync_interactions si
struct m0_rpc_conn * s_conn
struct m0_mutex sr_fops_lock
struct m0_reqh_service_txid sc_max_pending_tx
static int ut_wait_for_reply_return