mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
1b85337d06
The extensible file description array that grew in the perf_evlist class can be useful for other tools, as it is not something that only evlists need, so move it to tools/lib/api/fd to ease sharing it. v2: Don't use {} like in: libapi_dirs: $(QUIET_MKDIR)mkdir -p $(OUTPUT){fs,fd}/ in Makefiles, as it will not work in some systems, as in ubuntu13.10. v3: Add fd/*.[ch] to LIBAPIKFS_SOURCES (Fix from Jiri Olsa) v4: Leave the fcntl(fd, O_NONBLOCK) in the evlist layer, remains to be checked if it is really needed there, but has no place in the fdarray class (Fix from Jiri Olsa) v5: Remove evlist details from fdarray grow/filter tests. Improve it a bit doing more tests about expected internal state. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-kleuni3hckbc3s0lu6yb9x40@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
64 lines
1.7 KiB
C
64 lines
1.7 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)
|
|
|
|
enum {
|
|
TEST_OK = 0,
|
|
TEST_FAIL = -1,
|
|
TEST_SKIP = -2,
|
|
};
|
|
|
|
/* Tests */
|
|
int test__vmlinux_matches_kallsyms(void);
|
|
int test__open_syscall_event(void);
|
|
int test__open_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_open_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);
|
|
|
|
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
|
|
#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 */
|