Go to the source code of this file.
|
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT |
|
#define | ST_VAL_STRING ("Client Index Test.") |
|
#define | idx_query_exec(idx_id, opcode, keys, vals, rcs, flag, exp) |
|
#define | idx_query_exp_success(idx_id, opcode, keys, vals, rcs, flag) idx_query_exec(idx_id, opcode, keys, vals, rcs, flag, ==) |
|
#define | idx_query_exp_fail(idx_id, opcode, keys, vals, rcs, flag) idx_query_exec(idx_id, opcode, keys, vals, rcs, flag, !=) |
|
|
static int | get_max_nr_kv_pairs (int idx_door_no) |
|
static void | idx_bufvec_free (struct m0_bufvec *bv) |
|
static struct m0_bufvec * | idx_bufvec_alloc (int nr) |
|
static bool | is_kv_pair_deleted (int idx_door_no, int key_no) |
|
static int | idx_pick_keys (int idx_door_no, struct m0_bufvec *keys, int *key_no_arr) |
|
static int | idx_fill_kv_pairs (struct m0_uint128 id, int start, struct m0_bufvec *keys, struct m0_bufvec *vals) |
|
static int | idx_do_insert_kv_pairs (struct m0_uint128 id, struct m0_bufvec *keys, struct m0_bufvec *vals, int *rcs) |
|
static int | idx_insert_kv_pairs (struct m0_uint128 id, int nr_kvp) |
|
static int | idx_create_one (struct m0_uint128 id) |
|
static int | idx_delete_one (struct m0_uint128 id) |
|
static int | idx_test_prepare (void) |
|
static void | idx_query_get (void) |
|
static void | idx_query_get_cancel (void) |
|
static void | idx_query_get_nonexist (void) |
|
static void | idx_query_get_non_existing_index (void) |
|
static void | idx_query_del (void) |
|
static void | idx_query_next (void) |
|
static void | idx_query_next_exclude_start (void) |
|
static void | mock_op_cb_stable (struct m0_op *op) |
|
static void | mock_op_cb_failed (struct m0_op *op) |
|
static void | idx_query_callbacks (void) |
|
static void | idx_query_empty_next (void) |
|
static void | idx_query_next_not_exist_index (void) |
|
static void | idx_query_drop_index (void) |
|
static void | idx_query_put_not_existent_index (void) |
|
static int | st_idx_suite_init (void) |
|
static int | st_idx_suite_fini (void) |
|
◆ idx_query_exec
#define idx_query_exec |
( |
|
idx_id, |
|
|
|
opcode, |
|
|
|
keys, |
|
|
|
vals, |
|
|
|
rcs, |
|
|
|
flag, |
|
|
|
exp |
|
) |
| |
Value:do { \
\
\
memset(&idx, 0, sizeof idx); \
ST_ASSERT_FATAL(
rc == 0); \
ST_ASSERT_FATAL( \
ST_ASSERT_FATAL(
ops[0]->op_rc exp 0); \
\
\
st_entity_fini(&idx.in_entity); \
} while(0)
void st_idx_init(struct m0_idx *idx, struct m0_realm *parent, const struct m0_uint128 *id)
const m0_time_t M0_TIME_NEVER
static struct m0_container st_idx_container
void st_op_launch(struct m0_op **op, uint32_t nr)
int32_t st_op_wait(struct m0_op *op, uint64_t bits, m0_time_t to)
Definition at line 444 of file idx.c.
◆ idx_query_exp_fail
#define idx_query_exp_fail |
( |
|
idx_id, |
|
|
|
opcode, |
|
|
|
keys, |
|
|
|
vals, |
|
|
|
rcs, |
|
|
|
flag |
|
) |
| idx_query_exec(idx_id, opcode, keys, vals, rcs, flag, !=) |
◆ idx_query_exp_success
#define idx_query_exp_success |
( |
|
idx_id, |
|
|
|
opcode, |
|
|
|
keys, |
|
|
|
vals, |
|
|
|
rcs, |
|
|
|
flag |
|
) |
| idx_query_exec(idx_id, opcode, keys, vals, rcs, flag, ==) |
◆ M0_TRACE_SUBSYSTEM
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT |
Definition at line 23 of file idx.c.
◆ ST_VAL_STRING
#define ST_VAL_STRING ("Client Index Test.") |
Definition at line 33 of file idx.c.
◆ anonymous enum
Enumerator |
---|
ST_MAX_INDEX_NUM | |
ST_MAX_KEY_LEN | |
ST_SMALL_KV_PAIR_NUM | |
ST_MEDIUM_KV_PAIR_NUM | |
ST_LARGE_KV_PAIR_NUM | |
Definition at line 35 of file idx.c.
◆ get_max_nr_kv_pairs()
static int get_max_nr_kv_pairs |
( |
int |
idx_door_no | ) |
|
|
static |
Definition at line 47 of file idx.c.
◆ idx_bufvec_alloc()
static struct m0_bufvec* idx_bufvec_alloc |
( |
int |
nr | ) |
|
|
static |
Definition at line 80 of file idx.c.
◆ idx_bufvec_free()
static void idx_bufvec_free |
( |
struct m0_bufvec * |
bv | ) |
|
|
static |
Definition at line 64 of file idx.c.
◆ idx_create_one()
◆ idx_delete_one()
◆ idx_do_insert_kv_pairs()
◆ idx_fill_kv_pairs()
◆ idx_insert_kv_pairs()
static int idx_insert_kv_pairs |
( |
struct m0_uint128 |
id, |
|
|
int |
nr_kvp |
|
) |
| |
|
static |
◆ idx_pick_keys()
static int idx_pick_keys |
( |
int |
idx_door_no, |
|
|
struct m0_bufvec * |
keys, |
|
|
int * |
key_no_arr |
|
) |
| |
|
static |
◆ idx_query_callbacks()
static void idx_query_callbacks |
( |
void |
| ) |
|
|
static |
◆ idx_query_del()
static void idx_query_del |
( |
void |
| ) |
|
|
static |
◆ idx_query_drop_index()
static void idx_query_drop_index |
( |
void |
| ) |
|
|
static |
◆ idx_query_empty_next()
static void idx_query_empty_next |
( |
void |
| ) |
|
|
static |
◆ idx_query_get()
static void idx_query_get |
( |
void |
| ) |
|
|
static |
◆ idx_query_get_cancel()
static void idx_query_get_cancel |
( |
void |
| ) |
|
|
static |
Cancel launched operation.
Definition at line 549 of file idx.c.
◆ idx_query_get_non_existing_index()
static void idx_query_get_non_existing_index |
( |
void |
| ) |
|
|
static |
◆ idx_query_get_nonexist()
static void idx_query_get_nonexist |
( |
void |
| ) |
|
|
static |
◆ idx_query_next()
static void idx_query_next |
( |
void |
| ) |
|
|
static |
◆ idx_query_next_exclude_start()
static void idx_query_next_exclude_start |
( |
void |
| ) |
|
|
static |
PHASE 1: Fetch nr_kvp KV.
Use last key as the starting point of NEXT Op.
Store the last key for compariosn.
PHASE 2: Fetch next nr_kvp KV.
Result should not contain a stored key.
Definition at line 917 of file idx.c.
◆ idx_query_next_not_exist_index()
static void idx_query_next_not_exist_index |
( |
void |
| ) |
|
|
static |
◆ idx_query_put_not_existent_index()
static void idx_query_put_not_existent_index |
( |
void |
| ) |
|
|
static |
◆ idx_test_prepare()
static int idx_test_prepare |
( |
void |
| ) |
|
|
static |
◆ is_kv_pair_deleted()
static bool is_kv_pair_deleted |
( |
int |
idx_door_no, |
|
|
int |
key_no |
|
) |
| |
|
static |
◆ mock_op_cb_failed()
static void mock_op_cb_failed |
( |
struct m0_op * |
op | ) |
|
|
static |
◆ mock_op_cb_stable()
static void mock_op_cb_stable |
( |
struct m0_op * |
op | ) |
|
|
static |
◆ st_idx_suite_fini()
static int st_idx_suite_fini |
( |
void |
| ) |
|
|
static |
Finalises the idx suite's environment.
Definition at line 1317 of file idx.c.
◆ st_idx_suite_init()
static int st_idx_suite_init |
( |
void |
| ) |
|
|
static |
Initialises the index suite's environment.
Definition at line 1289 of file idx.c.
◆ deleted_kv_pairs
Definition at line 45 of file idx.c.
◆ st_idx_container
Definition at line 43 of file idx.c.
◆ st_suite_idx
This is the place to add test suites
Definition at line 1322 of file idx.c.
◆ test_index_ids
Definition at line 44 of file idx.c.