Motr  M0
diter.c File Reference
#include "lib/trace.h"
#include "conf/diter.h"
#include "conf/obj_ops.h"
#include "conf/ut/common.h"
#include "conf/ut/rpc_helpers.h"
#include "rpc/rpclib.h"
#include "lib/fs.h"
#include "lib/memory.h"
#include "ut/misc.h"
#include "ut/ut.h"
Include dependency graph for diter.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define NAME(ext)   "utconfd" ext
 

Enumerations

enum  {
  PROF, FS, NODE, PROCESS0,
  SERVICE0, SERVICE1, SERVICE2, SERVICE3,
  SERVICE4, SERVICE5, SERVICE6, SERVICE7,
  SERVICE8, SDEV0, SDEV1, SDEV2,
  SDEV3, SDEV4, RACK, ENCLOSURE,
  CONTROLLER, DISK0, DISK1, DISK2,
  DISK3, DISK4, POOL, PVER,
  RACKV, ENCLOSUREV, CONTROLLERV, DISKV0,
  DISKV1, DISKV2, DISKV3, DISKV4,
  UNKNOWN_SVC
}
 

Functions

static void verify_obj (const struct m0_conf_obj *obj, const struct m0_fid *fid)
 
static void verify_node (const struct m0_conf_obj *obj)
 
static void verify_disk (const struct m0_conf_obj *obj)
 
static void check_objv (const struct m0_conf_obj *obj)
 
static void check_obj (const struct m0_conf_obj *obj)
 
static bool _filter_diskv (const struct m0_conf_obj *obj)
 
static void all_fs_to_diskv_check (struct m0_confc *confc, struct m0_conf_obj *root)
 
static void all_fs_to_disks_check (struct m0_confc *confc, struct m0_conf_obj *root)
 
static bool _filter_service (const struct m0_conf_obj *obj)
 
static void all_fs_to_sdevs_check (struct m0_confc *confc, struct m0_conf_obj *root, bool filter)
 
static void conf_diter_test (const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf)
 
static void test_diter_local (void)
 
static void test_diter_net (void)
 
static void test_diter_invalid_input (void)
 

Variables

static const struct m0_fid fids []
 
struct m0_ut_suite conf_diter_ut
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 23 of file diter.c.

◆ NAME

#define NAME (   ext)    "utconfd" ext

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROF 
FS 
NODE 
PROCESS0 
SERVICE0 
SERVICE1 
SERVICE2 
SERVICE3 
SERVICE4 
SERVICE5 
SERVICE6 
SERVICE7 
SERVICE8 
SDEV0 
SDEV1 
SDEV2 
SDEV3 
SDEV4 
RACK 
ENCLOSURE 
CONTROLLER 
DISK0 
DISK1 
DISK2 
DISK3 
DISK4 
POOL 
PVER 
RACKV 
ENCLOSUREV 
CONTROLLERV 
DISKV0 
DISKV1 
DISKV2 
DISKV3 
DISKV4 
UNKNOWN_SVC 

Definition at line 36 of file diter.c.

Function Documentation

◆ _filter_diskv()

static bool _filter_diskv ( const struct m0_conf_obj obj)
static

Definition at line 198 of file diter.c.

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

◆ _filter_service()

static bool _filter_service ( const struct m0_conf_obj obj)
static

Definition at line 263 of file diter.c.

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

◆ all_fs_to_disks_check()

static void all_fs_to_disks_check ( struct m0_confc confc,
struct m0_conf_obj root 
)
static

Definition at line 243 of file diter.c.

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

◆ all_fs_to_diskv_check()

static void all_fs_to_diskv_check ( struct m0_confc confc,
struct m0_conf_obj root 
)
static

Definition at line 206 of file diter.c.

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

◆ all_fs_to_sdevs_check()

static void all_fs_to_sdevs_check ( struct m0_confc confc,
struct m0_conf_obj root,
bool  filter 
)
static

Definition at line 268 of file diter.c.

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

◆ check_obj()

static void check_obj ( const struct m0_conf_obj obj)
static

Definition at line 158 of file diter.c.

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

◆ check_objv()

static void check_objv ( const struct m0_conf_obj obj)
static

Definition at line 143 of file diter.c.

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

◆ conf_diter_test()

static void conf_diter_test ( const char *  confd_addr,
struct m0_rpc_machine rpc_mach,
const char *  local_conf 
)
static

Definition at line 290 of file diter.c.

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

◆ test_diter_invalid_input()

static void test_diter_invalid_input ( void  )
static

Definition at line 360 of file diter.c.

Here is the call graph for this function:

◆ test_diter_local()

static void test_diter_local ( void  )
static

Definition at line 314 of file diter.c.

Here is the call graph for this function:

◆ test_diter_net()

static void test_diter_net ( void  )
static

Definition at line 325 of file diter.c.

Here is the call graph for this function:

◆ verify_disk()

static void verify_disk ( const struct m0_conf_obj obj)
static

Definition at line 133 of file diter.c.

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

◆ verify_node()

static void verify_node ( const struct m0_conf_obj obj)
static

Definition at line 122 of file diter.c.

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

◆ verify_obj()

static void verify_obj ( const struct m0_conf_obj obj,
const struct m0_fid fid 
)
static

Definition at line 116 of file diter.c.

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

Variable Documentation

◆ conf_diter_ut

struct m0_ut_suite conf_diter_ut
Initial value:
= {
.ts_name = "conf-diter-ut",
.ts_tests = {
{ "local", test_diter_local },
{ "net", test_diter_net },
{ "invalid input", test_diter_invalid_input },
{ NULL, NULL }
}
}
static void test_diter_net(void)
Definition: diter.c:325
#define NULL
Definition: misc.h:38
static void test_diter_local(void)
Definition: diter.c:314
static void test_diter_invalid_input(void)
Definition: diter.c:360
M0_INTERNAL int m0_conf_ut_ast_thread_fini(void)
Definition: common.c:96
M0_INTERNAL int m0_conf_ut_ast_thread_init(void)
Definition: common.c:86

Definition at line 392 of file diter.c.

◆ fids

const struct m0_fid fids[]
static

Definition at line 76 of file diter.c.