Motr  M0
load.c File Reference
#include "lib/trace.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/locality.h"
#include "lib/misc.h"
#include "lib/string.h"
#include "lib/finject.h"
#include "ut/ut.h"
#include "conf/confd_stob.h"
#include "conf/flip_fom.h"
#include "conf/flip_fop.h"
#include "conf/load_fom.h"
#include "conf/load_fop.h"
#include "reqh/reqh.h"
#include "fop/fop.h"
#include "fop/fom.h"
#include "rpc/rpc_machine.h"
#include "sm/sm.h"
#include "spiel/ut/spiel_ut_common.h"
Include dependency graph for load.c:

Go to the source code of this file.

Data Structures

struct  m0_conf_ut_reqh
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define STR_LEN   1000
 

Functions

static void conf_fop_ut_release (struct m0_ref *ref)
 
static void conf_load_fom_create_fail (void)
 
static void conf_flip_fom_create_fail (void)
 
static void conf_save_load (void)
 
static void conf_save_load_fail (void)
 
static int conf_ut_reqh_init (struct m0_conf_ut_reqh *conf_reqh, const char *ep_addr)
 
static void conf_ut_reqh_fini (struct m0_conf_ut_reqh *conf_reqh)
 
static int conf_load_ut_init ()
 
static int conf_load_ut_fini ()
 

Variables

struct m0_conf_ut_reqhconf_reqh
 
const struct m0_fom_ops conf_load_fom_ops
 
const struct m0_fom_ops conf_flip_fom_ops
 
struct m0_ut_suite conf_load_ut
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 24 of file load.c.

◆ STR_LEN

#define STR_LEN   1000

Definition at line 46 of file load.c.

Function Documentation

◆ conf_flip_fom_create_fail()

static void conf_flip_fom_create_fail ( void  )
static

flip-fom-create-fail

Test fail create Flip FOM

Definition at line 115 of file load.c.

Here is the call graph for this function:

◆ conf_fop_ut_release()

static void conf_fop_ut_release ( struct m0_ref ref)
static

Definition at line 65 of file load.c.

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

◆ conf_load_fom_create_fail()

static void conf_load_fom_create_fail ( void  )
static

load-fom-create-fail

Test fail create Load FOM

Definition at line 78 of file load.c.

Here is the call graph for this function:

◆ conf_load_ut_fini()

static int conf_load_ut_fini ( )
static

spiel-conf-init

Definition at line 317 of file load.c.

Here is the call graph for this function:

◆ conf_load_ut_init()

static int conf_load_ut_init ( )
static

spiel-conf-init

Definition at line 303 of file load.c.

Here is the call graph for this function:

◆ conf_save_load()

static void conf_save_load ( void  )
static

confd-save-load test

Test to save and load confd configure file with confd STOB

Definition at line 149 of file load.c.

Here is the call graph for this function:

◆ conf_save_load_fail()

static void conf_save_load_fail ( void  )
static

confd-save-load-fail test

Test to save and load confd configure file with confd STOB

Definition at line 188 of file load.c.

Here is the call graph for this function:

◆ conf_ut_reqh_fini()

static void conf_ut_reqh_fini ( struct m0_conf_ut_reqh conf_reqh)
static

Finit reqh, rpc_machine, ect for tests

Definition at line 291 of file load.c.

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

◆ conf_ut_reqh_init()

static int conf_ut_reqh_init ( struct m0_conf_ut_reqh conf_reqh,
const char *  ep_addr 
)
static

Init reqh, rpc_machine, etc for tests

Definition at line 242 of file load.c.

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

Variable Documentation

◆ conf_load_ut

struct m0_ut_suite conf_load_ut
Initial value:
= {
.ts_name = "conf-load-ut",
.ts_init = conf_load_ut_init,
.ts_fini = conf_load_ut_fini,
.ts_tests = {
{ "load-fom-create-fail", conf_load_fom_create_fail },
{ "flip-fom-create-fail", conf_flip_fom_create_fail },
{ "confd-save-load", conf_save_load },
{ "confd-save-load-fail", conf_save_load_fail },
{ NULL, NULL },
},
}
#define NULL
Definition: misc.h:38
static void conf_save_load_fail(void)
Definition: load.c:188
static void conf_flip_fom_create_fail(void)
Definition: load.c:115
static void conf_load_fom_create_fail(void)
Definition: load.c:78
static void conf_save_load(void)
Definition: load.c:149
static int conf_load_ut_fini()
Definition: load.c:317
static int conf_load_ut_init()
Definition: load.c:303

Definition at line 324 of file load.c.

◆ conf_reqh

struct m0_conf_ut_reqh* conf_reqh

Definition at line 59 of file load.c.