Motr  M0
buffer_pool_ut.c File Reference
#include "ut/ut.h"
#include "lib/arith.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "lib/thread.h"
#include "lib/time.h"
#include "net/lnet/lnet.h"
#include "net/buffer_pool.h"
#include "net/net_internal.h"
Include dependency graph for buffer_pool_ut.c:

Go to the source code of this file.

Functions

static void notempty (struct m0_net_buffer_pool *bp)
 
static void low (struct m0_net_buffer_pool *bp)
 
static void buffers_get_put (int rc)
 
static void test_init (void)
 
static void test_get_put (void)
 
static void test_get_put_colour (void)
 
static void test_grow (void)
 
static void test_prune (void)
 
static void test_get_put_multiple (void)
 
static void test_fini (void)
 

Variables

static struct m0_net_buffer_pool bp
 
static struct m0_chan buf_chan
 
static const struct m0_net_buffer_pool_ops b_ops
 
struct m0_ut_suite buffer_pool_ut
 

Function Documentation

◆ buffers_get_put()

static void buffers_get_put ( int  rc)
static

Definition at line 178 of file buffer_pool_ut.c.

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

◆ low()

static void low ( struct m0_net_buffer_pool bp)
static

Definition at line 206 of file buffer_pool_ut.c.

Here is the caller graph for this function:

◆ notempty()

static void notempty ( struct m0_net_buffer_pool bp)
static

Definition at line 201 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_fini()

static void test_fini ( void  )
static

Definition at line 167 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_get_put()

static void test_get_put ( void  )
static

Definition at line 76 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_get_put_colour()

static void test_get_put_colour ( void  )
static

Definition at line 91 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_get_put_multiple()

static void test_get_put_multiple ( void  )
static

Definition at line 135 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_grow()

static void test_grow ( void  )
static

Definition at line 114 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Initialization of buffer pool.

Definition at line 48 of file buffer_pool_ut.c.

Here is the call graph for this function:

◆ test_prune()

static void test_prune ( void  )
static

Definition at line 125 of file buffer_pool_ut.c.

Here is the call graph for this function:

Variable Documentation

◆ b_ops

const struct m0_net_buffer_pool_ops b_ops
static
Initial value:
= {
.nbpo_not_empty = notempty,
.nbpo_below_threshold = low,
}
static void low(struct m0_net_buffer_pool *bp)
static void notempty(struct m0_net_buffer_pool *bp)

Definition at line 40 of file buffer_pool_ut.c.

◆ bp

struct m0_net_buffer_pool bp
static

Definition at line 37 of file buffer_pool_ut.c.

◆ buf_chan

struct m0_chan buf_chan
static

Definition at line 38 of file buffer_pool_ut.c.

◆ buffer_pool_ut

struct m0_ut_suite buffer_pool_ut
Initial value:
= {
.ts_name = "buffer_pool_ut",
.ts_init = NULL,
.ts_fini = NULL,
.ts_tests = {
{ "buffer_pool_init", test_init },
{ "buffer_pool_get_put", test_get_put },
{ "buffer_pool_get_put_colour", test_get_put_colour },
{ "buffer_pool_grow", test_grow },
{ "buffer_pool_prune", test_prune },
{ "buffer_pool_get_put_multiple", test_get_put_multiple },
{ "buffer_pool_fini", test_fini },
{ NULL, NULL }
}
}
static void test_fini(void)
#define NULL
Definition: misc.h:38
static void test_get_put_multiple(void)
static void test_init(void)
static void test_get_put_colour(void)
static void test_prune(void)
static void test_grow(void)
static void test_get_put(void)

Definition at line 211 of file buffer_pool_ut.c.