Linux Perf
tests.h File Reference
#include <stdbool.h>
Include dependency graph for tests.h:

Go to the source code of this file.

Classes

struct  test
 

Macros

#define TEST_ASSERT_VAL(text, cond)
 
#define TEST_ASSERT_EQUAL(text, val, expected)
 

Enumerations

enum  { TEST_OK = 0, TEST_FAIL = -1, TEST_SKIP = -2 }
 

Functions

int test__vmlinux_matches_kallsyms (struct test *test, int subtest)
 
int test__openat_syscall_event (struct test *test, int subtest)
 
int test__openat_syscall_event_on_all_cpus (struct test *test, int subtest)
 
int test__basic_mmap (struct test *test, int subtest)
 
int test__PERF_RECORD (struct test *test, int subtest)
 
int test__perf_evsel__roundtrip_name_test (struct test *test, int subtest)
 
int test__perf_evsel__tp_sched_test (struct test *test, int subtest)
 
int test__syscall_openat_tp_fields (struct test *test, int subtest)
 
int test__pmu (struct test *test, int subtest)
 
int test__attr (struct test *test, int subtest)
 
int test__dso_data (struct test *test, int subtest)
 
int test__dso_data_cache (struct test *test, int subtest)
 
int test__dso_data_reopen (struct test *test, int subtest)
 
int test__parse_events (struct test *test, int subtest)
 
int test__hists_link (struct test *test, int subtest)
 
int test__python_use (struct test *test, int subtest)
 
int test__bp_signal (struct test *test, int subtest)
 
int test__bp_signal_overflow (struct test *test, int subtest)
 
int test__bp_accounting (struct test *test, int subtest)
 
int test__task_exit (struct test *test, int subtest)
 
int test__mem (struct test *test, int subtest)
 
int test__sw_clock_freq (struct test *test, int subtest)
 
int test__code_reading (struct test *test, int subtest)
 
int test__sample_parsing (struct test *test, int subtest)
 
int test__keep_tracking (struct test *test, int subtest)
 
int test__parse_no_sample_id_all (struct test *test, int subtest)
 
int test__dwarf_unwind (struct test *test, int subtest)
 
int test__expr (struct test *test, int subtest)
 
int test__hists_filter (struct test *test, int subtest)
 
int test__mmap_thread_lookup (struct test *test, int subtest)
 
int test__thread_mg_share (struct test *test, int subtest)
 
int test__hists_output (struct test *test, int subtest)
 
int test__hists_cumulate (struct test *test, int subtest)
 
int test__switch_tracking (struct test *test, int subtest)
 
int test__fdarray__filter (struct test *test, int subtest)
 
int test__fdarray__add (struct test *test, int subtest)
 
int test__kmod_path__parse (struct test *test, int subtest)
 
int test__thread_map (struct test *test, int subtest)
 
int test__llvm (struct test *test, int subtest)
 
const char * test__llvm_subtest_get_desc (int subtest)
 
int test__llvm_subtest_get_nr (void)
 
int test__bpf (struct test *test, int subtest)
 
const char * test__bpf_subtest_get_desc (int subtest)
 
int test__bpf_subtest_get_nr (void)
 
int test__session_topology (struct test *test, int subtest)
 
int test__thread_map_synthesize (struct test *test, int subtest)
 
int test__thread_map_remove (struct test *test, int subtest)
 
int test__cpu_map_synthesize (struct test *test, int subtest)
 
int test__synthesize_stat_config (struct test *test, int subtest)
 
int test__synthesize_stat (struct test *test, int subtest)
 
int test__synthesize_stat_round (struct test *test, int subtest)
 
int test__event_update (struct test *test, int subtest)
 
int test__event_times (struct test *test, int subtest)
 
int test__backward_ring_buffer (struct test *test, int subtest)
 
int test__cpu_map_print (struct test *test, int subtest)
 
int test__sdt_event (struct test *test, int subtest)
 
int test__is_printable_array (struct test *test, int subtest)
 
int test__bitmap_print (struct test *test, int subtest)
 
