Go to the source code of this file.
|
static int | ut_post_rpc (struct m0_rpc_item *item) |
|
static int | ut_wait_for_reply (struct m0_rpc_item *item, m0_time_t timeout) |
|
static void | ut_fop_fini (struct m0_fop *fop) |
|
static void | ut_reset_stub_counters (void) |
|
static void | fake_setup (void) |
|
static void | ut_test_sync_request_fop_send (void) |
|
void | test_sync_reply_wait_init (struct sync_fop_wrapper *sfw, struct m0_reqh_service_txid *stx) |
|
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) |
|
void | ut_test_sync_reply_wait (void) |
|
void | ut_test_sync_record_update (void) |
|
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) |
|
static void | ut_test_sync_request_launch_and_wait (void) |
|
void | call_m0_obj_sync (struct m0_obj *obj, int expect_return, int expect_ut_post_rpc_count, int expect_ut_fop_fini_count) |
|
void | ut_test_m0_obj_sync (void) |
|
M0_INTERNAL int | ut_sync_init (void) |
|
M0_INTERNAL int | ut_sync_fini (void) |
|
◆ NUM_STRECORDS
◆ call_m0_obj_sync()
void call_m0_obj_sync |
( |
struct m0_obj * |
obj, |
|
|
int |
expect_return, |
|
|
int |
expect_ut_post_rpc_count, |
|
|
int |
expect_ut_fop_fini_count |
|
) |
| |
◆ call_sync_reply_wait()
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 |
|
) |
| |
◆ call_sync_request_launch_and_wait()
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 |
|
) |
| |
◆ fake_setup()
static void fake_setup |
( |
void |
| ) |
|
|
static |
(Re-)initialises our fake Client instance. These are fed to the functions we test so that their container-of mechanisms find objects of the correct type, with our fake values.
Definition at line 167 of file sync.c.
◆ test_sync_reply_wait_init()
◆ ut_fop_fini()
static void ut_fop_fini |
( |
struct m0_fop * |
fop | ) |
|
|
static |
Stub for fop_fini, frees any memory allocated to a fop, without the rpc_item reference counting getting upset that the fop was never sent/received.
Definition at line 140 of file sync.c.
◆ ut_post_rpc()
◆ ut_reset_stub_counters()
static void ut_reset_stub_counters |
( |
void |
| ) |
|
|
static |
Resets the stub counters.
Definition at line 152 of file sync.c.
◆ ut_sync_fini()
M0_INTERNAL int ut_sync_fini |
( |
void |
| ) |
|
◆ ut_sync_init()
M0_INTERNAL int ut_sync_init |
( |
void |
| ) |
|
◆ ut_test_m0_obj_sync()
void ut_test_m0_obj_sync |
( |
void |
| ) |
|
◆ ut_test_sync_record_update()
void ut_test_sync_record_update |
( |
void |
| ) |
|
Tests the sync_record_update function.
Definition at line 472 of file sync.c.
◆ ut_test_sync_reply_wait()
void ut_test_sync_reply_wait |
( |
void |
| ) |
|
Tests the sync_reply_wait function.
Definition at line 334 of file sync.c.
◆ ut_test_sync_request_fop_send()
static void ut_test_sync_request_fop_send |
( |
void |
| ) |
|
|
static |
Tests the sync_request_fop_send function.
Definition at line 224 of file sync.c.
◆ ut_test_sync_request_launch_and_wait()
static void ut_test_sync_request_launch_and_wait |
( |
void |
| ) |
|
|
static |
Tests the sync_launch_and_wait function.
Definition at line 522 of file sync.c.
◆ ut_wait_for_reply()
◆ cinst
◆ conn
struct m0_rpc_conn conn = { .c_rpc_machine = (void*)1 } |
|
static |
◆ copy
◆ default_locality
◆ default_txid
◆ obj
◆ realm
◆ reply_data
◆ reply_fop
◆ service
◆ sreq
◆ sreq_stx
◆ stgt
◆ stx
◆ ut_fop_fini_count
int ut_fop_fini_count = 0 |
|
static |
◆ ut_post_rpc_count
int ut_post_rpc_count = 0 |
|
static |
◆ ut_post_rpc_delay
int ut_post_rpc_delay = 0 |
|
static |
◆ ut_post_rpc_early_return
int ut_post_rpc_early_return = -EINVAL |
|
static |
◆ ut_post_rpc_return
int ut_post_rpc_return = -EINVAL |
|
static |
◆ ut_suite_sync
Initial value:= {
.ts_name = "sync-ut",
.ts_tests = {
{ "m0_obj_sync",
{ "sync_request_launch_and_wait",
{ "sync_record_update",
{ "sync_reply_wait",
{ "sync_request_fop_send",
}
}
void ut_test_sync_record_update(void)
M0_INTERNAL int ut_sync_init(void)
void ut_test_m0_obj_sync(void)
static void ut_test_sync_request_launch_and_wait(void)
void ut_test_sync_reply_wait(void)
M0_INTERNAL int ut_sync_fini(void)
static void ut_test_sync_request_fop_send(void)
Definition at line 47 of file sync.c.
◆ ut_wait_for_reply_count
int ut_wait_for_reply_count = 0 |
|
static |
◆ ut_wait_for_reply_remote_return
int ut_wait_for_reply_remote_return = 0 |
|
static |
◆ ut_wait_for_reply_return
int ut_wait_for_reply_return = -EINVAL |
|
static |