Motr  M0
rmut.h File Reference
#include "lib/types.h"
#include "lib/chan.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/time.h"
#include "ut/ut.h"
#include "fop/fom_generic.h"
#include "ut/ut_rpc_machine.h"
Include dependency graph for rmut.h:

Go to the source code of this file.

Data Structures

struct  rm_ut_data_ops
 
struct  rm_ut_data
 
struct  rm_ctx
 

Macros

#define __MOTR_RM_UT_RMUT_H__
 

Enumerations

enum  obj_type { OBJ_DOMAIN = 1, OBJ_RES_TYPE, OBJ_RES, OBJ_OWNER }
 
enum  rm_server {
  SERVER_1 = 0, SERVER_2, SERVER_3, SERVER_4,
  SERVER_NR, SERVER_INVALID
}
 
enum  rr_tests {
  TEST1 = 0, TEST2, TEST3, TEST4,
  TEST_NR
}
 
enum  flock_tests { LOCK_ON_CLIENT_TEST = 0, LOCK_ON_SERVER_TEST, DISTRIBUTED_LOCK_TEST, LOCK_TESTS_NR }
 
enum  group_tests {
  GROUP_BORROW_TEST1 = 0, GROUP_BORROW_TEST2, STAND_ALONE_BORROW_TEST, GROUP_REVOKE_TEST,
  GROUP_TESTS_NR
}
 
enum  rm_ut_credits_list { RCL_BORROWED, RCL_SUBLET, RCL_HELD, RCL_CACHED }
 

Functions

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_utdata_owner_windup_fini (struct rm_ut_data *data)
 
void rm_test_owner_capital_raise (struct m0_rm_owner *owner, struct m0_rm_credit *credit)
 
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_windup (enum rm_server srv_id)
 
void rm_ctx_server_owner_windup (enum rm_server srv_id)
 
void rm_ctx_server_stop (enum rm_server srv_id)
 
void creditor_cookie_setup (enum rm_server dsrv_id, enum rm_server csrv_id)
 
void loan_session_set (enum rm_server csrv_id, enum rm_server dsrv_id)
 
void credits_are_equal (enum rm_server srv_id, enum rm_ut_credits_list list_id, uint64_t value)
 
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)
 

Variables

struct rm_ut_data rm_test_data
 
M0_EXTERN struct rm_ctx rm_ctxs []
 
M0_EXTERN const char * serv_addr []
 
M0_EXTERN const int cob_ids []
 
M0_EXTERN struct m0_chan rm_ut_tests_chan
 
M0_EXTERN struct m0_mutex rm_ut_tests_chan_mutex
 

Macro Definition Documentation

◆ __MOTR_RM_UT_RMUT_H__

#define __MOTR_RM_UT_RMUT_H__

Definition at line 24 of file rmut.h.

Enumeration Type Documentation

◆ flock_tests

Enumerator
LOCK_ON_CLIENT_TEST 
LOCK_ON_SERVER_TEST 
DISTRIBUTED_LOCK_TEST 
LOCK_TESTS_NR 

Definition at line 62 of file rmut.h.

◆ group_tests

Enumerator
GROUP_BORROW_TEST1 
GROUP_BORROW_TEST2 
STAND_ALONE_BORROW_TEST 
GROUP_REVOKE_TEST 
GROUP_TESTS_NR 

Definition at line 72 of file rmut.h.

◆ obj_type

enum obj_type
Enumerator
OBJ_DOMAIN 
OBJ_RES_TYPE 
OBJ_RES 
OBJ_OWNER 

Definition at line 35 of file rmut.h.

◆ rm_server

enum rm_server
Enumerator
SERVER_1 
SERVER_2 
SERVER_3 
SERVER_4 
SERVER_NR 
SERVER_INVALID 

Definition at line 45 of file rmut.h.

◆ rm_ut_credits_list

Enumerator
RCL_BORROWED 
RCL_SUBLET 
RCL_HELD 
RCL_CACHED 

Definition at line 85 of file rmut.h.

◆ rr_tests

enum rr_tests
Enumerator
TEST1 
TEST2 
TEST3 
TEST4 
TEST_NR 

Definition at line 54 of file rmut.h.

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:

◆ 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:

◆ 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_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:

Variable Documentation

◆ cob_ids

M0_EXTERN const int cob_ids[]

Definition at line 146 of file rmut.h.

◆ rm_ctxs

M0_EXTERN struct rm_ctx rm_ctxs[]

Definition at line 144 of file rmut.h.

◆ rm_test_data

struct rm_ut_data rm_test_data

Definition at line 53 of file rmut.c.

◆ rm_ut_tests_chan

M0_EXTERN struct m0_chan rm_ut_tests_chan

Definition at line 147 of file rmut.h.

◆ rm_ut_tests_chan_mutex

M0_EXTERN struct m0_mutex rm_ut_tests_chan_mutex

Definition at line 148 of file rmut.h.

◆ serv_addr

M0_EXTERN const char* serv_addr[]

Definition at line 145 of file rmut.h.