Go to the source code of this file.
|
static int | ut_kernel_fsync (struct file *file, loff_t start, loff_t end, int datasync) |
|
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_fs_setup (void) |
|
static void | test_m0t1fs_fsync_request_create (void) |
|
void | test_m0t1fs_fsync_reply_process_init (struct m0t1fs_fsync_fop_wrapper *ffw, struct m0_reqh_service_txid *stx) |
|
void | call_m0t1fs_fsync_reply_process (struct m0t1fs_sb *input_csb, struct m0t1fs_inode *input_m0inode, struct m0t1fs_fsync_fop_wrapper *input_ffw, 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 | test_m0t1fs_fsync_reply_process (void) |
|
void | test_m0t1fs_fsync_record_update (void) |
|
void | call_m0t1fs_fsync_core (struct m0t1fs_inode *input_m0inode, 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 | test_m0t1fs_fsync_core (void) |
|
void | call_m0t1fs_fsync (struct file *input_file, loff_t start, loff_t end, int input_datamode, int expect_return, int expect_ut_kernel_fsync_count, int expect_ut_post_rpc_count, int expect_ut_fop_fini_count) |
|
void | fsync_test (void) |
|
◆ NUM_STRECORDS
◆ call_m0t1fs_fsync()
void call_m0t1fs_fsync |
( |
struct file * |
input_file, |
|
|
loff_t |
start, |
|
|
loff_t |
end, |
|
|
int |
input_datamode, |
|
|
int |
expect_return, |
|
|
int |
expect_ut_kernel_fsync_count, |
|
|
int |
expect_ut_post_rpc_count, |
|
|
int |
expect_ut_fop_fini_count |
|
) |
| |
◆ call_m0t1fs_fsync_core()
void call_m0t1fs_fsync_core |
( |
struct m0t1fs_inode * |
input_m0inode, |
|
|
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 |
|
) |
| |
◆ call_m0t1fs_fsync_reply_process()
void call_m0t1fs_fsync_reply_process |
( |
struct m0t1fs_sb * |
input_csb, |
|
|
struct m0t1fs_inode * |
input_m0inode, |
|
|
struct m0t1fs_fsync_fop_wrapper * |
input_ffw, |
|
|
int |
expect_return, |
|
|
int |
expect_ut_wait_for_reply_count, |
|
|
int |
expect_ut_fop_fini_count, |
|
|
uint64_t |
expect_txid, |
|
|
size_t |
expect_locality |
|
) |
| |
◆ fake_fs_setup()
static void fake_fs_setup |
( |
void |
| ) |
|
|
static |
(Re-)initialises our fake filesystem of super_block, dentry and inode. 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 184 of file fsync.c.
◆ fsync_test()
◆ test_m0t1fs_fsync_core()
static void test_m0t1fs_fsync_core |
( |
void |
| ) |
|
|
static |
Tests the m0t1fs_fsync_core function.
Definition at line 519 of file fsync.c.
◆ test_m0t1fs_fsync_record_update()
void test_m0t1fs_fsync_record_update |
( |
void |
| ) |
|
Tests the m0t1fs_fsync_record_update function.
Definition at line 473 of file fsync.c.
◆ test_m0t1fs_fsync_reply_process()
void test_m0t1fs_fsync_reply_process |
( |
void |
| ) |
|
Tests the m0t1fs_fsync_reply_process function.
Definition at line 339 of file fsync.c.
◆ test_m0t1fs_fsync_reply_process_init()
◆ test_m0t1fs_fsync_request_create()
static void test_m0t1fs_fsync_request_create |
( |
void |
| ) |
|
|
static |
Tests the m0t1fs_fsync_request_create function.
Definition at line 233 of file fsync.c.
◆ 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 156 of file fsync.c.
◆ ut_kernel_fsync()
static int ut_kernel_fsync |
( |
struct file * |
file, |
|
|
loff_t |
start, |
|
|
loff_t |
end, |
|
|
int |
datasync |
|
) |
| |
|
static |
◆ ut_post_rpc()
◆ ut_reset_stub_counters()
static void ut_reset_stub_counters |
( |
void |
| ) |
|
|
static |
Resets the stub counters.
Definition at line 168 of file fsync.c.
◆ ut_wait_for_reply()
◆ conn
struct m0_rpc_conn conn = { .c_rpc_machine = (void*)1 } |
◆ copy
◆ csb
◆ default_locality
◆ default_txid
◆ dentry
◆ fi
Ugly abstraction of m0t1fs_fsync interactions with wider motr code
- purely to facilitate unit testing
Definition at line 55 of file fsync.c.
◆ file
◆ m0inode
struct m0t1fs_inode m0inode |
|
static |
◆ reply_data
◆ reply_fop
◆ service
◆ stx
◆ super_block
struct super_block super_block |
|
static |
◆ ut_fop_fini_count
int ut_fop_fini_count = 0 |
|
static |
◆ ut_kernel_fsync_count
int ut_kernel_fsync_count = 0 |
|
static |
◆ ut_kernel_fsync_return
int ut_kernel_fsync_return = -EINVAL |
|
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_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 |