Motr  M0
spiel_ci_ut.c File Reference
#include "lib/trace.h"
#include "spiel/spiel.h"
#include "spiel/spiel_internal.h"
#include "spiel/ut/spiel_ut_common.h"
#include "conf/obj_ops.h"
#include "conf/confd.h"
#include "module/instance.h"
#include "stob/domain.h"
#include "rpc/rpc_opcodes.h"
#include "rm/rm_service.h"
#include "lib/finject.h"
#include "lib/fs.h"
#include "conf/ut/common.h"
#include "ut/misc.h"
#include "ut/ut.h"
#include "motr/version.h"
#include "ha/link.h"
Include dependency graph for spiel_ci_ut.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 

Functions

static void spiel_ci_ut_init (void)
 
static void spiel_ci_ut_fini (void)
 
static void spiel_ci_ut_ha_state_set (const struct m0_fid *fid, uint32_t state)
 
static void test_spiel_service_cmds (void)
 
static void test_spiel_process_services_list (void)
 
static void test_spiel_process_cmds (void)
 
static bool spiel_stob_exists (uint64_t cid)
 
static void test_spiel_device_cmds (void)
 
static void test_spiel_service_order (void)
 
static uint64_t test_spiel_fs_stats_sdevs_total (struct m0_confc *confc, struct m0_conf_service *ios)
 
static bool test_spiel_filter_service (const struct m0_conf_obj *obj)
 
static uint64_t test_spiel_fs_ios_total (void)
 
static void spiel_fs_stats_check (const struct m0_fs_stats *stats)
 
void test_spiel_fs_stats (void)
 
void test_spiel_bc_stats (void)
 
static void spiel_repair_start (const struct m0_fid *pool_fid, const struct m0_fid *svc_fid, enum m0_repreb_type type)
 
static void wait_for_repair_rebalance (enum m0_repreb_type type, enum m0_cm_op op, struct m0_spiel_repreb_status **status, const struct m0_fid *pool_fid, const struct m0_fid *svc_fid)
 
static void test_spiel_pool_repair (enum m0_repreb_type type)
 
static void test_spiel_sns_repair (void)
 
static void test_spiel_dix_repair (void)
 
static void test_spiel_pool_rebalance (enum m0_repreb_type type)
 
static void test_spiel_sns_rebalance (void)
 
static void test_spiel_dix_rebalance (void)
 
static int spiel_ci_tests_init ()
 
static int spiel_ci_tests_fini ()
 

Variables

static struct m0_spiel spiel
 
uint32_t m0_rpc__filter_opcode [4]
 
struct m0_ut_suite spiel_ci_ut
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 23 of file spiel_ci_ut.c.

Function Documentation

◆ spiel_ci_tests_fini()

static int spiel_ci_tests_fini ( )
static

Definition at line 831 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ spiel_ci_tests_init()

static int spiel_ci_tests_init ( )
static

Definition at line 826 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ spiel_ci_ut_fini()

static void spiel_ci_ut_fini ( void  )
static

Definition at line 53 of file spiel_ci_ut.c.

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

◆ spiel_ci_ut_ha_state_set()

static void spiel_ci_ut_ha_state_set ( const struct m0_fid fid,
uint32_t  state 
)
static

Definition at line 60 of file spiel_ci_ut.c.

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

◆ spiel_ci_ut_init()

static void spiel_ci_ut_init ( void  )
static

Definition at line 46 of file spiel_ci_ut.c.

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

◆ spiel_fs_stats_check()

static void spiel_fs_stats_check ( const struct m0_fs_stats stats)
static

Definition at line 422 of file spiel_ci_ut.c.

Here is the caller graph for this function:

◆ spiel_repair_start()

static void spiel_repair_start ( const struct m0_fid pool_fid,
const struct m0_fid svc_fid,
enum m0_repreb_type  type 
)
static

Definition at line 545 of file spiel_ci_ut.c.

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

◆ spiel_stob_exists()

static bool spiel_stob_exists ( uint64_t  cid)
static

Definition at line 217 of file spiel_ci_ut.c.

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

◆ test_spiel_bc_stats()

void test_spiel_bc_stats ( void  )

Definition at line 521 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_device_cmds()

static void test_spiel_device_cmds ( void  )
static

Definition at line 234 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_dix_rebalance()

static void test_spiel_dix_rebalance ( void  )
static

Definition at line 821 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_dix_repair()

static void test_spiel_dix_repair ( void  )
static

