Motr
M0
|
#include "be/tx_regmap.h"
#include "ut/ut.h"
#include "lib/types.h"
#include "lib/arith.h"
#include "lib/misc.h"
#include "lib/string.h"
#include "be/ut/helper.h"
Go to the source code of this file.
Data Structures | |
struct | be_ut_rdt_reg_d |
struct | be_ut_test_reg |
struct | be_ut_test_reg_suite |
Macros | |
#define | LOGD(...) |
#define | BUT_TR(begin, end, do_insert, desired_nr, desired_len) |
#define | BUT_TRA_NAME(name) be_ut_tra_##name |
#define | DEFINE_BUT_TRA(name, ...) static struct be_ut_test_reg BUT_TRA_NAME(name)[] = { __VA_ARGS__ } |
#define | BUT_TRS(name) |
Enumerations | |
enum | { BE_UT_RDT_SIZE = 0x10, BE_UT_RDT_R_SIZE = 0x4, BE_UT_RDT_ITER = 0x10000 } |
enum | { BE_UT_REGMAP_ITER = 0x10000, BE_UT_REGMAP_LEN = 0x20, BE_UT_REGMAP_R_SIZE = 0x10 } |
enum | { BE_UT_RA_SEG_SIZE = 0x10000, BE_UT_RA_TEST_NR = 0x100, BE_UT_RA_R_SIZE = 0x10, BE_UT_RA_SIZE = 0x20, BE_UT_RA_ITER = 0x10000 } |
enum | { BE_UT_RA_MERGE_SEG_SIZE = 0x10000, BE_UT_RA_MERGE_R_SIZE_MIN = 1, BE_UT_RA_MERGE_R_SIZE_MAX = 4, BE_UT_RA_MERGE_R_SPACE_MIN = 0, BE_UT_RA_MERGE_R_SPACE_MAX = 2, BE_UT_RA_MERGE_R_NR_MAX = 5, BE_UT_RA_MERGE_SIZE_TOTAL = 16, BE_UT_RA_MERGE_NR = 0x100, BE_UT_RA_MERGE_ITER = 0x100 } |
Functions | |
static bool | be_ut_reg_d_is_equal (const struct m0_be_reg_d *rd1, const struct m0_be_reg_d *rd2) |
static int | be_ut_rdt_del_find (int index) |
static void | be_ut_reg_d_tree_check (void) |
void | m0_be_ut_reg_d_tree (void) |
DEFINE_BUT_TRA (ins_simple, BUT_TR(1, 3, true, 1, 2)) | |
DEFINE_BUT_TRA (ins_size1, BUT_TR(1, 2, true, 1, 1)) | |
DEFINE_BUT_TRA (ins2, BUT_TR(1, 3, true, 1, 2), BUT_TR(4, 6, true, 2, 4)) | |
DEFINE_BUT_TRA (ins2_size1, BUT_TR(1, 2, true, 1, 1), BUT_TR(2, 3, true, 2, 2)) | |
DEFINE_BUT_TRA (ins2_adj, BUT_TR(1, 3, true, 1, 2), BUT_TR(3, 5, true, 2, 4)) | |
DEFINE_BUT_TRA (ins2_adj_size1, BUT_TR(1, 3, true, 1, 2), BUT_TR(3, 4, true, 2, 3)) | |
DEFINE_BUT_TRA (ins_replace, BUT_TR(1, 3, true, 1, 2), BUT_TR(1, 3, true, 1, 2)) | |
DEFINE_BUT_TRA (ins_cpy, BUT_TR(3, 8, true, 1, 5), BUT_TR(4, 7, true, 1, 5)) | |
DEFINE_BUT_TRA (ins_cpy_top, BUT_TR(3, 8, true, 1, 5), BUT_TR(5, 8, true, 1, 5)) | |
DEFINE_BUT_TRA (ins_cpy_bot, BUT_TR(3, 8, true, 1, 5), BUT_TR(3, 5, true, 1, 5)) | |
DEFINE_BUT_TRA (del_none, BUT_TR(1, 3, false, 0, 0)) | |
DEFINE_BUT_TRA (del_none_size1, BUT_TR(1, 2, false, 0, 0)) | |
DEFINE_BUT_TRA (del_entire, BUT_TR(1, 3, true, 1, 2), BUT_TR(1, 3, false, 0, 0)) | |
DEFINE_BUT_TRA (del_entire_top, BUT_TR(1, 3, true, 1, 2), BUT_TR(1, 4, false, 0, 0)) | |
DEFINE_BUT_TRA (del_entire_bot, BUT_TR(3, 5, true, 1, 2), BUT_TR(2, 5, false, 0, 0)) | |
DEFINE_BUT_TRA (del_entire_both, BUT_TR(3, 5, true, 1, 2), BUT_TR(2, 6, false, 0, 0)) | |
DEFINE_BUT_TRA (del_nop, BUT_TR(3, 8, true, 1, 5), BUT_TR(4, 7, false, 1, 5)) | |
DEFINE_BUT_TRA (ins2_del1, BUT_TR(3, 5, true, 1, 2), BUT_TR(6, 7, true, 2, 3), BUT_TR(3, 5, false, 1, 1)) | |
DEFINE_BUT_TRA (ins2_del2, BUT_TR(3, 5, true, 1, 2), BUT_TR(6, 7, true, 2, 3), BUT_TR(3, 5, false, 1, 1), BUT_TR(6, 7, false, 0, 0)) | |
DEFINE_BUT_TRA (ins2_del_all, BUT_TR(3, 5, true, 1, 2), BUT_TR(6, 7, true, 2, 3), BUT_TR(3, 7, false, 0, 0)) | |
DEFINE_BUT_TRA (del_cut_top1, BUT_TR(3, 8, true, 1, 5), BUT_TR(5, 9, false, 1, 2)) | |
DEFINE_BUT_TRA (del_cut_top0, BUT_TR(3, 8, true, 1, 5), BUT_TR(5, 8, false, 1, 2)) | |
DEFINE_BUT_TRA (del_cut_bot1, BUT_TR(3, 8, true, 1, 5), BUT_TR(2, 5, false, 1, 3)) | |
DEFINE_BUT_TRA (del_cut_bot0, BUT_TR(3, 8, true, 1, 5), BUT_TR(3, 5, false, 1, 3)) | |
DEFINE_BUT_TRA (del_cut_adj, BUT_TR(3, 5, true, 1, 2), BUT_TR(5, 8, true, 2, 5), BUT_TR(4, 6, false, 2, 3)) | |
DEFINE_BUT_TRA (del_cut_entire_top, BUT_TR(3, 5, true, 1, 2), BUT_TR(5, 8, true, 2, 5), BUT_TR(4, 8, false, 1, 1)) | |
DEFINE_BUT_TRA (del_cut_entire_bot, BUT_TR(3, 5, true, 1, 2), BUT_TR(5, 8, true, 2, 5), BUT_TR(3, 6, false, 1, 2)) | |
static void | be_ut_rm_fill2 (uintptr_t addr, m0_bcount_t size, unsigned value, bool fill_reg) |
static void | be_ut_rm_fill (const struct m0_be_reg_d *rd, unsigned value, bool fill_reg) |
static void | be_ut_regmap_add (void *data, struct m0_be_reg_d *rd) |
static void | be_ut_regmap_del (void *data, const struct m0_be_reg_d *rd) |
static void | be_ut_regmap_cpy (void *data, const struct m0_be_reg_d *super, const struct m0_be_reg_d *rd) |
static void | be_ut_regmap_cut (void *data, struct m0_be_reg_d *rd, m0_bcount_t cut_at_start, m0_bcount_t cut_at_end) |
static void | be_ut_regmap_init (void) |
static void | be_ut_regmap_fini (void) |
static void | be_ut_regmap_data_copy (void) |
static void | be_ut_regmap_print_d (unsigned d, int i) |
static void | be_ut_regmap_data_cmp (const struct m0_be_reg_d *r, unsigned desired, bool nop) |
static void | be_ut_regmap_size_length_check (size_t desired_size, m0_bcount_t desired_length, bool do_check) |
static bool | be_ut_regmap_nop (m0_bcount_t begin, m0_bcount_t end, bool do_insert) |
static void | be_ut_regmap_do (m0_bcount_t begin, m0_bcount_t end, bool do_insert) |
void | m0_be_ut_regmap_simple (void) |
void | m0_be_ut_regmap_random (void) |
static m0_bindex_t | be_ut_reg_area_addr2offs (void *addr) |
static void * | be_ut_reg_area_offs2addr (m0_bindex_t offs) |
static void | be_ut_reg_area_reset (bool reset_save) |
static void | be_ut_reg_area_init (m0_bindex_t nr) |
static void | be_ut_reg_area_fini (void) |
static void | be_ut_reg_area_fill (struct m0_be_reg_d *rd) |
static void | be_ut_reg_area_fill_save (struct m0_be_reg_d *rd) |
static void | be_ut_reg_area_get (void) |
static void | be_ut_reg_area_size_length_check (size_t desired_size, m0_bcount_t desired_length, bool do_check) |
static void | be_ut_reg_area_check (bool do_insert, struct m0_be_reg_d *rd) |
static void | be_ut_reg_area_rand (void) |
static void | be_ut_reg_area_do (m0_bcount_t begin, m0_bcount_t end, bool do_insert) |
void | m0_be_ut_reg_area_simple (void) |
void | m0_be_ut_reg_area_random (void) |
static unsigned | be_ut_reg_area_merge_rand (unsigned min, unsigned max) |
static m0_bindex_t | be_ut_reg_area_merge_addr2offs (void *addr) |
static void * | be_ut_reg_area_merge_offs2addr (m0_bindex_t offs) |
static void | be_ut_reg_area_merge_ra_add (struct m0_be_reg_area *ra, m0_bindex_t begin, m0_bcount_t size, void *buf) |
static void | be_ut_reg_area_merge_rand_ra (struct m0_be_reg_area *ra) |
static void | be_ut_reg_area_arr_copy (unsigned char *arr, m0_bcount_t arr_size, struct m0_be_reg_area *ra, bool clear_arr) |
static void | be_ut_reg_area_merge_pre (struct m0_be_reg_area *ra) |
static void | be_ut_reg_area_merge_in (struct m0_be_reg_area *ra) |
static void | be_ut_reg_area_merge_post (struct m0_be_reg_area *ra) |
void | m0_be_ut_reg_area_merge (void) |
#define BUT_TR | ( | begin, | |
end, | |||
do_insert, | |||
desired_nr, | |||
desired_len | |||
) |
Definition at line 158 of file tx_regmap.c.
Definition at line 168 of file tx_regmap.c.
#define BUT_TRS | ( | name | ) |
Definition at line 172 of file tx_regmap.c.
#define DEFINE_BUT_TRA | ( | name, | |
... | |||
) | static struct be_ut_test_reg BUT_TRA_NAME(name)[] = { __VA_ARGS__ } |
Definition at line 169 of file tx_regmap.c.
#define LOGD | ( | ... | ) |
Definition at line 37 of file tx_regmap.c.
anonymous enum |
Enumerator | |
---|---|
BE_UT_RDT_SIZE | |
BE_UT_RDT_R_SIZE | |
BE_UT_RDT_ITER |
Definition at line 39 of file tx_regmap.c.
anonymous enum |
Enumerator | |
---|---|
BE_UT_REGMAP_ITER | |
BE_UT_REGMAP_LEN | |
BE_UT_REGMAP_R_SIZE |
Definition at line 137 of file tx_regmap.c.
anonymous enum |
Enumerator | |
---|---|
BE_UT_RA_SEG_SIZE | |
BE_UT_RA_TEST_NR | |
BE_UT_RA_R_SIZE | |
BE_UT_RA_SIZE | |
BE_UT_RA_ITER |
Definition at line 563 of file tx_regmap.c.
anonymous enum |
Definition at line 806 of file tx_regmap.c.
|
static |
|
static |
|
static |
Definition at line 890 of file tx_regmap.c.
|
static |
Definition at line 663 of file tx_regmap.c.
|
static |
XXX TODO check other fields of m0_be_reg_d
Definition at line 709 of file tx_regmap.c.
|
static |
Definition at line 616 of file tx_regmap.c.
|
static |
Definition at line 629 of file tx_regmap.c.
|
static |
Definition at line 611 of file tx_regmap.c.
|
static |
Definition at line 641 of file tx_regmap.c.
|
static |
Definition at line 600 of file tx_regmap.c.
|
static |
|
static |
Definition at line 934 of file tx_regmap.c.
|
static |
|
static |
Definition at line 954 of file tx_regmap.c.
|
static |
Definition at line 918 of file tx_regmap.c.
|
static |
Definition at line 844 of file tx_regmap.c.
|
static |
Definition at line 827 of file tx_regmap.c.
|
static |
Definition at line 860 of file tx_regmap.c.
|
static |
|
static |
Definition at line 695 of file tx_regmap.c.
|
static |
|
static |
Definition at line 652 of file tx_regmap.c.
|
static |
|
static |
Definition at line 71 of file tx_regmap.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 395 of file tx_regmap.c.
|
static |
|
static |
|
static |
XXX TODO check other fields of m0_be_reg_d
Definition at line 484 of file tx_regmap.c.
|
static |
Definition at line 375 of file tx_regmap.c.
|
static |
Definition at line 359 of file tx_regmap.c.
|
static |
|
static |
|
static |
Definition at line 427 of file tx_regmap.c.
|
static |
Definition at line 304 of file tx_regmap.c.
|
static |
DEFINE_BUT_TRA | ( | ins_simple | , |
BUT_TR(1, 3, true, 1, 2) | |||
) |
DEFINE_BUT_TRA | ( | ins_size1 | , |
BUT_TR(1, 2, true, 1, 1) | |||
) |
DEFINE_BUT_TRA | ( | del_none | , |
BUT_TR(1, 3, false, 0, 0) | |||
) |
DEFINE_BUT_TRA | ( | del_none_size1 | , |
BUT_TR(1, 2, false, 0, 0) | |||
) |
DEFINE_BUT_TRA | ( | ins2_del1 | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(6, 7, true, 2, 3) | , | ||
BUT_TR(3, 5, false, 1, 1) | |||
) |
DEFINE_BUT_TRA | ( | ins2_del2 | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(6, 7, true, 2, 3) | , | ||
BUT_TR(3, 5, false, 1, 1) | , | ||
BUT_TR(6, 7, false, 0, 0) | |||
) |
DEFINE_BUT_TRA | ( | ins2_del_all | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(6, 7, true, 2, 3) | , | ||
BUT_TR(3, 7, false, 0, 0) | |||
) |
DEFINE_BUT_TRA | ( | del_cut_adj | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(5, 8, true, 2, 5) | , | ||
BUT_TR(4, 6, false, 2, 3) | |||
) |
DEFINE_BUT_TRA | ( | del_cut_entire_top | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(5, 8, true, 2, 5) | , | ||
BUT_TR(4, 8, false, 1, 1) | |||
) |
DEFINE_BUT_TRA | ( | del_cut_entire_bot | , |
BUT_TR(3, 5, true, 1, 2) | , | ||
BUT_TR(5, 8, true, 2, 5) | , | ||
BUT_TR(3, 6, false, 1, 2) | |||
) |
void m0_be_ut_reg_area_merge | ( | void | ) |
void m0_be_ut_reg_area_random | ( | void | ) |
void m0_be_ut_reg_area_simple | ( | void | ) |
void m0_be_ut_reg_d_tree | ( | void | ) |
void m0_be_ut_regmap_random | ( | void | ) |
void m0_be_ut_regmap_simple | ( | void | ) |
|
static |
Definition at line 575 of file tx_regmap.c.
|
static |
Definition at line 824 of file tx_regmap.c.
|
static |
Definition at line 822 of file tx_regmap.c.
|
static |
Definition at line 821 of file tx_regmap.c.
|
static |
Definition at line 820 of file tx_regmap.c.
|
static |
Definition at line 823 of file tx_regmap.c.
|
static |
Definition at line 573 of file tx_regmap.c.
|
static |
Definition at line 576 of file tx_regmap.c.
|
static |
Definition at line 571 of file tx_regmap.c.
|
static |
Definition at line 574 of file tx_regmap.c.
|
static |
Definition at line 572 of file tx_regmap.c.
|
static |
Definition at line 51 of file tx_regmap.c.
|
static |
Definition at line 50 of file tx_regmap.c.
|
static |
Definition at line 352 of file tx_regmap.c.
|
static |
Definition at line 280 of file tx_regmap.c.
|
static |
Definition at line 282 of file tx_regmap.c.
|
static |
Definition at line 283 of file tx_regmap.c.
|
static |
Definition at line 284 of file tx_regmap.c.
|
static |
Definition at line 281 of file tx_regmap.c.
|
static |
Definition at line 278 of file tx_regmap.c.
|
static |
Definition at line 279 of file tx_regmap.c.
|
static |
Definition at line 243 of file tx_regmap.c.