forked from Minki/linux
c84974ed9f
This patch test cpu core_id and socket_id which are stored in perf_env. Commiter note: # perf test topo 40: Test topology in session: Ok # perf test -v topo 40: Test topology in session: --- start --- test child forked, pid 31767 templ file: /tmp/perf-test-VTZ1PL CPU 0, core 0, socket 0 CPU 1, core 1, socket 0 CPU 2, core 0, socket 0 CPU 3, core 1, socket 0 test child finished with 0 ---- end ---- Test topology in session: Ok # Based-on-a-patch-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kan Liang <kan.liang@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/1441357111-64522-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
78 lines
2.1 KiB
C
78 lines
2.1 KiB
C
#ifndef TESTS_H
|
|
#define TESTS_H
|
|
|
|
#define TEST_ASSERT_VAL(text, cond) \
|
|
do { \
|
|
if (!(cond)) { \
|
|
pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
|
|
return -1; \
|
|
} \
|
|
} while (0)
|
|
|
|
#define TEST_ASSERT_EQUAL(text, val, expected) \
|
|
do { \
|
|
if (val != expected) { \
|
|
pr_debug("FAILED %s:%d %s (%d != %d)\n", \
|
|
__FILE__, __LINE__, text, val, expected); \
|
|
return -1; \
|
|
} \
|
|
} while (0)
|
|
|
|
enum {
|
|
TEST_OK = 0,
|
|
TEST_FAIL = -1,
|
|
TEST_SKIP = -2,
|
|
};
|
|
|
|
/* Tests */
|
|
int test__vmlinux_matches_kallsyms(void);
|
|
int test__openat_syscall_event(void);
|
|
int test__openat_syscall_event_on_all_cpus(void);
|
|
int test__basic_mmap(void);
|
|
int test__PERF_RECORD(void);
|
|
int test__rdpmc(void);
|
|
int test__perf_evsel__roundtrip_name_test(void);
|
|
int test__perf_evsel__tp_sched_test(void);
|
|
int test__syscall_openat_tp_fields(void);
|
|
int test__pmu(void);
|
|
int test__attr(void);
|
|
int test__dso_data(void);
|
|
int test__dso_data_cache(void);
|
|
int test__dso_data_reopen(void);
|
|
int test__parse_events(void);
|
|
int test__hists_link(void);
|
|
int test__python_use(void);
|
|
int test__bp_signal(void);
|
|
int test__bp_signal_overflow(void);
|
|
int test__task_exit(void);
|
|
int test__sw_clock_freq(void);
|
|
int test__perf_time_to_tsc(void);
|
|
int test__code_reading(void);
|
|
int test__sample_parsing(void);
|
|
int test__keep_tracking(void);
|
|
int test__parse_no_sample_id_all(void);
|
|
int test__dwarf_unwind(void);
|
|
int test__hists_filter(void);
|
|
int test__mmap_thread_lookup(void);
|
|
int test__thread_mg_share(void);
|
|
int test__hists_output(void);
|
|
int test__hists_cumulate(void);
|
|
int test__switch_tracking(void);
|
|
int test__fdarray__filter(void);
|
|
int test__fdarray__add(void);
|
|
int test__kmod_path__parse(void);
|
|
int test__thread_map(void);
|
|
int test__llvm(void);
|
|
int test__insn_x86(void);
|
|
int test_session_topology(void);
|
|
|
|
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
|
|
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
|
struct thread;
|
|
struct perf_sample;
|
|
int test__arch_unwind_sample(struct perf_sample *sample,
|
|
struct thread *thread);
|
|
#endif
|
|
#endif
|
|
#endif /* TESTS_H */
|