Motr  M0
st.c File Reference
#include <errno.h>
#include <sys/types.h>
#include "motr/st/st.h"
#include "motr/st/st_misc.h"
#include "motr/st/st_assert.h"
Include dependency graph for st.c:

Go to the source code of this file.

Functions

struct m0st_get_motr (void)
 
void st_set_instance (struct m0_client *instance)
 
struct m0_clientst_get_instance ()
 
struct st_cfg st_get_cfg ()
 
struct st_worker_statst_get_worker_stat (int idx)
 
void st_set_tests (const char *tests)
 
const char * st_get_tests ()
 
void st_set_test_mode (enum st_mode mode)
 
enum st_mode st_get_test_mode (void)
 
void st_set_nr_workers (int nr)
 
int st_get_nr_workers (void)
 
int st_set_worker_tid (int idx, pid_t tid)
 
int st_get_worker_idx (pid_t tid)
 
static struct st_suitelookup_suite (const char *name)
 
static struct st_testlookup_test (struct st_suite *s, const char *t_name)
 
static int select_tests (const char *str)
 
static int shuffle_tests (struct st_suite *suite)
 
static M0_UNUSED const char * skipspaces (const char *str)
 
static void run_test (const struct st_test *test)
 
static int run_suite (struct st_suite *suite)
 
static int run_suites (struct st_suite **suites, int nr_suites)
 
int st_run (const char *test_list_str)
 
void st_list (bool with_tests)
 
int st_init (void)
 
void st_fini (void)
 
int st_add (struct st_suite *suite)
 
void st_add_suites ()
 

Variables

static struct m0_st_ctx ctx
 
static const char padding [256] = { [0 ... 254] = ' ', [255] = '\0' }
 
struct st_suite st_suite_idx
 
struct st_suite st_suite_obj
 
struct st_suite st_suite_m0_read
 
struct st_suite st_suite_m0_write
 
struct st_suite st_suite_osync
 
struct st_suite st_suite_isync
 
struct st_suite st_suite_layout
 
struct st_suite st_suite_example
 
struct st_suite st_suite_mt
 
struct st_suite st_suite_cancel
 

Function Documentation

◆ lookup_suite()

static struct st_suite* lookup_suite ( const char *  name)
static

Definition at line 138 of file st.c.

Here is the caller graph for this function:

◆ lookup_test()

static struct st_test* lookup_test ( struct st_suite s,
const char *  t_name 
)
static

Definition at line 151 of file st.c.

Here is the caller graph for this function:

◆ run_suite()

static int run_suite ( struct st_suite suite)
static

Definition at line 321 of file st.c.

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

◆ run_suites()

static int run_suites ( struct st_suite **  suites,
int  nr_suites 
)
static

Definition at line 377 of file st.c.

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

◆ run_test()

static void run_test ( const struct st_test test)
static

Definition at line 278 of file st.c.

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

◆ select_tests()

static int select_tests ( const char *  str)
static

Definition at line 166 of file st.c.

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

◆ shuffle_tests()

static int shuffle_tests ( struct st_suite suite)
static

Definition at line 213 of file st.c.

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

◆ skipspaces()

static M0_UNUSED const char* skipspaces ( const char *  str)
inlinestatic

Definition at line 269 of file st.c.

◆ st_add()

int st_add ( struct st_suite suite)

Definition at line 501 of file st.c.

Here is the caller graph for this function:

Variable Documentation

◆ ctx

struct m0_st_ctx ctx
static
Initial value:
= {
.sx_cfg = {
.sc_nr_threads = 1,
.sc_run_selected = 0,
.sc_nr_rounds = 1,
.sc_mode = ST_SEQ_MODE,
.sc_pace = 0,
},
.sx_nr_all = 0,
.sx_nr_selected = 0,
}
Definition: st.h:99

many are borrowed from ut/ut{.c,.h}

Definition at line 35 of file st.c.

◆ padding

const char padding[256] = { [0 ... 254] = ' ', [255] = '\0' }
static

Definition at line 276 of file st.c.

◆ st_suite_cancel

struct st_suite st_suite_cancel

Definition at line 265 of file cancel.c.

◆ st_suite_example

struct st_suite st_suite_example

Definition at line 244 of file example.c.

◆ st_suite_idx

struct st_suite st_suite_idx

This is the place to add test suites

Definition at line 1322 of file idx.c.

◆ st_suite_isync

struct st_suite st_suite_isync

Definition at line 520 of file isync.c.

◆ st_suite_layout

struct st_suite st_suite_layout

Definition at line 1140 of file layout.c.

◆ st_suite_m0_read

struct st_suite st_suite_m0_read

Definition at line 630 of file read.c.

◆ st_suite_m0_write

struct st_suite st_suite_m0_write

Definition at line 716 of file write.c.

◆ st_suite_mt

struct st_suite st_suite_mt

Definition at line 526 of file mt_fom.c.

◆ st_suite_obj

struct st_suite st_suite_obj

Definition at line 735 of file obj.c.

◆ st_suite_osync

struct st_suite st_suite_osync

Definition at line 466 of file osync.c.