|
Motr
M0
|
|
Data Structures | |
| struct | st_test |
| struct | st_suite |
| struct | st_cfg |
| struct | m0_instance |
| struct | st_worker_stat |
| struct | m0_st_ctx |
Enumerations | |
| enum | { ST_MAX_WORKER_NUM = 32 } |
| enum | { DEFAULT_PARGRP_UNIT_SIZE = 4096, DEFAULT_PARGRP_DATA_UNIT_NUM = 3, DEFAULT_PARGRP_DATA_SIZE } |
| enum | st_mode { ST_SEQ_MODE = 0, ST_RAND_MODE, ST_MIXED_MODE } |
| enum | { ST_MAX_SUITE_NUM = 4096 } |
Functions | |
| struct m0 * | st_get_motr (void) |
| void | st_set_instance (struct m0_client *instance) |
| struct m0_client * | st_get_instance (void) |
| int | st_run (const char *test_list_str) |
| void | st_add_suites (void) |
| void | st_list (bool) |
| int | st_init (void) |
| void | st_fini (void) |
| bool | st_assertimpl (bool c, const char *str_c, const char *file, int lno, const char *func) |
| struct st_cfg | st_get_cfg (void) |
| struct st_worker_stat * | st_get_worker_stat (int idx) |
| int | st_get_nr_workers (void) |
| void | st_set_nr_workers (int nr) |
| void | st_set_tests (const char *) |
| const char * | st_get_tests (void) |
| void | st_set_test_mode (enum st_mode) |
| enum st_mode | st_get_test_mode (void) |
| int | st_set_worker_tid (int idx, pid_t tid) |
| int | st_get_worker_idx (pid_t tid) |
| int | st_start_workers (void) |
| int | st_stop_workers (void) |
| int | oid_get (struct m0_uint128 *oid) |
| void | oid_put (struct m0_uint128 oid) |
| uint64_t | oid_get_many (struct m0_uint128 *oids, uint64_t nr_oids) |
| void | oid_put_many (struct m0_uint128 *oids, uint64_t nr_oids) |
| int | oid_allocator_init (void) |
| int | oid_allocator_fini (void) |
| void | st_container_init (struct m0_container *con, struct m0_realm *parent, const struct m0_uint128 *id, struct m0_client *instance) |
| void | st_obj_init (struct m0_obj *obj, struct m0_realm *parent, const struct m0_uint128 *id, uint64_t layout_id) |
| void | st_obj_fini (struct m0_obj *obj) |
| int | st_entity_create (struct m0_fid *pool, struct m0_entity *entity, struct m0_op **op) |
| int | st_entity_delete (struct m0_entity *entity, struct m0_op **op) |
| void | st_entity_fini (struct m0_entity *entity) |
| 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) |
| void | st_op_fini (struct m0_op *op) |
| void | st_op_free (struct m0_op *op) |
| void | st_entity_open (struct m0_entity *entity) |
| void | st_idx_open (struct m0_entity *entity) |
| void | st_obj_op (struct m0_obj *obj, enum m0_obj_opcode opcode, struct m0_indexvec *ext, struct m0_bufvec *data, struct m0_bufvec *attr, uint64_t mask, uint32_t flags, struct m0_op **op) |
| void | st_idx_init (struct m0_idx *idx, struct m0_realm *parent, const struct m0_uint128 *id) |
| void | st_idx_fini (struct m0_idx *idx) |
| int | st_idx_op (struct m0_idx *idx, enum m0_idx_opcode opcode, struct m0_bufvec *keys, struct m0_bufvec *vals, int *rcs, int flag, struct m0_op **op) |
| int | st_layout_op (struct m0_obj *obj, enum m0_entity_opcode opcode, struct m0_client_layout *layout, struct m0_op **op) |
| void | st_alloc_aligned (void **ptr, size_t size, size_t alignment) |
| void | st_free_aligned (void *ptr, size_t size, size_t alignment) |
A simple system test framework for Client which supports: (1) Test suites can be run as a whole or partially (2) multiple test threads:
Why not use existing motr ut?(1) to simulate a "real" Client app environment in which only m0tr is available (2) to support those features above.
| anonymous enum |
| enum st_mode |
| int oid_allocator_fini | ( | void | ) |
| int oid_allocator_init | ( | void | ) |
| int oid_get | ( | struct m0_uint128 * | oid | ) |
| uint64_t oid_get_many | ( | struct m0_uint128 * | oids, |
| uint64_t | nr_oids | ||
| ) |
Get a number of object IDs in one call
| oids | returned object IDs |
| nr_oids | the number of object IDs wanted : == 0, there is no free object IDs available. > 0, the allocated number of object IDs |
Definition at line 397 of file oid.c.


