Motr  M0
cookie.c File Reference
#include <unistd.h>
#include "lib/types.h"
#include "lib/errno.h"
#include "lib/cookie.h"
#include "ut/ut.h"
#include "lib/memory.h"
#include "lib/arith.h"
Include dependency graph for cookie.c:

Go to the source code of this file.

Data Structures

struct  obj_struct
 

Functions

static void test_init_apis (struct m0_cookie *cookie_test, struct obj_struct *obj)
 
static void test_valid_cookie (struct m0_cookie *cookie_test, struct obj_struct *obj)
 
static void test_m0_cookie_dereference (struct m0_cookie *cookie_test, struct obj_struct *obj)
 
static void test_m0_cookie_of (struct m0_cookie *cookie_test, struct obj_struct *obj)
 
static void addr_sanity (const uint64_t *addr, bool sane, bool aligned)
 
void test_cookie (void)
 

Variables

static uint64_t bss
 
static const uint64_t readonly = 2
 
static struct obj_struct obj_bss
 

Function Documentation

◆ addr_sanity()

static void addr_sanity ( const uint64_t *  addr,
bool  sane,
bool  aligned 
)
static

Definition at line 134 of file cookie.c.

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

◆ test_cookie()

void test_cookie ( void  )

Definition at line 141 of file cookie.c.

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

◆ test_init_apis()

static void test_init_apis ( struct m0_cookie cookie_test,
struct obj_struct obj 
)
static

Definition at line 54 of file cookie.c.

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

◆ test_m0_cookie_dereference()

static void test_m0_cookie_dereference ( struct m0_cookie cookie_test,
struct obj_struct obj 
)
static

Definition at line 84 of file cookie.c.

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

◆ test_m0_cookie_of()

static void test_m0_cookie_of ( struct m0_cookie cookie_test,
struct obj_struct obj 
)
static

Definition at line 122 of file cookie.c.

Here is the caller graph for this function:

◆ test_valid_cookie()

static void test_valid_cookie ( struct m0_cookie cookie_test,
struct obj_struct obj 
)
static

Definition at line 66 of file cookie.c.

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

Variable Documentation

◆ bss

uint64_t bss
static

Definition at line 50 of file cookie.c.

◆ obj_bss

struct obj_struct obj_bss
static

Definition at line 52 of file cookie.c.

◆ readonly

const uint64_t readonly = 2
static

Definition at line 51 of file cookie.c.