Motr  M0
finject.c File Reference
#include "lib/ub.h"
#include "ut/ut.h"
#include "lib/finject.h"
Include dependency graph for finject.c:

Go to the source code of this file.

Data Structures

struct  state_data
 

Typedefs

typedef bool(* target_func_t) (void)
 

Enumerations

enum  {
  STATE_DATA_MAGIC = 0xfa57ccd0, TEST_COUNT = 100, N = 7, M = 4,
  P = 40, P_ERROR = 30
}
 

Functions

static bool target_func_delayed_registration (void)
 
static bool target_func_fpoint_types (void)
 
static bool state_func (void *data)
 
static void disable_fp (const char *func_name, const char *tag_name, target_func_t target_func)
 
static void test_enable_always (const char *func_name)
 
static void test_enable_once (const char *func_name)
 
static void test_enable_each_nth_time (const char *func_name)
 
static void test_enable_off_n_on_m (const char *func_name)
 
static void test_enable_random (const char *func_name)
 
static void test_enable_func (const char *func_name)
 
static void test_fpoint_types (void)
 
static void test_delayed_registration (void)
 
static void test_enable_disable (void)
 
void test_finject (void)
 

Variables

static const char test_tag [] = "test_fp"
 

Typedef Documentation

◆ target_func_t

typedef bool(* target_func_t) (void)

Definition at line 64 of file finject.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
STATE_DATA_MAGIC 
TEST_COUNT 
P_ERROR 

Definition at line 55 of file finject.c.

Function Documentation

◆ disable_fp()

static void disable_fp ( const char *  func_name,
const char *  tag_name,
target_func_t  target_func 
)
static

Definition at line 94 of file finject.c.

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

◆ state_func()

static bool state_func ( void *  data)
static

Definition at line 82 of file finject.c.

Here is the caller graph for this function:

◆ target_func_delayed_registration()

static bool target_func_delayed_registration ( void  )
static

Definition at line 66 of file finject.c.

Here is the caller graph for this function:

◆ target_func_fpoint_types()

static bool target_func_fpoint_types ( void  )
static

Definition at line 71 of file finject.c.

Here is the caller graph for this function:

◆ test_delayed_registration()

static void test_delayed_registration ( void  )
static

Definition at line 219 of file finject.c.

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

◆ test_enable_always()

static void test_enable_always ( const char *  func_name)
static

Definition at line 102 of file finject.c.

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

◆ test_enable_disable()

static void test_enable_disable ( void  )
static

Definition at line 231 of file finject.c.

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

◆ test_enable_each_nth_time()

static void test_enable_each_nth_time ( const char *  func_name)
static

Definition at line 129 of file finject.c.

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

◆ test_enable_func()

static void test_enable_func ( const char *  func_name)
static

Definition at line 182 of file finject.c.

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

◆ test_enable_off_n_on_m()

static void test_enable_off_n_on_m ( const char *  func_name)
static

Definition at line 144 of file finject.c.

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

◆ test_enable_once()

static void test_enable_once ( const char *  func_name)
static

Definition at line 114 of file finject.c.

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

◆ test_enable_random()

static void test_enable_random ( const char *  func_name)
static

Definition at line 164 of file finject.c.

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

◆ test_finject()

void test_finject ( void  )

Definition at line 282 of file finject.c.

Here is the call graph for this function:

◆ test_fpoint_types()

static void test_fpoint_types ( void  )
static

Definition at line 204 of file finject.c.

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

Variable Documentation

◆ test_tag

const char test_tag[] = "test_fp"
static

Definition at line 28 of file finject.c.