Motr  M0
xcode_fop_test.c File Reference
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/bitstring.h"
#include "lib/misc.h"
#include "lib/vec.h"
#include "ut/ut.h"
#include "motr/init.h"
#include "fop/fop.h"
#include "xcode/ut/xcode_fops_ff.h"
#include "rpc/rpc_opcodes.h"
#include "rpc/rpc.h"
#include "net/net.h"
Include dependency graph for xcode_fop_test.c:

Go to the source code of this file.

Enumerations

enum  {
  ARR_COUNT_1 = 10, ARR_COUNT_2 = 11, TEST_OFFSET = 0xABCDEF, TEST_COUNT = 0x123456,
  TEST_INDEX = 0xDEAD, TEST_VAL = 0x1111, TEST_CNT_1 = 0x1234, TEST_FLAG = 0x1,
  TEST_BUF_SIZE = 33, NO_OF_BUFFERS = 85, BUFVEC_SEG_SIZE = 256
}
 

Functions

static void fop_verify (struct m0_fop *fop)
 
static void fop_free (struct m0_fop *fop)
 
static void test_fop_encdec (void)
 
static int xcode_bufvec_fop_init (void)
 
static int xcode_bufvec_fop_fini (void)
 

Variables

enum { ... }  __attribute__
 
static char * fop_test_buf = "test fop encode/decode"
 
struct m0_fop_type_ops test_ops
 
static struct m0_fop_type m0_fop_test_fopt
 
struct m0_ut_suite xcode_bufvec_fop_ut
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Random test values.

Enumerator
ARR_COUNT_1 
ARR_COUNT_2 
TEST_OFFSET 
TEST_COUNT 
TEST_INDEX 
TEST_VAL 
TEST_CNT_1 
TEST_FLAG 
TEST_BUF_SIZE 
NO_OF_BUFFERS 
BUFVEC_SEG_SIZE 

Definition at line 38 of file xcode_fop_test.c.

Function Documentation

◆ fop_free()

static void fop_free ( struct m0_fop fop)
static

Clean up allocated fop structures.

Definition at line 110 of file xcode_fop_test.c.

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

◆ fop_verify()

static void fop_verify ( struct m0_fop fop)
static

Definition at line 59 of file xcode_fop_test.c.

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

◆ test_fop_encdec()

static void test_fop_encdec ( void  )
static

Test function to check generic fop encode decode

Definition at line 175 of file xcode_fop_test.c.

Here is the call graph for this function:

◆ xcode_bufvec_fop_fini()

static int xcode_bufvec_fop_fini ( void  )
static

Definition at line 318 of file xcode_fop_test.c.

◆ xcode_bufvec_fop_init()

static int xcode_bufvec_fop_init ( void  )
static

Definition at line 312 of file xcode_fop_test.c.

Variable Documentation

◆ __attribute__

enum { ... } __attribute__

Random test values.

◆ fop_test_buf

char* fop_test_buf = "test fop encode/decode"
static

Definition at line 52 of file xcode_fop_test.c.

◆ m0_fop_test_fopt

struct m0_fop_type m0_fop_test_fopt
static

Definition at line 57 of file xcode_fop_test.c.

◆ test_ops

struct m0_fop_type_ops test_ops
Initial value:
= {
}

Definition at line 54 of file xcode_fop_test.c.

◆ xcode_bufvec_fop_ut

struct m0_ut_suite xcode_bufvec_fop_ut
Initial value:
= {
.ts_name = "xcode_bufvec_fop-ut",
.ts_tests = {
{ "xcode_bufvec_fop", test_fop_encdec },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void test_fop_encdec(void)
static int xcode_bufvec_fop_fini(void)
static int xcode_bufvec_fop_init(void)

Definition at line 324 of file xcode_fop_test.c.