Motr  M0
plan.c File Reference
#include "lib/trace.h"
#include "lib/errno.h"
#include "lib/vec.h"
#include "rpc/rpclib.h"
#include "ut/ut.h"
#include "ut/misc.h"
#include "motr/client_internal.h"
#include "motr/io.h"
#include "motr/ut/client.h"
#include "layout/plan.h"
Include dependency graph for plan.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LAYOUT
 
#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"
 
#define SERVER_ENDPOINT   M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR
 
#define CLIENT_ENDPOINT_ADDR   "0@lo:12345:34:2"
 

Functions

static int lap_ut_server_start (void)
 
static void lap_ut_server_stop (void)
 
static int lap_ut_client_start (void)
 
static void lap_ut_client_stop (void)
 
static void test_plan_build_fini (void)
 
static void test_plan_get_done (void)
 
static int lap_ut_init (void)
 
static int lap_ut_fini (void)
 

Variables

static struct m0_clientclient_inst = NULL
 
static const char SERVER_LOGFILE [] = "lap_ut.log"
 
static char * lap_ut_server_args []
 
static struct m0_rpc_server_ctx lap_ut_sctx
 
static struct m0_idx_dix_config dix_conf
 
static struct m0_config client_conf
 
struct m0_ut_suite layout_access_plan_ut
 

Macro Definition Documentation

◆ CLIENT_ENDPOINT_ADDR

#define CLIENT_ENDPOINT_ADDR   "0@lo:12345:34:2"

Definition at line 42 of file plan.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LAYOUT

Definition at line 25 of file plan.c.

◆ SERVER_ENDPOINT

#define SERVER_ENDPOINT   M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR

Definition at line 41 of file plan.c.

◆ SERVER_ENDPOINT_ADDR

#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"

Definition at line 40 of file plan.c.

Function Documentation

◆ lap_ut_client_start()

static int lap_ut_client_start ( void  )
static

Definition at line 93 of file plan.c.

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

◆ lap_ut_client_stop()

static void lap_ut_client_stop ( void  )
static

Definition at line 115 of file plan.c.

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

◆ lap_ut_fini()

static int lap_ut_fini ( void  )
static

Definition at line 318 of file plan.c.

Here is the call graph for this function:

◆ lap_ut_init()

static int lap_ut_init ( void  )
static

Definition at line 305 of file plan.c.

Here is the call graph for this function:

◆ lap_ut_server_start()

static int lap_ut_server_start ( void  )
static

Definition at line 62 of file plan.c.

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

◆ lap_ut_server_stop()

static void lap_ut_server_stop ( void  )
static

Definition at line 70 of file plan.c.

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

◆ test_plan_build_fini()

static void test_plan_build_fini ( void  )
static

Definition at line 124 of file plan.c.

Here is the call graph for this function:

◆ test_plan_get_done()

static void test_plan_get_done ( void  )
static

Definition at line 181 of file plan.c.

Here is the call graph for this function:

Variable Documentation

◆ client_conf

struct m0_config client_conf
static
Initial value:
= {
.mc_is_oostore = true,
.mc_is_read_verify = false,
.mc_layout_id = 1,
.mc_local_addr = CLIENT_ENDPOINT_ADDR,
.mc_ha_addr = SERVER_ENDPOINT_ADDR,
.mc_profile = M0_UT_CONF_PROFILE,
.mc_process_fid = M0_UT_CONF_PROCESS,
.mc_tm_recv_queue_min_len = M0_NET_TM_RECV_QUEUE_DEF_LEN,
.mc_max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE,
.mc_idx_service_id = M0_IDX_DIX,
.mc_idx_service_conf = &dix_conf,
}
#define M0_UT_CONF_PROFILE
Definition: misc.h:43
#define CLIENT_ENDPOINT_ADDR
Definition: plan.c:42
Definition: idx.h:70
#define SERVER_ENDPOINT_ADDR
Definition: plan.c:40
static struct m0_idx_dix_config dix_conf
Definition: plan.c:75
#define M0_UT_CONF_PROCESS
Definition: misc.h:45

Definition at line 79 of file plan.c.

◆ client_inst

struct m0_client* client_inst = NULL
static

Definition at line 38 of file plan.c.

◆ dix_conf

struct m0_idx_dix_config dix_conf
static
Initial value:
= {
.kc_create_meta = false,
}

Definition at line 75 of file plan.c.

◆ lap_ut_sctx

struct m0_rpc_server_ctx lap_ut_sctx
static
Initial value:
= {
.rsx_argv = lap_ut_server_args,
.rsx_log_file_name = SERVER_LOGFILE,
}
static const char SERVER_LOGFILE[]
Definition: plan.c:44
static char * lap_ut_server_args[]
Definition: plan.c:46
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 56 of file plan.c.

◆ lap_ut_server_args

char* lap_ut_server_args[]
static
Initial value:
= { "m0d", "-T", "AD",
"-D", "db", "-S", "stob",
"-A", "linuxstob:addb-stob",
"-w", "10",
"-c", M0_SRC_PATH("motr/ut/dix_conf.xc")}
#define M0_SRC_PATH(name)
Definition: misc.h:48
#define SERVER_ENDPOINT_ADDR
Definition: plan.c:40
#define M0_UT_CONF_PROCESS
Definition: misc.h:45
#define SERVER_ENDPOINT
Definition: plan.c:41

Definition at line 46 of file plan.c.

◆ layout_access_plan_ut

struct m0_ut_suite layout_access_plan_ut
Initial value:
= {
.ts_name = "layout-access-plan-ut",
.ts_owners = "Andriy T.",
.ts_init = lap_ut_init,
.ts_fini = lap_ut_fini,
.ts_tests = {
{ "layout-access-plan-build-fini", test_plan_build_fini },
{ "layout-access-plan-get-done", test_plan_get_done },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void test_plan_get_done(void)
Definition: plan.c:181
static int lap_ut_init(void)
Definition: plan.c:305
static void test_plan_build_fini(void)
Definition: plan.c:124
static int lap_ut_fini(void)
Definition: plan.c:318

Definition at line 326 of file plan.c.

◆ SERVER_LOGFILE

const char SERVER_LOGFILE[] = "lap_ut.log"
static

Definition at line 44 of file plan.c.