Motr  M0
ut.c File Reference
#include "lib/trace.h"
#include "ut/ut.h"
#include "ut/ut_internal.h"
#include "ut/module.h"
#include "module/instance.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/finject_internal.h"
#include "lib/string.h"
#include "lib/memory.h"
#include <stdlib.h>
Include dependency graph for ut.c:

Go to the source code of this file.

Data Structures

struct  ut_entry
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define LOG_PREFIX
 

Functions

static int test_suites_enable (const struct m0_ut_module *m)
 
static struct m0_ut_moduleut_module (void)
 
M0_INTERNAL int m0_ut_init (struct m0 *instance)
 
M0_INTERNAL void m0_ut_fini (void)
 
M0_INTERNAL void m0_ut_add (struct m0_ut_module *m, struct m0_ut_suite *ts, bool enable)
 
static struct m0_ut_suitesuite_find (const struct m0_ut_module *m, const char *name)
 
static struct m0_utget_test_by_name (const struct m0_ut_module *m, const char *s_name, const char *t_name)
 
static void set_enabled_flag_for (const struct m0_ut_module *m, const char *s_name, const char *t_name, bool value)
 
static bool exists (const struct m0_ut_module *m, const char *s_name, const char *t_name)
 
static int test_add (struct m0_list *list, const char *suite, const char *test, const struct m0_ut_module *m)
 
static int test_list_populate (struct m0_list *list, const char *str, const struct m0_ut_module *m)
 
static void test_list_destroy (struct m0_list *list)
 
static int test_list_create (struct m0_list *list, const struct m0_ut_module *m)
 
static const char * skipspaces (const char *str)
 
static void check_all_fi_disabled (void)
 
static void run_test (const struct m0_ut *test, size_t max_name_len)
 
static int run_suite (const struct m0_ut_suite *suite, int max_name_len)
 
static int max_test_name_len (const struct m0_ut_suite **suites, unsigned nr)
 
static int tests_run_all (const struct m0_ut_module *m)
 
M0_INTERNAL int m0_ut_run (void)
 
M0_INTERNAL void m0_ut_list (bool with_tests, bool yaml_output)
 
static void ut_owners_print (const struct m0_ut_suite *suite)
 
M0_INTERNAL void m0_ut_list_owners (void)
 
M0_INTERNAL bool m0_ut_assertimpl (bool c, const char *str_c, const char *file, int lno, const char *func)
 
M0_INTERNAL bool m0_ut_small_credits (void)
 
static int cmp (const struct m0_ut_suite **s0, const struct m0_ut_suite **s1)
 
M0_INTERNAL void m0_ut_shuffle (unsigned seed)
 
M0_INTERNAL void m0_ut_start_from (const char *suite)
 

Variables

struct m0_fid g_process_fid = M0_FID_TINIT('r', 1, 1)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 23 of file ut.c.