Motr  M0
rmut.c File Reference
#include "lib/memory.h"
#include "lib/cookie.h"
#include "lib/misc.h"
#include "lib/string.h"
#include "lib/finject.h"
#include "rpc/rpclib.h"
#include "ut/ut.h"
#include "lib/ub.h"
#include "fid/fid.h"
#include "conf/obj.h"
#include "conf/obj_ops.h"
#include "conf/dir.h"
#include "rm/rm.h"
#include "rm/rm_service.h"
#include "rm/rm_internal.h"
#include "rm/ut/rings.h"
#include "rm/ut/rmut.h"
Include dependency graph for rmut.c:

Go to the source code of this file.

Functions

void rm_api_test (void)
 
void local_credits_test (void)
 
void rm_fom_funcs_test (void)
 
void rm_fop_funcs_test (void)
 
void flock_test (void)
 
void rm_group_test (void)
 
bool m0_rm_ur_tlist_is_empty (const struct m0_tl *list)
 
void m0_remotes_tlist_del (struct m0_rm_remote *other)
 
void rmsvc (void)
 
void rm_test_owner_capital_raise (struct m0_rm_owner *owner, struct m0_rm_credit *credit)
 
void rm_utdata_owner_windup_fini (struct rm_ut_data *data)
 
void rm_utdata_init (struct rm_ut_data *data, enum obj_type type)
 
void rm_utdata_fini (struct rm_ut_data *data, enum obj_type type)
 
void rm_ctx_init (struct rm_ctx *rmctx, enum rm_server id)
 
void rm_ctx_fini (struct rm_ctx *rmctx)
 
void rm_ctx_connect (struct rm_ctx *src, const struct rm_ctx *dest)
 
void rm_ctx_disconnect (struct rm_ctx *src, const struct rm_ctx *dest)
 
void rm_ctx_server_start (enum rm_server srv_id)
 
void rm_ctx_server_owner_windup (enum rm_server srv_id)
 
void rm_ctx_server_windup (enum rm_server srv_id)
 
void rm_ctx_server_stop (enum rm_server srv_id)
 
void rm_ctxs_rmsvc_conf_add (struct m0_confc *confc, struct rm_ctx *rmctx)
 
void rm_ctxs_conf_init (struct rm_ctx *rm_ctxs, int ctxs_nr)
 
void rm_ctxs_conf_fini (struct rm_ctx *rm_ctxs, int ctxs_nr)
 
void loan_session_set (enum rm_server csrv_id, enum rm_server dsrv_id)
 
void creditor_cookie_setup (enum rm_server dsrv_id, enum rm_server csrv_id)
 
void credits_are_equal (enum rm_server srv_id, enum rm_ut_credits_list list_id, uint64_t value)
 

Variables

const struct m0_tl_descr m0_remotes_tl
 
const char * serv_addr []
 
const int cob_ids [] = { 20, 30, 40, 50 }
 
struct rm_ut_data rm_test_data
 
struct rm_ctx rm_ctxs [SERVER_NR]
 
struct m0_chan rm_ut_tests_chan
 
struct m0_mutex rm_ut_tests_chan_mutex
 
struct rm_ut_data test_data
 
struct m0_reqh_servicermservice [SERVER_NR]
 
struct m0_ut_suite rm_ut
 

Function Documentation

◆ creditor_cookie_setup()

void creditor_cookie_setup ( enum rm_server  dsrv_id,
enum rm_server  csrv_id 
)

Definition at line 420 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ credits_are_equal()

void credits_are_equal ( enum rm_server  srv_id,
enum rm_ut_credits_list  list_id,
uint64_t  value 
)

Definition at line 429 of file rmut.c.

Here is the caller graph for this function:

◆ flock_test()

void flock_test ( void  )

Definition at line 514 of file file.c.

Here is the call graph for this function:

◆ loan_session_set()

void loan_session_set ( enum rm_server  csrv_id,
enum rm_server  dsrv_id 
)

Definition at line 399 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ local_credits_test()

void local_credits_test ( void  )

Definition at line 438 of file lcredits.c.

Here is the call graph for this function:

◆ m0_remotes_tlist_del()

void m0_remotes_tlist_del ( struct m0_rm_remote other)

◆ m0_rm_ur_tlist_is_empty()

bool m0_rm_ur_tlist_is_empty ( const struct m0_tl list)
Here is the caller graph for this function:

◆ rm_api_test()

void rm_api_test ( void  )

Definition at line 219 of file rmapi.c.

Here is the call graph for this function:

◆ rm_ctx_connect()

void rm_ctx_connect ( struct rm_ctx src,
const struct rm_ctx dest 
)

Definition at line 197 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctx_disconnect()

void rm_ctx_disconnect ( struct rm_ctx src,
const struct rm_ctx dest 
)

