Motr  M0
test_pm.c File Reference
#include "ut/ut.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "pool/pool.h"
#include "cob/cob.h"
#include "ut/be.h"
#include "be/ut/helper.h"
#include "ha/note.h"
#include "lib/trace.h"
#include "lib/finject.h"
Include dependency graph for test_pm.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_POOL
 

Enumerations

enum  {
  PM_TEST_DEFAULT_DEVICE_NUMBER = 10, PM_TEST_DEFAULT_NODE_NUMBER = 1, PM_TEST_DEFAULT_MAX_DEVICE_FAILURE = 1, PM_TEST_DEFAULT_SPARE_NUMBER = 1,
  PM_TEST_DEFAULT_MAX_NODE_FAILURE = 1
}
 

Functions

static int pool_pver_init (uint32_t N, uint32_t K, uint32_t S)
 
static void pool_pver_fini (void)
 
static void pm_test_init_fini (void)
 
static void pm_test_transit (void)
 
static void pm_test_spare_slot (void)
 
static void pm_test_multi_fail (void)
 

Variables

static struct m0_fid M0_POOL_ID = M0_FID_TINIT('o', 1, 23)
 
static struct m0_fid M0_PVER_ID = M0_FID_TINIT('v', 1, 24)
 
static struct m0_pool pool
 
static struct m0_pool_version pver
 
struct m0_ut_suite poolmach_ut
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_POOL

Definition at line 33 of file test_pm.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PM_TEST_DEFAULT_DEVICE_NUMBER 
PM_TEST_DEFAULT_NODE_NUMBER 
PM_TEST_DEFAULT_MAX_DEVICE_FAILURE 
PM_TEST_DEFAULT_SPARE_NUMBER 
PM_TEST_DEFAULT_MAX_NODE_FAILURE 

Definition at line 37 of file test_pm.c.

Function Documentation

◆ pm_test_init_fini()

static void pm_test_init_fini ( void  )
static

Definition at line 71 of file test_pm.c.

Here is the call graph for this function:

◆ pm_test_multi_fail()

static void pm_test_multi_fail ( void  )
static

Definition at line 345 of file test_pm.c.

Here is the call graph for this function:

◆ pm_test_spare_slot()

static void pm_test_spare_slot ( void  )
static

Definition at line 181 of file test_pm.c.

Here is the call graph for this function:

◆ pm_test_transit()

static void pm_test_transit ( void  )
static

Definition at line 81 of file test_pm.c.

Here is the call graph for this function:

◆ pool_pver_fini()

static void pool_pver_fini ( void  )
static

Definition at line 64 of file test_pm.c.

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

◆ pool_pver_init()

static int pool_pver_init ( uint32_t  N,
uint32_t  K,
uint32_t  S 
)
static

Definition at line 50 of file test_pm.c.

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

Variable Documentation

◆ M0_POOL_ID

struct m0_fid M0_POOL_ID = M0_FID_TINIT('o', 1, 23)
static

Definition at line 45 of file test_pm.c.

◆ M0_PVER_ID

struct m0_fid M0_PVER_ID = M0_FID_TINIT('v', 1, 24)
static

Definition at line 46 of file test_pm.c.

◆ pool

struct m0_pool pool
static

Definition at line 47 of file test_pm.c.

◆ poolmach_ut

struct m0_ut_suite poolmach_ut
Initial value:
= {
.ts_name = "poolmach-ut",
.ts_tests = {
{ "pm_test init & fini", pm_test_init_fini },
{ "pm_test state transit", pm_test_transit },
{ "pm_test spare slot", pm_test_spare_slot },
{ "pm_test multi fail", pm_test_multi_fail },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void pm_test_spare_slot(void)
Definition: test_pm.c:181
static void pm_test_transit(void)
Definition: test_pm.c:81
static void pm_test_init_fini(void)
Definition: test_pm.c:71
static void pm_test_multi_fail(void)
Definition: test_pm.c:345

Definition at line 539 of file test_pm.c.

◆ pver

struct m0_pool_version pver
static

Definition at line 48 of file test_pm.c.