| void oid_put | ( | struct m0_uint128 | oid | ) |
| void oid_put_many | ( | struct m0_uint128 * | oids, |
| uint64_t | nr_oids | ||
| ) |
| void st_add_suites | ( | void | ) |
| void st_alloc_aligned | ( | void ** | ptr, |
| size_t | size, | ||
| size_t | alignment | ||
| ) |
| bool st_assertimpl | ( | bool | c, |
| const char * | str_c, | ||
| const char * | file, | ||
| int | lno, | ||
| const char * | func | ||
| ) |
Client ST assert to allow to collect test failure statistics
Definition at line 93 of file st_assert.c.

| void st_container_init | ( | struct m0_container * | con, |
| struct m0_realm * | parent, | ||
| const struct m0_uint128 * | id, | ||
| struct m0_client * | instance | ||
| ) |
| void st_entity_fini | ( | struct m0_entity * | entity | ) |
| void st_entity_open | ( | struct m0_entity * | entity | ) |
| void st_fini | ( | void | ) |
| void st_free_aligned | ( | void * | ptr, |
| size_t | size, | ||
| size_t | alignment | ||
| ) |
| struct st_cfg st_get_cfg | ( | void | ) |
| struct m0_client* st_get_instance | ( | void | ) |
| struct m0* st_get_motr | ( | void | ) |
| int st_get_nr_workers | ( | void | ) |
| enum st_mode st_get_test_mode | ( | void | ) |
| const char* st_get_tests | ( | void | ) |
| int st_get_worker_idx | ( | pid_t | tid | ) |
| struct st_worker_stat* st_get_worker_stat | ( | int | idx | ) |
| void st_idx_fini | ( | struct m0_idx * | idx | ) |
| void st_idx_init | ( | struct m0_idx * | idx, |
| struct m0_realm * | parent, | ||
| const struct m0_uint128 * | id | ||
| ) |
| int st_idx_op | ( | struct m0_idx * | idx, |
| enum m0_idx_opcode | opcode, | ||
| struct m0_bufvec * | keys, | ||
| struct m0_bufvec * | vals, | ||
| int * | rcs, | ||
| int | flag, | ||
| struct m0_op ** | op | ||
| ) |
| void st_idx_open | ( | struct m0_entity * | entity | ) |
| int st_init | ( | void | ) |
| int st_layout_op | ( | struct m0_obj * | obj, |
| enum m0_entity_opcode | opcode, | ||
| struct m0_client_layout * | layout, | ||
| struct m0_op ** | op | ||
| ) |
| void st_list | ( | bool | ) |
| void st_obj_fini | ( | struct m0_obj * | obj | ) |
| void st_obj_init | ( | struct m0_obj * | obj, |
| struct m0_realm * | parent, | ||
| const struct m0_uint128 * | id, | ||
| uint64_t | layout_id | ||
| ) |
| void st_obj_op | ( | struct m0_obj * | obj, |
| enum m0_obj_opcode | opcode, | ||
| struct m0_indexvec * | ext, | ||
| struct m0_bufvec * | data, | ||
| struct m0_bufvec * | attr, | ||
| uint64_t | mask, | ||
| uint32_t | flags, | ||
| struct m0_op ** | op | ||
| ) |
| void st_op_fini | ( | struct m0_op * | op | ) |
| void st_op_free | ( | struct m0_op * | op | ) |
| void st_op_launch | ( | struct m0_op ** | op, |
| uint32_t | nr | ||
| ) |
| int st_run | ( | const char * | test_list_str | ) |
Start runing all Client test suites.
| test_list_str | By default, all tests are included unless a string is provided to specify those selected testss. |
Definition at line 389 of file st.c.


| void st_set_instance | ( | struct m0_client * | instance | ) |
| void st_set_nr_workers | ( | int | nr | ) |
| void st_set_test_mode | ( | enum | st_mode | ) |
| void st_set_tests | ( | const char * | ) |
| int st_set_worker_tid | ( | int | idx, |
| pid_t | tid | ||
| ) |
| int st_start_workers | ( | void | ) |
Start and stop worker threads for tests
Definition at line 226 of file st_worker.c.


| int st_stop_workers | ( | void | ) |
Definition at line 258 of file st_worker.c.

