Motr  M0
bulk_mem_ut.c File Reference
#include "lib/arith.h"
#include "lib/assert.h"
#include "lib/misc.h"
#include "lib/thread.h"
#include "ut/ut.h"
#include "net/bulk_emulation/mem_xprt_xo.c"
#include "net/bulk_emulation/st/ping.c"
Include dependency graph for bulk_mem_ut.c:

Go to the source code of this file.

Enumerations

enum  { NR_BUFS = 10 }
 
enum  {
  PING_CLIENT_SEGMENTS = 8, PING_CLIENT_SEGMENT_SIZE = 512, PING_SERVER_SEGMENTS = 4, PING_SERVER_SEGMENT_SIZE = 1024,
  PING_NR_BUFS = 20
}
 

Functions

static void test_buf_copy (void)
 
void tf_tm_cb1 (const struct m0_net_tm_event *ev)
 
static void test_ep (void)
 
void tf_buf_cb1 (const struct m0_net_buffer_event *ev)
 
void tf_cbreset1 (void)
 
void tf_tm_cb2 (const struct m0_net_tm_event *ev)
 
void tf_buf_cb2 (const struct m0_net_buffer_event *ev)
 
void tf_cbreset2 (void)
 
void tf_cbreset (void)
 
static void test_failure (void)
 
static int quiet_printf (const char *fmt,...)
 
static void test_ping (void)
 
static void ntc_event_callback (const struct m0_net_tm_event *ev)
 
static void test_tm (void)
 

Variables

static enum m0_net_tm_ev_type cb_evt1
 
static enum m0_net_queue_type cb_qt1
 
static struct m0_net_buffercb_nb1
 
static enum m0_net_tm_state cb_tms1
 
static int32_t cb_status1
 
static enum m0_net_tm_ev_type cb_evt2
 
static enum m0_net_queue_type cb_qt2
 
static struct m0_net_buffercb_nb2
 
static enum m0_net_tm_state cb_tms2
 
static int32_t cb_status2
 
static struct ping_ops quiet_ops
 
struct m0_ut_suite m0_net_bulk_mem_ut
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NR_BUFS 

Definition at line 35 of file bulk_mem_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
PING_CLIENT_SEGMENTS 
PING_CLIENT_SEGMENT_SIZE 
PING_SERVER_SEGMENTS 
PING_SERVER_SEGMENT_SIZE 
PING_NR_BUFS 

Definition at line 677 of file bulk_mem_ut.c.

Function Documentation

◆ ntc_event_callback()

static void ntc_event_callback ( const struct m0_net_tm_event ev)
static

Definition at line 767 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ quiet_printf()

static int quiet_printf ( const char *  fmt,
  ... 
)
static

Definition at line 684 of file bulk_mem_ut.c.

◆ test_buf_copy()

static void test_buf_copy ( void  )
static

Definition at line 37 of file bulk_mem_ut.c.

Here is the call graph for this function:

◆ test_ep()

static void test_ep ( void  )
static

Definition at line 93 of file bulk_mem_ut.c.

Here is the call graph for this function:

◆ test_failure()

static void test_failure ( void  )
static

Definition at line 227 of file bulk_mem_ut.c.

Here is the call graph for this function:

◆ test_ping()

static void test_ping ( void  )
static

Definition at line 693 of file bulk_mem_ut.c.

Here is the call graph for this function:

◆ test_tm()

static void test_tm ( void  )
static

Definition at line 771 of file bulk_mem_ut.c.

Here is the call graph for this function:

◆ tf_buf_cb1()

void tf_buf_cb1 ( const struct m0_net_buffer_event ev)

Definition at line 171 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ tf_buf_cb2()

void tf_buf_cb2 ( const struct m0_net_buffer_event ev)

Definition at line 203 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ tf_cbreset()

void tf_cbreset ( void  )

Definition at line 221 of file bulk_mem_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tf_cbreset1()

void tf_cbreset1 ( void  )

Definition at line 180 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ tf_cbreset2()

void tf_cbreset2 ( void  )

Definition at line 212 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ tf_tm_cb1()

void tf_tm_cb1 ( const struct m0_net_tm_event ev)

Definition at line 162 of file bulk_mem_ut.c.

Here is the caller graph for this function:

◆ tf_tm_cb2()

void tf_tm_cb2 ( const struct m0_net_tm_event ev)

Definition at line 194 of file bulk_mem_ut.c.

Here is the caller graph for this function:

Variable Documentation

◆ cb_evt1

enum m0_net_tm_ev_type cb_evt1
static

Definition at line 157 of file bulk_mem_ut.c.

◆ cb_evt2

enum m0_net_tm_ev_type cb_evt2
static

Definition at line 189 of file bulk_mem_ut.c.

◆ cb_nb1

struct m0_net_buffer* cb_nb1
static

Definition at line 159 of file bulk_mem_ut.c.

◆ cb_nb2

struct m0_net_buffer* cb_nb2
static

Definition at line 191 of file bulk_mem_ut.c.

◆ cb_qt1

enum m0_net_queue_type cb_qt1
static

Definition at line 158 of file bulk_mem_ut.c.

◆ cb_qt2

enum m0_net_queue_type cb_qt2
static

Definition at line 190 of file bulk_mem_ut.c.

◆ cb_status1

int32_t cb_status1
static

Definition at line 161 of file bulk_mem_ut.c.

◆ cb_status2

int32_t cb_status2
static

Definition at line 193 of file bulk_mem_ut.c.

◆ cb_tms1

enum m0_net_tm_state cb_tms1
static

Definition at line 160 of file bulk_mem_ut.c.

◆ cb_tms2

enum m0_net_tm_state cb_tms2
static

Definition at line 192 of file bulk_mem_ut.c.

◆ m0_net_bulk_mem_ut

struct m0_ut_suite m0_net_bulk_mem_ut
Initial value:
= {
.ts_name = "net-bulk-mem",
.ts_init = NULL,
.ts_fini = NULL,
.ts_tests = {
{ "net_bulk_mem_buf_copy_test", test_buf_copy },
{ "net_bulk_mem_tm_test", test_tm },
{ "net_bulk_mem_ep", test_ep },
{ "net_bulk_mem_failure_tests", test_failure },
{ "net_bulk_mem_ping_tests", test_ping },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void test_failure(void)
Definition: bulk_mem_ut.c:227
static void test_buf_copy(void)
Definition: bulk_mem_ut.c:37
static void test_ping(void)
Definition: bulk_mem_ut.c:693
static void test_ep(void)
Definition: bulk_mem_ut.c:93
static void test_tm(void)
Definition: bulk_mem_ut.c:771

Definition at line 819 of file bulk_mem_ut.c.

◆ quiet_ops

struct ping_ops quiet_ops
static
Initial value:
= {
}
static int quiet_printf(const char *fmt,...)
Definition: bulk_mem_ut.c:684

Definition at line 689 of file bulk_mem_ut.c.