23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB 37 static uint32_t
int_pow(uint32_t
num, uint32_t exp);
44 uint32_t unique_chld_nr[
TP_NR];
45 uint32_t list_chld_nr[
TP_NR];
59 unique_chld_nr[children_nr] = 1;
63 children_nr =
i == tree.
ft_depth ? 0 : children_nr;
67 unique_chld_nr[children_nr] = 1;
73 list_chld_nr[cache_len] = 1;
76 sizeof unique_chld_nr));
142 return (
int_pow(
r, k + 1) - 1) / (
r - 1);
150 for (
i = 0;
i < exp; ++
i) {
160 uint64_t children_nr;
163 children_nr =
i == tree->
ft_depth ? 0 : param_type;
183 .
ts_name =
"failure_domains_tree-ut",
static void test_init_fini(void)
struct m0_ut_suite failure_domains_tree_ut
static void test_fault_inj(void)
M0_INTERNAL uint64_t m0_rnd(uint64_t max, uint64_t *seed)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
m0_time_t m0_time_now(void)
M0_INTERNAL void m0_fd_tree_destroy(struct m0_fd_tree *tree)
struct m0_fd_cache_info ft_cache_info
static void test_fd_tree(void)
static uint32_t int_pow(uint32_t num, uint32_t exp)
static int tree_populate(struct m0_fd_tree *tree, enum tree_type param_type)
static void m0_fi_enable_off_n_on_m(const char *func, const char *tag, uint32_t n, uint32_t m)
static uint32_t geometric_sum(uint16_t r, uint16_t k)
M0_INTERNAL int m0_fd__perm_cache_build(struct m0_fd_tree *tree)
M0_INTERNAL int fd_ut_tree_level_populate(struct m0_fd_tree *tree, uint64_t max_children, uint16_t level, enum tree_attr ta)
M0_INTERNAL int m0_fd__tree_root_create(struct m0_fd_tree *tree, uint64_t root_children)
M0_INTERNAL int fd_ut_tree_init(struct m0_fd_tree *tree, uint64_t tree_depth)
static void test_cache_init_fini(void)
static void test_perm_cache(void)