int test__perf_hooks (struct test *test, int subtest)
 
int test__clang (struct test *test, int subtest)
 
const char * test__clang_subtest_get_desc (int subtest)
 
int test__clang_subtest_get_nr (void)
 
int test__unit_number__scnprint (struct test *test, int subtest)
 
int test__mem2node (struct test *t, int subtest)
 
bool test__bp_signal_is_supported (void)
 

Macro Definition Documentation

◆ TEST_ASSERT_EQUAL

#define TEST_ASSERT_EQUAL (   text,
  val,
  expected 
)
Value:
do { \
if (val != expected) { \
pr_debug("FAILED %s:%d %s (%d != %d)\n", \
__FILE__, __LINE__, text, val, expected); \
return -1; \
} \
} while (0)

Definition at line 15 of file tests.h.

◆ TEST_ASSERT_VAL

#define TEST_ASSERT_VAL (   text,
  cond 
)
Value:
do { \
if (!(cond)) { \
pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
return -1; \
} \
} while (0)

Definition at line 7 of file tests.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TEST_OK 
TEST_FAIL 
TEST_SKIP 

Definition at line 24 of file tests.h.

Function Documentation

◆ test__attr()

int test__attr ( struct test test,
int  subtest 
)

◆ test__backward_ring_buffer()

int test__backward_ring_buffer ( struct test test,
int  subtest 
)

◆ test__basic_mmap()

int test__basic_mmap ( struct test test,
int  subtest 
)

◆ test__bitmap_print()

int test__bitmap_print ( struct test test,
int  subtest 
)

◆ test__bp_accounting()

int test__bp_accounting ( struct test test,
int  subtest 
)

◆ test__bp_signal()

int test__bp_signal ( struct test test,
int  subtest 
)

◆ test__bp_signal_is_supported()

bool test__bp_signal_is_supported ( void  )

Definition at line 292 of file bp_signal.c.

◆ test__bp_signal_overflow()

int test__bp_signal_overflow ( struct test test,
int  subtest 
)

◆ test__bpf()

int test__bpf ( struct test test,
int  subtest 
)

◆ test__bpf_subtest_get_desc()

const char* test__bpf_subtest_get_desc ( int  subtest)

◆ test__bpf_subtest_get_nr()

int test__bpf_subtest_get_nr ( void  )

Definition at line 346 of file bpf.c.

◆ test__clang()

int test__clang ( struct test test,
int  subtest 
)

◆ test__clang_subtest_get_desc()

const char* test__clang_subtest_get_desc ( int  subtest)

Definition at line 29 of file clang.c.

◆ test__clang_subtest_get_nr()

int test__clang_subtest_get_nr ( void  )

Definition at line 24 of file clang.c.

◆ test__code_reading()

int test__code_reading ( struct test test,
int  subtest 
)

◆ test__cpu_map_print()

int test__cpu_map_print ( struct test test,
int  subtest 
)

◆ test__cpu_map_synthesize()

int test__cpu_map_synthesize ( struct test test,
int  subtest 
)

◆ test__dso_data()

int test__dso_data ( struct test test,
int  subtest 
)

◆ test__dso_data_cache()

int test__dso_data_cache ( struct test test,
int  subtest 
)

◆ test__dso_data_reopen()

int test__dso_data_reopen ( struct test test,
int  subtest 
)

◆ test__dwarf_unwind()

int test__dwarf_unwind ( struct test test,
int  subtest 
)

◆ test__event_times()

int test__event_times ( struct test test,
int  subtest 
)

◆ test__event_update()

int test__event_update ( struct test test,
int  subtest 
)

◆ test__expr()

int test__expr ( struct test test,
int  subtest 
)

◆ test__fdarray__add()

int test__fdarray__add ( struct test test,
int  subtest 
)

◆ test__fdarray__filter()

int test__fdarray__filter ( struct test test,
int  subtest 
)

◆ test__hists_cumulate()

int test__hists_cumulate ( struct test test,
int  subtest 
)

◆ test__hists_filter()

