Motr  M0
tx.c File Reference
#include "lib/trace.h"
#include "lib/types.h"
#include "lib/arith.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "ut/ut.h"
#include "be/ut/helper.h"
Include dependency graph for tx.c:

Go to the source code of this file.

Data Structures

struct  be_ut_complex
 
struct  be_ut_tx_x
 
struct  be_ut_tx_fast
 
struct  be_ut_tx_thread_state
 
struct  be_ut_gc_test
 
struct  be_ut_tx_payload_test
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define TX_PAYLOAD_TEST(credit, fill, capture, offset)
 

Enumerations

enum  { SHIFT = 0 }
 
enum  { BE_UT_TX_P_SEG_SIZE = 0x10000, BE_UT_TX_P_TX_NR = 0x100, BE_UT_TX_P_REG_NR = 0x10, BE_UT_TX_P_REG_SIZE_MAX = 0x100 }
 
enum  {
  BE_UT_TX_F_SEG_SIZE = 0x20000, BE_UT_TX_F_TX_NR = 0x100, BE_UT_TX_F_TX_CONCUR = 0x80, BE_UT_TX_F_INIT = 1,
  BE_UT_TX_F_CAPTURE = 2
}
 
enum  { BE_UT_TX_C_THREAD_NR = 0x10, BE_UT_TX_C_TX_PER_THREAD = 0x40 }
 
enum  { BE_UT_TX_CAPTURING_SEG_SIZE = 0x10000, BE_UT_TX_CAPTURING_TX_NR = 0x10, BE_UT_TX_CAPTURING_NR = 0x100, BE_UT_TX_CAPTURING_RANGE = 0x20 }
 
enum  { BE_UT_TX_GC_SEG_SIZE = 0x10000, BE_UT_TX_GC_TX_NR = 0x100, BE_UT_TX_GC_RAND_DENOMINATOR = 0x5 }
 
enum  { BE_UT_TX_PAYLOAD_SEG_SIZE = 0x10000, BE_UT_TX_PAYLOAD_TEST_NR = 0x100, BE_UT_TX_PAYLOAD_SIZE_MAX = 0x10000 }
 

Functions

void m0_be_ut_tx_usecase_success (void)
 
void m0_be_ut_tx_usecase_failure (void)
 
static void be_ut_tx_test (size_t nr)
 
static void be_ut_tx_alloc_init (void **alloc, struct m0_be_seg *seg)
 
static void be_ut_tx_alloc_fini (void **alloc)
 
static void * be_ut_tx_alloc (void **alloc, m0_bcount_t size)
 
void m0_be_ut_tx_states (void)
 
void m0_be_ut_tx_empty (void)
 
void m0_be_ut_tx_single (void)
 
void m0_be_ut_tx_several (void)
 
static void be_ut_transact (struct be_ut_tx_x *x, struct m0_be_seg *seg, void **alloc)
 
static void be_ut_tx_do_force (struct be_ut_tx_x *xs, size_t nr)
 
static void be_ut_tx_force (size_t nr)
 
void m0_be_ut_tx_force (void)
 
static void be_ut_tx_reg_rand (struct m0_be_reg *reg, struct m0_be_seg *seg, uint64_t *seed)
 
static void be_ut_tx_reg_rand_fill (struct m0_be_reg *reg, uint64_t *seed)
 
void m0_be_ut_tx_persistence (void)
 
static bool be_ut_tx_fast_cb (struct m0_clink *clink)
 
static void be_ut_tx_fast_gc_free (struct m0_be_tx *tx, void *param)
 
void m0_be_ut_tx_fast (void)
 
static void be_ut_tx_run_tx_helper (struct be_ut_tx_thread_state *state, struct m0_be_tx *tx, bool exclusive)
 
static void be_ut_tx_thread (struct be_ut_tx_thread_state *state)
 
void m0_be_ut_tx_concurrent_helper (bool exclusive)
 
void m0_be_ut_tx_concurrent (void)
 
void m0_be_ut_tx_concurrent_excl (void)
 
 M0_BASSERT (BE_UT_TX_CAPTURING_RANGE >=sizeof(uint64_t))
 
void m0_be_ut_tx_capturing (void)
 
static bool be_ut_tx_gc_cb (struct m0_clink *clink)
 
static void be_ut_tx_gc_free (struct m0_be_tx *tx, void *param)
 
static void be_ut_tx_gc_free_tx_failed (struct m0_be_tx *tx, void *param)
 
void m0_be_ut_tx_gc (void)
 
static void be_ut_tx_buf_fill_random (char *data, m0_bcount_t size)
 
static void be_ut_tx_payload_test_nr (struct m0_be_ut_backend *ut_be, struct be_ut_tx_payload_test *test, size_t nr)
 
void m0_be_ut_tx_payload (void)
 

Variables

static struct be_ut_gc_test be_ut_gc_tests [BE_UT_TX_GC_TX_NR]
 
static uint64_t be_ut_tx_payload_seed