Motr  M0
cob.c File Reference
#include "ut/ut.h"
#include "lib/ub.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/bitstring.h"
#include "be/ut/helper.h"
#include "be/seg.h"
#include "cob/cob.h"
#include "lib/locality.h"
Include dependency graph for cob.c:

Go to the source code of this file.

Functions

static int ut_init (void)
 
static int ut_fini (void)
 
static void ut_tx_open (struct m0_be_tx *tx, struct m0_be_tx_credit *credit)
 
static int _locate (int c, int k)
 
static void test_mkfs (void)
 
static void test_init (void)
 
static void test_fini (void)
 
static void test_create (void)
 
static void test_add_name (void)
 
static void test_del_name (void)
 
static void test_lookup (void)
 
static void test_locate (void)
 
static void test_delete (void)
 

Variables

static const char test_name [] = "hello_world"
 
static const char add_name [] = "add_name"
 
static const char wrong_name [] = "wrong_name"
 
static struct m0_cob_domain_id id = { 42 }
 
static struct m0_be_ut_backend ut_be
 
static struct m0_sm_groupgrp
 
static struct m0_cob_domaindom
 
static struct m0_cobcob
 
struct m0_ut_suite cob_ut
 

Function Documentation

◆ _locate()

static int _locate ( int  c,
int  k 
)
static

Definition at line 64 of file cob.c.

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

◆ test_add_name()

static void test_add_name ( void  )
static

Definition at line 189 of file cob.c.

Here is the call graph for this function:

◆ test_create()

static void test_create ( void  )
static

Definition at line 143 of file cob.c.

Here is the call graph for this function:

◆ test_del_name()

static void test_del_name ( void  )
static

Definition at line 232 of file cob.c.

Here is the call graph for this function:

◆ test_delete()

static void test_delete ( void  )
static

Definition at line 316 of file cob.c.

Here is the call graph for this function:

◆ test_fini()

static void test_fini ( void  )
static

Definition at line 132 of file cob.c.

Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Definition at line 118 of file cob.c.

Here is the call graph for this function:

◆ test_locate()

static void test_locate ( void  )
static

Lookup by fid, make sure pfid is right.

Definition at line 291 of file cob.c.

Here is the call graph for this function:

◆ test_lookup()

static void test_lookup ( void  )
static

Lookup by name, make sure cfid is right.

Definition at line 268 of file cob.c.

Here is the call graph for this function:

◆ test_mkfs()

static void test_mkfs ( void  )
static

Definition at line 80 of file cob.c.

Here is the call graph for this function:

◆ ut_fini()

static int ut_fini ( void  )
static

Definition at line 48 of file cob.c.

◆ ut_init()

static int ut_init ( void  )
static

Definition at line 43 of file cob.c.

◆ ut_tx_open()

static void ut_tx_open ( struct m0_be_tx tx,
struct m0_be_tx_credit credit 
)
static

Definition at line 53 of file cob.c.

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

Variable Documentation

◆ add_name

const char add_name[] = "add_name"
static

Definition at line 35 of file cob.c.

◆ cob

struct m0_cob* cob
static

Definition at line 41 of file cob.c.

◆ cob_ut

struct m0_ut_suite cob_ut
Initial value:
= {
.ts_name = "cob-ut",
.ts_init = ut_init,
.ts_fini = ut_fini,
.ts_tests = {
{ "cob-mkfs", test_mkfs },
{ "cob-init", test_init },
{ "cob-create", test_create },
{ "cob-lookup", test_lookup },
{ "cob-locate", test_locate },
{ "cob-add-name", test_add_name },
{ "cob-del-name", test_del_name },
{ "cob-delete", test_delete },
{ "cob-fini", test_fini },
{ NULL, NULL }
}
}
static void test_init(void)
Definition: cob.c:118
static void test_create(void)
Definition: cob.c:143
#define NULL
Definition: misc.h:38
static void test_locate(void)
Definition: cob.c:291
static int ut_init(void)
Definition: cob.c:43
static void test_mkfs(void)
Definition: cob.c:80
static int ut_fini(void)
Definition: cob.c:48
static void test_del_name(void)
Definition: cob.c:232
static void test_add_name(void)
Definition: cob.c:189
static void test_lookup(void)
Definition: cob.c:268
static void test_delete(void)
Definition: cob.c:316
static void test_fini(void)
Definition: cob.c:132

Definition at line 340 of file cob.c.

◆ dom

struct m0_cob_domain* dom
static

Definition at line 40 of file cob.c.

◆ grp

struct m0_sm_group* grp
static

Definition at line 39 of file cob.c.

◆ id

struct m0_cob_domain_id id = { 42 }
static

Definition at line 37 of file cob.c.

◆ test_name

const char test_name[] = "hello_world"
static

Definition at line 34 of file cob.c.

◆ ut_be

struct m0_be_ut_backend ut_be
static

Definition at line 38 of file cob.c.

◆ wrong_name

const char wrong_name[] = "wrong_name"
static

Definition at line 36 of file cob.c.