Motr  M0
idx.c File Reference
#include "lib/trace.h"
#include "ut/ut.h"
#include "motr/ut/client.h"
#include "lib/finject.h"
#include "motr/idx.c"
Include dependency graph for idx.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Functions

static struct m0_op_idxut_m0_op_idx_alloc ()
 
static void ut_m0_op_idx_free (struct m0_op_idx *oi)
 
static void ut__idx_op_invariant (void)
 
static void ut_idx_op_init (void)
 
static void ut_idx_op_complete (void)
 
static void ut_idx_op_fail (void)
 
static int idx_dummy_query (struct m0_op_idx *oi)
 
static void ut_idx_op_cb_launch (void)
 
static void ut_idx_op_cb_free (void)
 
static void ut_idx_op_cb_fini (void)
 
static void ut_idx_op_ast_complete (void)
 
static void ut_idx_op_ast_fail (void)
 
static void ut_m0_idx_init (void)
 
static void ut_m0_idx_fini (void)
 
static void ut_m0_idx_op (void)
 
static void ut_m0_idx_op_namei (void)
 
static void ut_m0_idx_service_config (void)
 
M0_INTERNAL int ut_idx_init (void)
 
M0_INTERNAL int ut_idx_fini (void)
 

Variables

struct m0_ut_suite ut_suite_idx
 
static struct m0_clientdummy_instance
 
static int dummy_query_rc = 1
 
static struct m0_idx_query_ops idx_dummy_query_ops
 
static struct m0_idx_service idx_dummy_service
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 23 of file idx.c.

Function Documentation

◆ idx_dummy_query()

static int idx_dummy_query ( struct m0_op_idx oi)
static

Definition at line 255 of file idx.c.

◆ ut__idx_op_invariant()

static void ut__idx_op_invariant ( void  )
static

Tests m0_op_obj_invariant().

Definition at line 65 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_fini()

M0_INTERNAL int ut_idx_fini ( void  )

Definition at line 684 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_init()

M0_INTERNAL int ut_idx_init ( void  )

Definition at line 674 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_ast_complete()

static void ut_idx_op_ast_complete ( void  )
static

Tests idx_op_ast_complete().

Definition at line 413 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_ast_fail()

static void ut_idx_op_ast_fail ( void  )
static

Tests idx_op_ast_fail().

Definition at line 479 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_cb_fini()

static void ut_idx_op_cb_fini ( void  )
static

Tests obj_namei_cb_fini().

Definition at line 388 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_cb_free()

static void ut_idx_op_cb_free ( void  )
static

Tests obj_namei_cb_free().

Definition at line 364 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_cb_launch()

static void ut_idx_op_cb_launch ( void  )
static

Definition at line 273 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_complete()

static void ut_idx_op_complete ( void  )
static

Tests idx_op_complete().

Definition at line 128 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_fail()

static void ut_idx_op_fail ( void  )
static

Tests idx_op_fail().

Definition at line 190 of file idx.c.

Here is the call graph for this function:

◆ ut_idx_op_init()

static void ut_idx_op_init ( void  )
static

Tests base case and preconditions of m0_idx_op_init().

Definition at line 88 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_idx_fini()

static void ut_m0_idx_fini ( void  )
static

Tests m0_idx_fini().

Definition at line 579 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_idx_init()

static void ut_m0_idx_init ( void  )
static

Tests the pre and post conditions of the m0_idx_init() entry point. Also checks the object is correctly initialised. The testee is seen as a black box that has to react as expected to some specific input and generate some valid output.

Definition at line 550 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_idx_op()

static void ut_m0_idx_op ( void  )
static

Tests base case and preconditions of m0_idx_op().

Definition at line 604 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_idx_op_namei()

static void ut_m0_idx_op_namei ( void  )
static

Tests base case and preconditions of m0_idx_op_namei().

Definition at line 638 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_idx_service_config()

static void ut_m0_idx_service_config ( void  )
static

Tests for m0_idx_service_config()

Definition at line 666 of file idx.c.

Here is the call graph for this function:

◆ ut_m0_op_idx_alloc()

static struct m0_op_idx* ut_m0_op_idx_alloc ( )
static

Definition at line 40 of file idx.c.

Here is the caller graph for this function:

◆ ut_m0_op_idx_free()

static void ut_m0_op_idx_free ( struct m0_op_idx oi)
static

Definition at line 57 of file idx.c.

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

Variable Documentation

◆ dummy_instance

struct m0_client* dummy_instance
static

Definition at line 38 of file idx.c.

◆ dummy_query_rc

int dummy_query_rc = 1
static

Tests only a few of the pre-conditions of idx_op_cb_launch().

Definition at line 253 of file idx.c.

◆ idx_dummy_query_ops

struct m0_idx_query_ops idx_dummy_query_ops
static
Initial value:
= {
.iqo_namei_create = idx_dummy_query,
.iqo_namei_delete = idx_dummy_query,
.iqo_namei_lookup = idx_dummy_query,
.iqo_namei_list = idx_dummy_query,
.iqo_get = idx_dummy_query,
.iqo_put = idx_dummy_query,
.iqo_del = idx_dummy_query,
.iqo_next = idx_dummy_query,
}
static int idx_dummy_query(struct m0_op_idx *oi)
Definition: idx.c:255

Definition at line 260 of file idx.c.

◆ idx_dummy_service

struct m0_idx_service idx_dummy_service
static

Definition at line 271 of file idx.c.

◆ ut_suite_idx

struct m0_ut_suite ut_suite_idx

Definition at line 36 of file idx.c.