Motr  M0
obj.c File Reference
#include "lib/trace.h"
#include "motr/client.h"
#include "motr/st/st.h"
#include "motr/st/st_misc.h"
#include "motr/st/st_assert.h"
#include "lib/memory.h"
#include "lib/types.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include <stdlib.h>
#include <unistd.h>
Include dependency graph for obj.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Functions

static void obj_create_simple (void)
 
static void obj_create_error_handling (void)
 
static void obj_open_non_existent (void)
 
static void obj_create_multiple_objects (void)
 
static void obj_create_on_multiple_pools (void)
 
static void obj_create_then_delete (void)
 
static void obj_delete_multiple (void)
 
static void obj_no_wait (void)
 
static void obj_wait_no_launch (void)
 
static void obj_wait_twice (void)
 
static void mock_op_cb_stable (struct m0_op *op)
 
static void mock_op_cb_failed (struct m0_op *op)
 
static void obj_op_setup (void)
 
static int st_obj_suite_init (void)
 
static int st_obj_suite_fini (void)
 

Variables

static struct m0_uint128 test_id
 
struct m0_container st_obj_container
 
static uint64_t layout_id
 
struct st_suite st_suite_obj
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 29 of file obj.c.

Function Documentation

◆ mock_op_cb_failed()

static void mock_op_cb_failed ( struct m0_op op)
static

Definition at line 611 of file obj.c.

Here is the caller graph for this function:

◆ mock_op_cb_stable()

static void mock_op_cb_stable ( struct m0_op op)
static

Definition at line 603 of file obj.c.

Here is the caller graph for this function:

◆ obj_create_error_handling()

static void obj_create_error_handling ( void  )
static

Definition at line 95 of file obj.c.

Here is the call graph for this function:

◆ obj_create_multiple_objects()

static void obj_create_multiple_objects ( void  )
static

Uses client to create multiple objects. All the operations are expected to complete.

Remarks
Every object and operation used by this test are correctly finalised and released.

Definition at line 185 of file obj.c.

Here is the call graph for this function:

◆ obj_create_on_multiple_pools()

static void obj_create_on_multiple_pools ( void  )
static

Definition at line 247 of file obj.c.

Here is the call graph for this function:

◆ obj_create_simple()

static void obj_create_simple ( void  )
static

Creates an object.

Remarks
This test does not call op_wait().

Definition at line 58 of file obj.c.

Here is the call graph for this function:

◆ obj_create_then_delete()

static void obj_create_then_delete ( void  )
static

Creates an object and then issues a new op. to delete it straightaway.

Definition at line 309 of file obj.c.

Here is the call graph for this function:

◆ obj_delete_multiple()

static void obj_delete_multiple ( void  )
static

Arbitrarily creates and deletes objects within the same set of objects. Launches different groups of operations each time.

Definition at line 367 of file obj.c.

Here is the call graph for this function:

◆ obj_no_wait()

static void obj_no_wait ( void  )
static

Launches a create object operation but does not call m0_op_wait().

Definition at line 482 of file obj.c.

Here is the call graph for this function:

◆ obj_op_setup()

static void obj_op_setup ( void  )
static

m0_op_setup() for entity op.

Definition at line 622 of file obj.c.

Here is the call graph for this function:

◆ obj_open_non_existent()

static void obj_open_non_existent ( void  )
static

Tries to open an object that does not exist.

Definition at line 139 of file obj.c.

Here is the call graph for this function:

◆ obj_wait_no_launch()

static void obj_wait_no_launch ( void  )
static

m0_op_wait() times out.

Definition at line 523 of file obj.c.

Here is the call graph for this function:

◆ obj_wait_twice()

static void obj_wait_twice ( void  )
static

Launches a create object operation and waits() twice on it.

Definition at line 561 of file obj.c.

Here is the call graph for this function:

◆ st_obj_suite_fini()

static int st_obj_suite_fini ( void  )
static

Finalises the obj suite's environment.

Definition at line 730 of file obj.c.

◆ st_obj_suite_init()

static int st_obj_suite_init ( void  )
static

Initialises the obj suite's environment.

Definition at line 704 of file obj.c.

Here is the call graph for this function:

Variable Documentation

◆ layout_id

uint64_t layout_id
static

Definition at line 51 of file obj.c.

◆ st_obj_container

struct m0_container st_obj_container

Definition at line 50 of file obj.c.

◆ st_suite_obj

struct st_suite st_suite_obj
Initial value:
= {
.ss_name = "obj_st",
.ss_init = st_obj_suite_init,
.ss_fini = st_obj_suite_fini,
.ss_tests = {
{ "obj_create_simple",
{ "obj_create_error_handling",
{ "obj_open_non_existent",
{ "obj_create_multiple_objects",
{ "obj_create_on_multiple_pools",
{ "obj_create_then_delete",
{ "obj_delete_multiple",
{ "obj_no_wait",
{ "obj_wait_twice",
{ "obj_wait_no_launch",
{ "obj_op_setup",
{ NULL, NULL }
}
}
static void obj_create_then_delete(void)
Definition: obj.c:309
static int st_obj_suite_fini(void)
Definition: obj.c:730
#define NULL
Definition: misc.h:38
static void obj_wait_twice(void)
Definition: obj.c:561
static void obj_create_multiple_objects(void)
Definition: obj.c:185
static int st_obj_suite_init(void)
Definition: obj.c:704
static void obj_create_error_handling(void)
Definition: obj.c:95
static void obj_wait_no_launch(void)
Definition: obj.c:523
static void obj_op_setup(void)
Definition: obj.c:622
static void obj_create_simple(void)
Definition: obj.c:58
static void obj_delete_multiple(void)
Definition: obj.c:367
static void obj_no_wait(void)
Definition: obj.c:482
static void obj_create_on_multiple_pools(void)
Definition: obj.c:247
static void obj_open_non_existent(void)
Definition: obj.c:139

Definition at line 735 of file obj.c.

◆ test_id

struct m0_uint128 test_id
static

Definition at line 49 of file obj.c.