Definition at line 709 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_filter_service()

static bool test_spiel_filter_service ( const struct m0_conf_obj obj)
static

Definition at line 376 of file spiel_ci_ut.c.

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

◆ test_spiel_fs_ios_total()

static uint64_t test_spiel_fs_ios_total ( void  )
static

Definition at line 381 of file spiel_ci_ut.c.

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

◆ test_spiel_fs_stats()

void test_spiel_fs_stats ( void  )

Definition at line 430 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_fs_stats_sdevs_total()

static uint64_t test_spiel_fs_stats_sdevs_total ( struct m0_confc confc,
struct m0_conf_service ios 
)
static

Definition at line 353 of file spiel_ci_ut.c.

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

◆ test_spiel_pool_rebalance()

static void test_spiel_pool_rebalance ( enum m0_repreb_type  type)
static

Definition at line 714 of file spiel_ci_ut.c.

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

◆ test_spiel_pool_repair()

static void test_spiel_pool_repair ( enum m0_repreb_type  type)
static

Definition at line 607 of file spiel_ci_ut.c.

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

◆ test_spiel_process_cmds()

static void test_spiel_process_cmds ( void  )
static

Must be last test in tests set - because switch off services on server side

Definition at line 148 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_process_services_list()

static void test_spiel_process_services_list ( void  )
static

Definition at line 129 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_service_cmds()

static void test_spiel_service_cmds ( void  )
static

Definition at line 72 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_service_order()

static void test_spiel_service_order ( void  )
static

Definition at line 313 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_sns_rebalance()

static void test_spiel_sns_rebalance ( void  )
static

Definition at line 816 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ test_spiel_sns_repair()

static void test_spiel_sns_repair ( void  )
static

Definition at line 704 of file spiel_ci_ut.c.

Here is the call graph for this function:

◆ wait_for_repair_rebalance()

static void wait_for_repair_rebalance ( enum m0_repreb_type  type,
enum m0_cm_op  op,
struct m0_spiel_repreb_status **  status,
const struct m0_fid pool_fid,
const struct m0_fid svc_fid 
)
static

Definition at line 568 of file spiel_ci_ut.c.

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

Variable Documentation

◆ spiel

struct m0_spiel spiel
static

Definition at line 44 of file spiel_ci_ut.c.

◆ spiel_ci_ut

struct m0_ut_suite spiel_ci_ut
Initial value:
= {
.ts_name = "spiel-ci-ut",
.ts_init = spiel_ci_tests_init,
.ts_fini = spiel_ci_tests_fini,
.ts_tests = {
{ "service-cmds", test_spiel_service_cmds },
{ "process-cmds", test_spiel_process_cmds },
{ "service-order", test_spiel_service_order },
{ "process-services-list", test_spiel_process_services_list },
{ "device-cmds", test_spiel_device_cmds },
{ "stats", test_spiel_fs_stats },
{ "bytecount-stats", test_spiel_bc_stats },
{ "pool-sns-repair", test_spiel_sns_repair },
{ "pool-sns-rebalance", test_spiel_sns_rebalance },
{ "pool-dix-repair", test_spiel_dix_repair },
{ "pool-dix-rebalance", test_spiel_dix_rebalance },
{ NULL, NULL }
}
}
static void test_spiel_service_cmds(void)
Definition: spiel_ci_ut.c:72
static int spiel_ci_tests_fini()
Definition: spiel_ci_ut.c:831
static void test_spiel_device_cmds(void)
Definition: spiel_ci_ut.c:234
#define NULL
Definition: misc.h:38
static void test_spiel_process_services_list(void)
Definition: spiel_ci_ut.c:129
static void test_spiel_sns_repair(void)
Definition: spiel_ci_ut.c:704
static void test_spiel_service_order(void)
Definition: spiel_ci_ut.c:313
void test_spiel_bc_stats(void)
Definition: spiel_ci_ut.c:521
static void test_spiel_dix_rebalance(void)
Definition: spiel_ci_ut.c:821
static void test_spiel_sns_rebalance(void)
Definition: spiel_ci_ut.c:816
void test_spiel_fs_stats(void)
Definition: spiel_ci_ut.c:430
static void test_spiel_process_cmds(void)
Definition: spiel_ci_ut.c:148
static void test_spiel_dix_repair(void)
Definition: spiel_ci_ut.c:709
static int spiel_ci_tests_init()
Definition: spiel_ci_ut.c:826

Definition at line 836 of file spiel_ci_ut.c.