Motr  M0
protection_info_checks.c File Reference
#include <openssl/md5.h>
#include "ut/ut.h"
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/ut/client.h"
#include "lib/cksum.h"
#include "lib/trace.h"
Include dependency graph for protection_info_checks.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 
#define DATA_UNIT_COUNT   10
 
#define OBJ_CONTAINER   0x123
 
#define OBJ_KEY   0x456
 

Enumerations

enum  { BUFFER_SIZE = 4096, SEGS_NR = 16, BIG_BUFFER_SIZE = 4096*16, BIG_SEGS_NR = 10 }
 

Functions

M0_INTERNAL int pi_init (void)
 
M0_INTERNAL int pi_fini (void)
 
void verify_case_one_two (void)
 
static void ut_test_pi_api_case_one_two (void)
 
static void ut_test_pi_api_case_third (void)
 

Variables

struct m0_ut_suite ut_suite_pi
 
struct m0_bufvecuser_data
 
unsigned char * curr_context [DATA_UNIT_COUNT]
 
unsigned char * seeded_sum [DATA_UNIT_COUNT]
 
unsigned char * final_sum
 
struct m0_bufvecbig_user_data
 
unsigned char * big_curr_context
 
unsigned char * big_final_sum
 

Macro Definition Documentation

◆ DATA_UNIT_COUNT

#define DATA_UNIT_COUNT   10

Definition at line 45 of file protection_info_checks.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 32 of file protection_info_checks.c.

◆ OBJ_CONTAINER

#define OBJ_CONTAINER   0x123

Definition at line 46 of file protection_info_checks.c.

◆ OBJ_KEY

#define OBJ_KEY   0x456

Definition at line 47 of file protection_info_checks.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BUFFER_SIZE 
SEGS_NR 
BIG_BUFFER_SIZE 
BIG_SEGS_NR 

Definition at line 37 of file protection_info_checks.c.

Function Documentation

◆ pi_fini()

M0_INTERNAL int pi_fini ( void  )

Definition at line 103 of file protection_info_checks.c.

Here is the call graph for this function:

◆ pi_init()

M0_INTERNAL int pi_init ( void  )

Definition at line 58 of file protection_info_checks.c.

Here is the call graph for this function:

◆ ut_test_pi_api_case_one_two()

static void ut_test_pi_api_case_one_two ( void  )
static

Definition at line 203 of file protection_info_checks.c.

Here is the call graph for this function:

◆ ut_test_pi_api_case_third()

static void ut_test_pi_api_case_third ( void  )
static

Definition at line 259 of file protection_info_checks.c.

Here is the call graph for this function:

◆ verify_case_one_two()

void verify_case_one_two ( void  )

Definition at line 122 of file protection_info_checks.c.

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

Variable Documentation

◆ big_curr_context

unsigned char* big_curr_context

Definition at line 55 of file protection_info_checks.c.

◆ big_final_sum

unsigned char* big_final_sum

Definition at line 56 of file protection_info_checks.c.

◆ big_user_data

struct m0_bufvec* big_user_data

Definition at line 54 of file protection_info_checks.c.

◆ curr_context

unsigned char* curr_context[DATA_UNIT_COUNT]

Definition at line 50 of file protection_info_checks.c.

◆ final_sum

unsigned char* final_sum

Definition at line 52 of file protection_info_checks.c.

◆ seeded_sum

unsigned char* seeded_sum[DATA_UNIT_COUNT]

Definition at line 51 of file protection_info_checks.c.

◆ user_data

struct m0_bufvec* user_data

Definition at line 49 of file protection_info_checks.c.

◆ ut_suite_pi

struct m0_ut_suite ut_suite_pi
Initial value:
= {
.ts_name = "pi_ut",
.ts_init = pi_init,
.ts_fini = pi_fini,
.ts_tests = {
{ "m0_pi_checks_case_one_two", &ut_test_pi_api_case_one_two},
{ "m0_pi_checks_case_third", &ut_test_pi_api_case_third},
{ NULL, NULL },
}
}
#define NULL
Definition: misc.h:38
M0_INTERNAL int pi_init(void)
static void ut_test_pi_api_case_one_two(void)
static void ut_test_pi_api_case_third(void)
M0_INTERNAL int pi_fini(void)

Definition at line 35 of file protection_info_checks.c.