Definition at line 211 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctx_fini()

void rm_ctx_fini ( struct rm_ctx rmctx)

Definition at line 188 of file rmut.c.

Here is the call graph for this function:

◆ rm_ctx_init()

void rm_ctx_init ( struct rm_ctx rmctx,
enum rm_server  id 
)

Definition at line 164 of file rmut.c.

Here is the call graph for this function:

◆ rm_ctx_server_owner_windup()

void rm_ctx_server_owner_windup ( enum rm_server  srv_id)

Definition at line 264 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctx_server_start()

void rm_ctx_server_start ( enum rm_server  srv_id)

Definition at line 222 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctx_server_stop()

void rm_ctx_server_stop ( enum rm_server  srv_id)

Definition at line 291 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctx_server_windup()

void rm_ctx_server_windup ( enum rm_server  srv_id)

Definition at line 278 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctxs_conf_fini()

void rm_ctxs_conf_fini ( struct rm_ctx rm_ctxs,
int  ctxs_nr 
)

Definition at line 382 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctxs_conf_init()

void rm_ctxs_conf_init ( struct rm_ctx rm_ctxs,
int  ctxs_nr 
)

Definition at line 345 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_ctxs_rmsvc_conf_add()

void rm_ctxs_rmsvc_conf_add ( struct m0_confc confc,
struct rm_ctx rmctx 
)

Definition at line 307 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_fom_funcs_test()

void rm_fom_funcs_test ( void  )

Definition at line 657 of file rm_foms.c.

Here is the call graph for this function:

◆ rm_fop_funcs_test()

void rm_fop_funcs_test ( void  )

Definition at line 605 of file rm_fops.c.

Here is the call graph for this function:

◆ rm_group_test()

void rm_group_test ( void  )

Definition at line 271 of file group.c.

Here is the call graph for this function:

◆ rm_test_owner_capital_raise()

void rm_test_owner_capital_raise ( struct m0_rm_owner owner,
struct m0_rm_credit credit 
)

Definition at line 70 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_utdata_fini()

void rm_utdata_fini ( struct rm_ut_data data,
enum obj_type  type 
)

Definition at line 128 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_utdata_init()

void rm_utdata_init ( struct rm_ut_data data,
enum obj_type  type 
)

Definition at line 96 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rm_utdata_owner_windup_fini()

void rm_utdata_owner_windup_fini ( struct rm_ut_data data)

Definition at line 81 of file rmut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rmsvc()

void rmsvc ( void  )

Definition at line 229 of file rm_service.c.

Here is the call graph for this function:

Variable Documentation

◆ cob_ids

const int cob_ids[] = { 20, 30, 40, 50 }

Definition at line 49 of file rmut.c.

◆ m0_remotes_tl

const struct m0_tl_descr m0_remotes_tl

◆ rm_ctxs

struct rm_ctx rm_ctxs[SERVER_NR]

Definition at line 54 of file rmut.c.

◆ rm_test_data

struct rm_ut_data rm_test_data

Definition at line 53 of file rmut.c.

◆ rm_ut

struct m0_ut_suite rm_ut
Initial value:
= {
.ts_name = "rm-ut",
.ts_tests = {
{ "api", rm_api_test },
{ "lcredits", local_credits_test },
{ "fop-funcs", rm_fop_funcs_test },
{ "fom-funcs", rm_fom_funcs_test },
{ "rmsvc", rmsvc },
{ "flock", flock_test },
{ "group", rm_group_test },
{ NULL, NULL }
}
}
void flock_test(void)
Definition: file.c:514
#define NULL
Definition: misc.h:38
void rm_fop_funcs_test(void)
Definition: rm_fops.c:605
void rm_group_test(void)
Definition: group.c:271
void rmsvc(void)
Definition: rm_service.c:229
void rm_fom_funcs_test(void)
Definition: rm_foms.c:657
void local_credits_test(void)
Definition: lcredits.c:438
void rm_api_test(void)
Definition: rmapi.c:219

Definition at line 458 of file rmut.c.

◆ rm_ut_tests_chan

struct m0_chan rm_ut_tests_chan

Definition at line 55 of file rmut.c.

◆ rm_ut_tests_chan_mutex

struct m0_mutex rm_ut_tests_chan_mutex

Definition at line 56 of file rmut.c.

◆ rmservice

struct m0_reqh_service* rmservice[SERVER_NR]

Definition at line 162 of file rmut.c.

◆ serv_addr

const char* serv_addr[]
Initial value:
= { "0@lo:12345:34:1",
"0@lo:12345:34:2",
"0@lo:12345:34:3",
"0@lo:12345:34:4"
}

Definition at line 43 of file rmut.c.

◆ test_data

struct rm_ut_data test_data

Definition at line 68 of file rmut.c.