Motr  M0
long_lock_ut.c File Reference
#include "ut/ut.h"
#include "fop/fop.h"
#include "reqh/reqh.h"
#include "rpc/rpclib.h"
#include "rpc/rpc_opcodes.h"
#include "net/lnet/lnet.h"
#include "fop/fom_generic.h"
#include "ut/ut_rpc_machine.h"
#include "fop/ut/long_lock/rdwr_fom.c"
#include "fop/ut/long_lock/rdwr_test_bench.c"
Include dependency graph for long_lock_ut.c:

Go to the source code of this file.

Enumerations

enum  { RDWR_REQUEST_MAX = 48, REQH_IN_UT_MAX = 2 }
 

Functions

static void test_long_lock_n (void)
 
static void test_long_lock_1 (void)
 
static int ut_long_lock_service_start (struct m0_reqh_service *service)
 
static void ut_long_lock_service_stop (struct m0_reqh_service *service)
 
static void ut_long_lock_service_fini (struct m0_reqh_service *service)
 
static int ut_long_lock_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static int test_long_lock_init (void)
 
static int test_long_lock_fini (void)
 

Variables

static const char * ll_serv_addr []
 
static const int ll_cob_ids [] = { 20, 30 }
 
static struct m0_ut_rpc_mach_ctx rmach_ctx [REQH_IN_UT_MAX]
 
static struct m0_reqh_serviceservice [REQH_IN_UT_MAX]
 
struct m0_fom_type rdwr_fom_type
 
const struct m0_fom_type_ops fom_rdwr_type_ops
 
static const struct m0_reqh_service_ops ut_long_lock_service_ops
 
static const struct m0_reqh_service_type_ops ut_long_lock_service_type_ops
 
struct m0_reqh_service_type ut_long_lock_service_type
 
struct m0_ut_suite m0_fop_lock_ut
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RDWR_REQUEST_MAX 
REQH_IN_UT_MAX 

Definition at line 31 of file long_lock_ut.c.

Function Documentation

◆ test_long_lock_1()

static void test_long_lock_1 ( void  )
static

Definition at line 57 of file long_lock_ut.c.

Here is the call graph for this function:

◆ test_long_lock_fini()

static int test_long_lock_fini ( void  )
static

Definition at line 147 of file long_lock_ut.c.

Here is the call graph for this function:

◆ test_long_lock_init()

static int test_long_lock_init ( void  )
static

Definition at line 114 of file long_lock_ut.c.

Here is the call graph for this function:

◆ test_long_lock_n()

static void test_long_lock_n ( void  )
static

Definition at line 50 of file long_lock_ut.c.

Here is the call graph for this function:

◆ ut_long_lock_service_allocate()

static int ut_long_lock_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 88 of file long_lock_ut.c.

◆ ut_long_lock_service_fini()

static void ut_long_lock_service_fini ( struct m0_reqh_service service)
static

Definition at line 75 of file long_lock_ut.c.

Here is the call graph for this function:

◆ ut_long_lock_service_start()

static int ut_long_lock_service_start ( struct m0_reqh_service service)
static

Definition at line 64 of file long_lock_ut.c.

◆ ut_long_lock_service_stop()

static void ut_long_lock_service_stop ( struct m0_reqh_service service)
static

Definition at line 70 of file long_lock_ut.c.

Variable Documentation

◆ fom_rdwr_type_ops

const struct m0_fom_type_ops fom_rdwr_type_ops

FOM type specific functions for rdwr FOP.

Definition at line 56 of file rdwr_fom.c.

◆ ll_cob_ids

const int ll_cob_ids[] = { 20, 30 }
static

Definition at line 43 of file long_lock_ut.c.

◆ ll_serv_addr

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

Definition at line 39 of file long_lock_ut.c.

◆ m0_fop_lock_ut

struct m0_ut_suite m0_fop_lock_ut
Initial value:
= {
.ts_name = "fop-lock-ut",
.ts_init = test_long_lock_init,
.ts_fini = test_long_lock_fini,
.ts_tests = {
{ "fop-lock-1reqh", test_long_lock_1 },
{ "fop-lock-2reqh", test_long_lock_n },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static int test_long_lock_init(void)
Definition: long_lock_ut.c:114
static void test_long_lock_1(void)
Definition: long_lock_ut.c:57
static void test_long_lock_n(void)
Definition: long_lock_ut.c:50
static int test_long_lock_fini(void)
Definition: long_lock_ut.c:147

Definition at line 159 of file long_lock_ut.c.

◆ rdwr_fom_type

struct m0_fom_type rdwr_fom_type

Rdwr specific FOM type operations vector.

Definition at line 61 of file rdwr_fom.c.

◆ rmach_ctx

struct m0_ut_rpc_mach_ctx rmach_ctx[REQH_IN_UT_MAX]
static

Definition at line 45 of file long_lock_ut.c.

◆ service

struct m0_reqh_service* service[REQH_IN_UT_MAX]
static

Definition at line 46 of file long_lock_ut.c.

◆ ut_long_lock_service_ops

const struct m0_reqh_service_ops ut_long_lock_service_ops
static
Initial value:
= {
}
static void ut_long_lock_service_fini(struct m0_reqh_service *service)
Definition: long_lock_ut.c:75
static void ut_long_lock_service_stop(struct m0_reqh_service *service)
Definition: long_lock_ut.c:70
static int ut_long_lock_service_start(struct m0_reqh_service *service)
Definition: long_lock_ut.c:64

Definition at line 81 of file long_lock_ut.c.

◆ ut_long_lock_service_type

struct m0_reqh_service_type ut_long_lock_service_type
Initial value:
= {
.rst_name = "ut-long-lock-service",
.rst_level = M0_RS_LEVEL_NORMAL,
}
static const struct m0_reqh_service_type_ops ut_long_lock_service_type_ops
Definition: long_lock_ut.c:104

Definition at line 108 of file long_lock_ut.c.

◆ ut_long_lock_service_type_ops

const struct m0_reqh_service_type_ops ut_long_lock_service_type_ops
static
Initial value:
= {
.rsto_service_allocate = ut_long_lock_service_allocate
}
static int ut_long_lock_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: long_lock_ut.c:88

Definition at line 104 of file long_lock_ut.c.