Motr  M0
rpc_machine.c File Reference
#include "ut/ut.h"
#include "lib/finject.h"
#include "rpc/rpc.h"
#include "rpc/rpc_internal.h"
#include "net/net.h"
#include "net/buffer_pool.h"
#include "net/lnet/lnet.h"
#include "rpc/ut/clnt_srv_ctx.c"
Include dependency graph for rpc_machine.c:

Go to the source code of this file.

Functions

static int rpc_mc_ut_init (void)
 
static int rpc_mc_ut_fini (void)
 
static void rpc_mc_init_fini_test (void)
 
static void rpc_mc_fini_race_test (void)
 
static void rpc_mc_init_fail_test (void)
 
static void conn_added (struct m0_rpc_machine_watch *watch, struct m0_rpc_conn *conn)
 
static void session_added (struct m0_rpc_machine_watch *watch, struct m0_rpc_session *session)
 
static void mach_terminated (struct m0_rpc_machine_watch *watch)
 
static void rpc_machine_watch_test (void)
 

Variables

static struct m0_rpc_machine machine
 
static uint32_t max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE
 
static const char * ep_addr = "0@lo:12345:34:2"
 
static struct m0_net_buffer_pool buf_pool
 
static struct m0_reqh reqh
 
static uint32_t tm_recv_queue_min_len = M0_NET_TM_RECV_QUEUE_DEF_LEN
 
static bool conn_added_called
 
static bool session_added_called
 
static bool mach_terminated_called
 
struct m0_ut_suite rpc_mc_ut
 

Function Documentation

◆ conn_added()

static void conn_added ( struct m0_rpc_machine_watch watch,
struct m0_rpc_conn conn 
)
static

Definition at line 158 of file rpc_machine.c.

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

◆ mach_terminated()

static void mach_terminated ( struct m0_rpc_machine_watch watch)
static

Definition at line 176 of file rpc_machine.c.

Here is the caller graph for this function:

◆ rpc_machine_watch_test()

static void rpc_machine_watch_test ( void  )
static

Definition at line 182 of file rpc_machine.c.

Here is the call graph for this function:

◆ rpc_mc_fini_race_test()

static void rpc_mc_fini_race_test ( void  )
static

Definition at line 89 of file rpc_machine.c.

Here is the call graph for this function:

◆ rpc_mc_init_fail_test()

static void rpc_mc_init_fail_test ( void  )
static

Root session cob as well as other mkfs related structres are now created on behalf of serivice startup if -p option is specified.

Definition at line 122 of file rpc_machine.c.

Here is the call graph for this function:

◆ rpc_mc_init_fini_test()

static void rpc_mc_init_fini_test ( void  )
static

Definition at line 73 of file rpc_machine.c.

Here is the call graph for this function:

◆ rpc_mc_ut_fini()

static int rpc_mc_ut_fini ( void  )
static

Definition at line 65 of file rpc_machine.c.

Here is the call graph for this function:

◆ rpc_mc_ut_init()

static int rpc_mc_ut_init ( void  )
static

Definition at line 40 of file rpc_machine.c.

Here is the call graph for this function:

◆ session_added()

static void session_added ( struct m0_rpc_machine_watch watch,
struct m0_rpc_session session 
)
static

Definition at line 167 of file rpc_machine.c.

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

Variable Documentation

◆ buf_pool

struct m0_net_buffer_pool buf_pool
static

Definition at line 36 of file rpc_machine.c.

◆ conn_added_called

bool conn_added_called
static

Definition at line 154 of file rpc_machine.c.

◆ ep_addr

const char* ep_addr = "0@lo:12345:34:2"
static

Definition at line 35 of file rpc_machine.c.

◆ mach_terminated_called

bool mach_terminated_called
static

Definition at line 156 of file rpc_machine.c.

◆ machine

struct m0_rpc_machine machine
static

Definition at line 33 of file rpc_machine.c.

◆ max_rpc_msg_size

uint32_t max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE
static

Definition at line 34 of file rpc_machine.c.

◆ reqh

struct m0_reqh reqh
static

Definition at line 37 of file rpc_machine.c.

◆ rpc_mc_ut

struct m0_ut_suite rpc_mc_ut
Initial value:
= {
.ts_name = "rpc-machine-ut",
.ts_init = rpc_mc_ut_init,
.ts_fini = rpc_mc_ut_fini,
.ts_tests = {
{ "rpc_mc_init_fini", rpc_mc_init_fini_test },
{ "rpc_mc_fini_race", rpc_mc_fini_race_test },
{ "rpc_mc_init_fail", rpc_mc_init_fail_test },
{ "rpc_mc_watch", rpc_machine_watch_test},
{ NULL, NULL}
}
}
#define NULL
Definition: misc.h:38
static void rpc_mc_init_fail_test(void)
Definition: rpc_machine.c:122
static void rpc_mc_fini_race_test(void)
Definition: rpc_machine.c:89
static int rpc_mc_ut_fini(void)
Definition: rpc_machine.c:65
static void rpc_mc_init_fini_test(void)
Definition: rpc_machine.c:73
static void rpc_machine_watch_test(void)
Definition: rpc_machine.c:182
static int rpc_mc_ut_init(void)
Definition: rpc_machine.c:40

Definition at line 222 of file rpc_machine.c.

◆ session_added_called

bool session_added_called
static

Definition at line 155 of file rpc_machine.c.

◆ tm_recv_queue_min_len

uint32_t tm_recv_queue_min_len = M0_NET_TM_RECV_QUEUE_DEF_LEN
static

Definition at line 38 of file rpc_machine.c.