int test__hists_filter ( struct test test,
int  subtest 
)

◆ test__hists_link()

int test__hists_link ( struct test test,
int  subtest 
)

◆ test__hists_output()

int test__hists_output ( struct test test,
int  subtest 
)

◆ test__is_printable_array()

int test__is_printable_array ( struct test test,
int  subtest 
)

◆ test__keep_tracking()

int test__keep_tracking ( struct test test,
int  subtest 
)

◆ test__kmod_path__parse()

int test__kmod_path__parse ( struct test test,
int  subtest 
)

◆ test__llvm()

int test__llvm ( struct test test,
int  subtest 
)

◆ test__llvm_subtest_get_desc()

const char* test__llvm_subtest_get_desc ( int  subtest)

Definition at line 166 of file llvm.c.

◆ test__llvm_subtest_get_nr()

int test__llvm_subtest_get_nr ( void  )

Definition at line 161 of file llvm.c.

◆ test__mem()

int test__mem ( struct test test,
int  subtest 
)

◆ test__mem2node()

int test__mem2node ( struct test t,
int  subtest 
)

◆ test__mmap_thread_lookup()

int test__mmap_thread_lookup ( struct test test,
int  subtest 
)

◆ test__openat_syscall_event()

int test__openat_syscall_event ( struct test test,
int  subtest 
)

◆ test__openat_syscall_event_on_all_cpus()

int test__openat_syscall_event_on_all_cpus ( struct test test,
int  subtest 
)

◆ test__parse_events()

int test__parse_events ( struct test test,
int  subtest 
)

◆ test__parse_no_sample_id_all()

int test__parse_no_sample_id_all ( struct test test,
int  subtest 
)

◆ test__perf_evsel__roundtrip_name_test()

int test__perf_evsel__roundtrip_name_test ( struct test test,
int  subtest 
)

◆ test__perf_evsel__tp_sched_test()

int test__perf_evsel__tp_sched_test ( struct test test,
int  subtest 
)

◆ test__perf_hooks()

int test__perf_hooks ( struct test test,
int  subtest 
)

◆ test__PERF_RECORD()

int test__PERF_RECORD ( struct test test,
int  subtest 
)

◆ test__pmu()

int test__pmu ( struct test test,
int  subtest 
)

◆ test__python_use()

int test__python_use ( struct test test,
int  subtest 
)

◆ test__sample_parsing()

int test__sample_parsing ( struct test test,
int  subtest 
)

◆ test__sdt_event()

int test__sdt_event ( struct test test,
int  subtest 
)

◆ test__session_topology()

int test__session_topology ( struct test test,
int  subtest 
)

◆ test__sw_clock_freq()

int test__sw_clock_freq ( struct test test,
int  subtest 
)

◆ test__switch_tracking()

int test__switch_tracking ( struct test test,
int  subtest 
)

◆ test__synthesize_stat()

int test__synthesize_stat ( struct test test,
int  subtest 
)

◆ test__synthesize_stat_config()

int test__synthesize_stat_config ( struct test test,
int  subtest 
)

◆ test__synthesize_stat_round()

int test__synthesize_stat_round ( struct test test,
int  subtest 
)

◆ test__syscall_openat_tp_fields()

int test__syscall_openat_tp_fields ( struct test test,
int  subtest 
)

◆ test__task_exit()

int test__task_exit ( struct test test,
int  subtest 
)

◆ test__thread_map()

int test__thread_map ( struct test test,
int  subtest 
)

◆ test__thread_map_remove()

int test__thread_map_remove ( struct test test,
int  subtest 
)

◆ test__thread_map_synthesize()

int test__thread_map_synthesize ( struct test test,
int  subtest 
)

◆ test__thread_mg_share()

int test__thread_mg_share ( struct test test,
int  subtest 
)

◆ test__unit_number__scnprint()

int test__unit_number__scnprint ( struct test test,
int  subtest 
)

◆ test__vmlinux_matches_kallsyms()

int test__vmlinux_matches_kallsyms ( struct test test,
int  subtest 
)