Motr
M0
|
#include "net/lnet/lnet_main.c"
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/arith.h"
#include "lib/thread.h"
#include "ut/ut.h"
Go to the source code of this file.
Data Structures | |
struct | ut_data |
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | zvUT(x, expRC) |
#define | zUT(x) zvUT(x, 0) |
#define | PAGE_SIZE (1UL << PAGE_SHIFT) |
#define | DOM1 (&td->dom1) |
#define | DOM2 (&td->dom2) |
#define | TM1 (&td->tm1) |
#define | TM2 (&td->tm2) |
#define | CBD1 (&td->cbd1) |
#define | CBD2 (&td->cbd2) |
#define | SETUP_DOM(which) |
#define | TEARDOWN_DOM(which) |
#define | RESET_RECV_COUNTERS() |
#define | TEST_MATCH_BIT_ENCODE(_t, _c) |
#define | VALIDATE_MATCH_BITS(mb, s_lctm) |
Typedefs | |
typedef void(* | ut_test_fw_body_t) (struct ut_data *td) |
typedef void(* | ut_test_fw_prestart_cb_t) (struct ut_data *td, int which) |
Enumerations | |
enum | { STARTSTOP_DOM_NR = 3, STARTSTOP_PID = 12345, STARTSTOP_PORTAL = 30, STARTSTOP_STAT_SECS = 3, STARTSTOP_STAT_PER_PERIOD = 1, STARTSTOP_STAT_BUF_NR = 4 } |
enum | { UT_CB_INVALID_STATUS = 9999999 } |
enum | { UT_BUFS1 = 2, UT_BUFSEGS1 = 4, UT_BUFS2 = 1, UT_BUFSEGS2 = 2, UT_MSG_SIZE = PAGE_SIZE / 2, UT_BULK_SIZE = 2 * PAGE_SIZE, UT_PAGE_SHIFT = PAGE_SHIFT } |
enum | { UT_MSG_OPS = 4 } |
Functions | |
static void | ut_save_subs (void) |
static void | ut_restore_subs (void) |
static bool | ut_chan_timedwait (struct m0_clink *link, uint32_t secs) |
static void | ut_net_buffer_sign (struct m0_net_buffer *nb, m0_bcount_t len, unsigned char seed) |
static bool | ut_net_buffer_authenticate (struct m0_net_buffer *nb, m0_bcount_t len, m0_bcount_t offset, unsigned char seed) |
static void | ecb_reset (void) |
static void | ut_tm_ecb (const struct m0_net_tm_event *ev) |
static void | ut_buf_cb1 (const struct m0_net_buffer_event *ev) |
static void | ut_cbreset1 (void) |
static void | ut_buf_cb2 (const struct m0_net_buffer_event *ev) |
static void | ut_cbreset2 (void) |
static void | ut_cbreset (void) |
static void | ut_test_framework_dom_cleanup (struct ut_data *td, struct m0_net_domain *dom) |
static void | ut_test_framework (ut_test_fw_body_t body, ut_test_fw_prestart_cb_t ps_cb, int dbg) |
static int | test_lnet_init (void) |
static int | test_lnet_fini (void) |
static void | ntc_event_callback (const struct m0_net_tm_event *ev) |
static void | test_fail (void) |
static void | test_tm_initfini (void) |
static void | test_tm_startstop (void) |
static bool | test_msg_send_loop (struct ut_data *td, uint32_t num_recv_bufs, uint32_t recv_max_msgs, struct m0_net_end_point *ep2, m0_bcount_t send_len_first, m0_bcount_t send_len_rest, bool space_exhausted) |
static void | test_msg_body (struct ut_data *td) |
static void | test_msg (void) |
static void | test_buf_desc_body (struct ut_data *td) |
static void | test_buf_desc (void) |
static int | test_bulk_passive_send (struct ut_data *td) |
static int | test_bulk_passive_recv (struct ut_data *td) |
static void | test_bulk_body (struct ut_data *td) |
static void | test_bulk (void) |
static void | test_sync_msg_send_cb2 (const struct m0_net_buffer_event *ev) |
static void | test_sync_msg_recv_cb1 (const struct m0_net_buffer_event *ev) |
static void | test_sync_body (struct ut_data *td) |
static void | test_sync_prestart (struct ut_data *td, int which) |
static void | test_sync (void) |
static void | test_timeout_msg_recv_cb1 (const struct m0_net_buffer_event *ev) |
static m0_time_t | test_timeout_tm_get_buffer_timeout_tick (const struct m0_net_transfer_mc *tm) |
static int | test_timeout_tm_timeout_buffers (struct m0_net_transfer_mc *tm, m0_time_t now) |
static void | test_timeout_body (struct ut_data *td) |
static void | test_timeout (void) |
Variables | |
static int | ut_verbose = 0 |
static int | ut_subs_saved |
static struct nlx_xo_interceptable_subs | saved_xo_subs |
static enum m0_net_tm_ev_type | ecb_evt |
static enum m0_net_tm_state | ecb_tms |
static int32_t | ecb_status |
static int | ecb_count |
static enum m0_net_queue_type | cb_qt1 |
static struct m0_net_buffer * | cb_nb1 |
static int32_t | cb_status1 |
static m0_bcount_t | cb_length1 |
static m0_bindex_t | cb_offset1 |
static bool | cb_save_ep1 |
static struct m0_net_end_point * | cb_ep1 |
static unsigned | cb_called1 |
static enum m0_net_queue_type | cb_qt2 |
static struct m0_net_buffer * | cb_nb2 |
static int32_t | cb_status2 |
static m0_bcount_t | cb_length2 |
static m0_bindex_t | cb_offset2 |
static bool | cb_save_ep2 |
static struct m0_net_end_point * | cb_ep2 |
static unsigned | cb_called2 |
static struct m0_thread * | test_sync_ut_handle |
static struct m0_atomic64 | test_timeout_ttb_called |
static struct m0_atomic64 | test_timeout_ttb_retval |
struct m0_ut_suite | m0_net_lnet_ut |
#define RESET_RECV_COUNTERS | ( | ) |
#define SETUP_DOM | ( | which | ) |
#define TEARDOWN_DOM | ( | which | ) |
#define TEST_MATCH_BIT_ENCODE | ( | _t, | |
_c | |||
) |
#define VALIDATE_MATCH_BITS | ( | mb, | |
s_lctm | |||
) |
#define zvUT | ( | x, | |
expRC | |||
) |
typedef void(* ut_test_fw_prestart_cb_t) (struct ut_data *td, int which) |
anonymous enum |
anonymous enum |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct m0_ut_suite m0_net_lnet_ut |
|
static |
|
static |
|
static |