perf test: Add 'struct test *' to the test functions
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 81f17c90f14122123cc52d1609f567834e56b122 Gitweb: http://git.kernel.org/tip/81f17c90f14122123cc52d1609f567834e56b122 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 3 Aug 2017 15:16:31 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 11 Aug 2017 10:42:53 -0300
perf test: Add 'struct test *' to the test functions
This way we'll be able to pass more test specific parameters without having to change this function signature.
Will be used by the upcoming 'shell tests', shell scripts that will call perf tools and check if they work as expected, comparing its effects on the system (think 'perf probe foo') the output produced, etc.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Michael Petlan <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Thomas Richter <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/x86/include/arch-tests.h | 11 ++- tools/perf/arch/x86/tests/insn-x86.c | 2 +- tools/perf/arch/x86/tests/intel-cqm.c | 2 +- tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 +- tools/perf/arch/x86/tests/rdpmc.c | 2 +- tools/perf/tests/attr.c | 2 +- tools/perf/tests/backward-ring-buffer.c | 2 +- tools/perf/tests/bitmap.c | 2 +- tools/perf/tests/bp_signal.c | 2 +- tools/perf/tests/bp_signal_overflow.c | 2 +- tools/perf/tests/bpf.c | 4 +- tools/perf/tests/builtin-test.c | 4 +- tools/perf/tests/clang.c | 4 +- tools/perf/tests/code-reading.c | 2 +- tools/perf/tests/cpumap.c | 4 +- tools/perf/tests/dso-data.c | 6 +- tools/perf/tests/dwarf-unwind.c | 2 +- tools/perf/tests/event-times.c | 2 +- tools/perf/tests/event_update.c | 2 +- tools/perf/tests/evsel-roundtrip-name.c | 2 +- tools/perf/tests/evsel-tp-sched.c | 2 +- tools/perf/tests/expr.c | 2 +- tools/perf/tests/fdarray.c | 4 +- tools/perf/tests/hists_cumulate.c | 2 +- tools/perf/tests/hists_filter.c | 2 +- tools/perf/tests/hists_link.c | 2 +- tools/perf/tests/hists_output.c | 2 +- tools/perf/tests/is_printable_array.c | 2 +- tools/perf/tests/keep-tracking.c | 2 +- tools/perf/tests/kmod-path.c | 2 +- tools/perf/tests/llvm.c | 2 +- tools/perf/tests/mmap-basic.c | 2 +- tools/perf/tests/mmap-thread-lookup.c | 2 +- tools/perf/tests/openat-syscall-all-cpus.c | 2 +- tools/perf/tests/openat-syscall-tp-fields.c | 2 +- tools/perf/tests/openat-syscall.c | 2 +- tools/perf/tests/parse-events.c | 2 +- tools/perf/tests/parse-no-sample-id-all.c | 2 +- tools/perf/tests/perf-hooks.c | 2 +- tools/perf/tests/perf-record.c | 2 +- tools/perf/tests/pmu.c | 2 +- tools/perf/tests/python-use.c | 2 +- tools/perf/tests/sample-parsing.c | 2 +- tools/perf/tests/sdt.c | 4 +- tools/perf/tests/stat.c | 6 +- tools/perf/tests/sw-clock.c | 2 +- tools/perf/tests/switch-tracking.c | 2 +- tools/perf/tests/task-exit.c | 2 +- tools/perf/tests/tests.h | 112 +++++++++++++-------------- tools/perf/tests/thread-map.c | 6 +- tools/perf/tests/thread-mg-share.c | 2 +- tools/perf/tests/topology.c | 2 +- tools/perf/tests/unit_number__scnprintf.c | 2 +- tools/perf/tests/vmlinux-kallsyms.c | 2 +- 54 files changed, 127 insertions(+), 124 deletions(-)
tools/perf/arch/x86/include/arch-tests.h +7 -4
@@ -1,11 +1,14 @@#ifndef ARCH_TESTS_H #define ARCH_TESTS_H +#include <linux/compiler.h> +struct test ; +/* Tests */ -int test__rdpmc (int subtest); -int test__perf_time_to_tsc (int subtest); -int test__insn_x86 (int subtest); -int test__intel_cqm_count_nmi_context (int subtest); +int test__rdpmc (struct test *test__maybe_unused ,int subtest); +int test__perf_time_to_tsc (struct test *test__maybe_unused ,int subtest); +int test__insn_x86 (struct test *test__maybe_unused ,int subtest); +int test__intel_cqm_count_nmi_context (struct test *test__maybe_unused ,int subtest);#ifdef HAVE_DWARF_UNWIND_SUPPORT struct thread ;
tools/perf/arch/x86/tests/insn-x86.c +1 -1
@@ -171,7 +171,7 @@ static int test_data_set(struct test_data *dat_set, int x86_64)* verbose (-v) option to see all the instructions and whether or not they * decoded successfuly. */ -int test__insn_x86 (int subtest__maybe_unused ) +int test__insn_x86 (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int ret =0 ;
tools/perf/arch/x86/tests/intel-cqm.c +1 -1
@@ -36,7 +36,7 @@ static pid_t spawn(void)* the last read counter value to avoid triggering a WARN_ON_ONCE() in * smp_call_function_many() caused by sending IPIs from NMI context. */ -int test__intel_cqm_count_nmi_context (int subtest__maybe_unused ) +int test__intel_cqm_count_nmi_context (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_evlist *evlist =NULL ;struct perf_evsel *evsel =NULL ;
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -1
@@ -37,7 +37,7 @@* %0 is returned, otherwise %-1 is returned. If TSC conversion is not * supported then then the test passes but " (not supported)" is printed. */ -int test__perf_time_to_tsc (int subtest__maybe_unused ) +int test__perf_time_to_tsc (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct record_opts opts = { .mmap_pages =UINT_MAX ,
tools/perf/arch/x86/tests/rdpmc.c +1 -1
@@ -154,7 +154,7 @@ out_close:return 0 ; } -int test__rdpmc (int subtest__maybe_unused ) +int test__rdpmc (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int status =0 ;int wret =0 ;
tools/perf/tests/attr.c +1 -1
@@ -169,7 +169,7 @@ static int run_dir(const char *d, const char *perf)return system (cmd); } -int test__attr (int subtest__maybe_unused ) +int test__attr (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct stat st;char path_perf[PATH_MAX ];
tools/perf/tests/backward-ring-buffer.c +1 -1
@@ -75,7 +75,7 @@ static int do_test(struct perf_evlist *evlist, int mmap_pages, } -int test__backward_ring_buffer (int subtest__maybe_unused ) +int test__backward_ring_buffer (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int ret =TEST_SKIP , err, sample_count =0 , comm_count =0 ;char pid[16 ], sbuf[STRERR_BUFSIZE ];
tools/perf/tests/bitmap.c +1 -1
@@ -40,7 +40,7 @@ static int test_bitmap(const char *str)return ret; } -int test__bitmap_print (int subtest__maybe_unused ) +int test__bitmap_print (struct test *test__maybe_unused ,int subtest__maybe_unused ) {TEST_ASSERT_VAL ("failed to convert map" ,test_bitmap ("1" ));TEST_ASSERT_VAL ("failed to convert map" ,test_bitmap ("1,5" ));
tools/perf/tests/bp_signal.c +1 -1
@@ -164,7 +164,7 @@ static long long bp_count(int fd)return count; } -int test__bp_signal (int subtest__maybe_unused ) +int test__bp_signal (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct sigaction sa;long long count1, count2, count3;
tools/perf/tests/bp_signal_overflow.c +1 -1
@@ -57,7 +57,7 @@ static long long bp_count(int fd)#define EXECUTIONS 10000#define THRESHOLD 100 -int test__bp_signal_overflow (int subtest__maybe_unused ) +int test__bp_signal_overflow (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_event_attr pe;struct sigaction sa;
tools/perf/tests/bpf.c +2 -2
@@ -321,7 +321,7 @@ static int check_env(void)return 0 ; } -int test__bpf (int i) +int test__bpf (struct test *test__maybe_unused ,int i) {int err;
@@ -351,7 +351,7 @@ const char *test__bpf_subtest_get_desc(int i __maybe_unused)return NULL ; } -int test__bpf (int i__maybe_unused ) +int test__bpf (struct test *test__maybe_unused ,int i__maybe_unused ) {pr_debug ("Skip BPF test because BPF support is not compiled\n" );return TEST_SKIP ;
tools/perf/tests/builtin-test.c +2 -2
@@ -179,7 +179,7 @@ static struct test generic_tests[] = { }, { .desc = "Session topology", - .func = test_session_topology, + .func = test__session_topology, }, { .desc = "BPF filter",
@@ -325,7 +325,7 @@ static int run_test(struct test *test, int subtest) } } - err = test->func (subtest); + err = test->func (test, subtest);if (!dont_fork)exit (err); }
tools/perf/tests/clang.c +2 -2
@@ -33,12 +33,12 @@ const char *test__clang_subtest_get_desc(int i) }#ifndef HAVE_LIBCLANGLLVM_SUPPORT -int test__clang (int i__maybe_unused ) +int test__clang (struct test *test__maybe_unused ,int i__maybe_unused ) {return TEST_SKIP ; }#else -int test__clang (int i) +int test__clang (struct test *test__maybe_unused ,int i) {if (i <0 || i >= (int )ARRAY_SIZE (clang_testcase_table))return TEST_FAIL ;
tools/perf/tests/code-reading.c +1 -1
@@ -673,7 +673,7 @@ out_err:return err; } -int test__code_reading (int subtest__maybe_unused ) +int test__code_reading (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int ret;
tools/perf/tests/cpumap.c +2 -2
@@ -72,7 +72,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, } -int test__cpu_map_synthesize (int subtest__maybe_unused ) +int test__cpu_map_synthesize (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct cpu_map *cpus;
@@ -106,7 +106,7 @@ static int cpu_map_print(const char *str)return !strcmp (buf, str); } -int test__cpu_map_print (int subtest__maybe_unused ) +int test__cpu_map_print (struct test *test__maybe_unused ,int subtest__maybe_unused ) {TEST_ASSERT_VAL ("failed to convert map" ,cpu_map_print ("1" ));TEST_ASSERT_VAL ("failed to convert map" ,cpu_map_print ("1,5" ));
tools/perf/tests/dso-data.c +3 -3
@@ -112,7 +112,7 @@ static int dso__data_fd(struct dso *dso, struct machine *machine)return fd; } -int test__dso_data (int subtest__maybe_unused ) +int test__dso_data (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct machine machine;struct dso *dso;
@@ -247,7 +247,7 @@ static int set_fd_limit(int n)return setrlimit (RLIMIT_NOFILE , &rlim); } -int test__dso_data_cache (int subtest__maybe_unused ) +int test__dso_data_cache (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct machine machine;long nr_end, nr =open_files_cnt ();
@@ -307,7 +307,7 @@ int test__dso_data_cache(int subtest __maybe_unused)return 0 ; } -int test__dso_data_reopen (int subtest__maybe_unused ) +int test__dso_data_reopen (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct machine machine;long nr_end, nr =open_files_cnt ();
tools/perf/tests/dwarf-unwind.c +1 -1
@@ -154,7 +154,7 @@ static noinline int krava_1(struct thread *thread)return krava_2 (thread); } -int test__dwarf_unwind (int subtest__maybe_unused ) +int test__dwarf_unwind (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct machine *machine;struct thread *thread;
tools/perf/tests/event-times.c +1 -1
@@ -213,7 +213,7 @@ out_err:* and checks that enabled and running times * match. */ -int test__event_times (int subtest__maybe_unused ) +int test__event_times (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err, ret =0 ;
tools/perf/tests/event_update.c +1 -1
@@ -76,7 +76,7 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused,return 0 ; } -int test__event_update (int subtest__maybe_unused ) +int test__event_update (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_evlist *evlist;struct perf_evsel *evsel;
tools/perf/tests/evsel-roundtrip-name.c +1 -1
@@ -97,7 +97,7 @@ out_delete_evlist:#define perf_evsel__name_array_test (names) \ __perf_evsel__name_array_test(names, ARRAY_SIZE(names)) -int test__perf_evsel__roundtrip_name_test (int subtest__maybe_unused ) +int test__perf_evsel__roundtrip_name_test (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =0 , ret =0 ;
tools/perf/tests/evsel-tp-sched.c +1 -1
@@ -32,7 +32,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,return ret; } -int test__perf_evsel__tp_sched_test (int subtest__maybe_unused ) +int test__perf_evsel__tp_sched_test (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_evsel *evsel =perf_evsel__newtp ("sched" ,"sched_switch" );int ret =0 ;
tools/perf/tests/expr.c +1 -1
@@ -13,7 +13,7 @@ static int test(struct parse_ctx *ctx, const char *e, double val2)return 0 ; } -int test__expr (int subtest__maybe_unused ) +int test__expr (struct test *t__maybe_unused ,int subtest__maybe_unused ) {const char *p;const char **other;
tools/perf/tests/fdarray.c +2 -2
@@ -26,7 +26,7 @@ static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILEreturn printed +fdarray__fprintf (fda, fp); } -int test__fdarray__filter (int subtest__maybe_unused ) +int test__fdarray__filter (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int nr_fds, expected_fd[2 ], fd, err =TEST_FAIL ;struct fdarray *fda =fdarray__new (5 ,5 );
@@ -104,7 +104,7 @@ out:return err; } -int test__fdarray__add (int subtest__maybe_unused ) +int test__fdarray__add (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =TEST_FAIL ;struct fdarray *fda =fdarray__new (2 ,2 );
tools/perf/tests/hists_cumulate.c +1 -1
@@ -687,7 +687,7 @@ out:return err; } -int test__hists_cumulate (int subtest__maybe_unused ) +int test__hists_cumulate (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =TEST_FAIL ;struct machines machines;
tools/perf/tests/hists_filter.c +1 -1
@@ -101,7 +101,7 @@ out:return TEST_FAIL ; } -int test__hists_filter (int subtest__maybe_unused ) +int test__hists_filter (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =TEST_FAIL ;struct machines machines;
tools/perf/tests/hists_link.c +1 -1
@@ -264,7 +264,7 @@ static int validate_link(struct hists *leader, struct hists *other)return __validate_link (leader,0 ) ||__validate_link (other,1 ); } -int test__hists_link (int subtest__maybe_unused ) +int test__hists_link (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 ;struct hists *hists, *first_hists;
tools/perf/tests/hists_output.c +1 -1
@@ -573,7 +573,7 @@ out:return err; } -int test__hists_output (int subtest__maybe_unused ) +int test__hists_output (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =TEST_FAIL ;struct machines machines;
tools/perf/tests/is_printable_array.c +1 -1
@@ -4,7 +4,7 @@#include "debug.h" #include "print_binary.h" -int test__is_printable_array (int subtest__maybe_unused ) +int test__is_printable_array (struct test *test__maybe_unused ,int subtest__maybe_unused ) {char buf1[] = {'k' ,'r' ,4 ,'v' ,'a' ,0 };char buf2[] = {'k' ,'r' ,'a' ,'v' ,4 ,0 };
tools/perf/tests/keep-tracking.c +1 -1
@@ -49,7 +49,7 @@ static int find_comm(struct perf_evlist *evlist, const char *comm)* when an event is disabled but a dummy software event is not disabled. If the * test passes %0 is returned, otherwise %-1 is returned. */ -int test__keep_tracking (int subtest__maybe_unused ) +int test__keep_tracking (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct record_opts opts = { .mmap_pages =UINT_MAX ,
tools/perf/tests/kmod-path.c +1 -1
@@ -50,7 +50,7 @@ static int test_is_kernel_module(const char *path, int cpumode, bool expect)#define M (path, c, e) \ TEST_ASSERT_VAL("failed", !test_is_kernel_module(path, c, e)) -int test__kmod_path__parse (int subtest__maybe_unused ) +int test__kmod_path__parse (struct test *t__maybe_unused ,int subtest__maybe_unused ) {/* path alloc_name alloc_ext kmod comp name ext */ T ("/xxxx/xxxx/x-x.ko" , true , true , true, false,"[x_x]" ,NULL );
tools/perf/tests/llvm.c +1 -1
@@ -132,7 +132,7 @@ out:return ret; } -int test__llvm (int subtest) +int test__llvm (struct test *test__maybe_unused ,int subtest) {int ret;void *obj_buf =NULL ;
tools/perf/tests/mmap-basic.c +1 -1
@@ -22,7 +22,7 @@* Then it checks if the number of syscalls reported as perf events by * the kernel corresponds to the number of syscalls made. */ -int test__basic_mmap (int subtest__maybe_unused ) +int test__basic_mmap (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 ;union perf_event *event;
tools/perf/tests/mmap-thread-lookup.c +1 -1
@@ -221,7 +221,7 @@ static int mmap_events(synth_cb synth)* * by using all thread objects. */ -int test__mmap_thread_lookup (int subtest__maybe_unused ) +int test__mmap_thread_lookup (struct test *test__maybe_unused ,int subtest__maybe_unused ) {/* perf_event__synthesize_threads synthesize */ TEST_ASSERT_VAL("failed with sythesizing all",
tools/perf/tests/openat-syscall-all-cpus.c +1 -1
@@ -16,7 +16,7 @@#include "debug.h" #include "stat.h" -int test__openat_syscall_event_on_all_cpus (int subtest__maybe_unused ) +int test__openat_syscall_event_on_all_cpus (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 , fd, cpu;struct cpu_map *cpus;
tools/perf/tests/openat-syscall-tp-fields.c +1 -1
@@ -14,7 +14,7 @@#define AT_FDCWD -100#endif -int test__syscall_openat_tp_fields (int subtest__maybe_unused ) +int test__syscall_openat_tp_fields (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct record_opts opts = { .target = {
tools/perf/tests/openat-syscall.c +1 -1
@@ -10,7 +10,7 @@#include "debug.h" #include "tests.h" -int test__openat_syscall_event (int subtest__maybe_unused ) +int test__openat_syscall_event (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 , fd;struct perf_evsel *evsel;
tools/perf/tests/parse-events.c +1 -1
@@ -1810,7 +1810,7 @@ static int test_pmu_events(void)return ret; } -int test__parse_events (int subtest__maybe_unused ) +int test__parse_events (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int ret1, ret2 =0 ;
tools/perf/tests/parse-no-sample-id-all.c +1 -1
@@ -68,7 +68,7 @@ struct test_attr_event {* * Return: %0 on success, %-1 if the test fails. */ -int test__parse_no_sample_id_all (int subtest__maybe_unused ) +int test__parse_no_sample_id_all (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err;
tools/perf/tests/perf-hooks.c +1 -1
@@ -27,7 +27,7 @@ static void the_hook(void *_hook_flags) *p =0 ; } -int test__perf_hooks (int subtest__maybe_unused ) +int test__perf_hooks (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int hook_flags =0 ;
tools/perf/tests/perf-record.c +1 -1
@@ -37,7 +37,7 @@ realloc:return cpu; } -int test__PERF_RECORD (int subtest__maybe_unused ) +int test__PERF_RECORD (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct record_opts opts = { .target = {
tools/perf/tests/pmu.c +1 -1
@@ -135,7 +135,7 @@ static struct list_head *test_terms_list(void)return &terms; } -int test__pmu (int subtest__maybe_unused ) +int test__pmu (struct test *test__maybe_unused ,int subtest__maybe_unused ) {char *format =test_format_dir_get ();LIST_HEAD (formats);
tools/perf/tests/python-use.c +1 -1
@@ -9,7 +9,7 @@extern int verbose; -int test__python_use (int subtest__maybe_unused ) +int test__python_use (struct test *test__maybe_unused ,int subtest__maybe_unused ) {char *cmd;int ret;
tools/perf/tests/sample-parsing.c +1 -1
@@ -292,7 +292,7 @@ out_free:* checks sample format bits separately and together. If the test passes %0 is * returned, otherwise %-1 is returned. */ -int test__sample_parsing (int subtest__maybe_unused ) +int test__sample_parsing (struct test *test__maybe_unused ,int subtest__maybe_unused ) {const u64 rf[] = {4 ,5 ,6 ,7 ,12 ,13 ,14 ,15 };u64 sample_type;
tools/perf/tests/sdt.c +2 -2
@@ -71,7 +71,7 @@ static int search_cached_probe(const char *target,return ret; } -int test__sdt_event (int subtests__maybe_unused ) +int test__sdt_event (struct test *test__maybe_unused ,int subtests__maybe_unused ) {int ret =TEST_FAIL ;char __tempdir[] ="./test-buildid-XXXXXX" ;
@@ -109,7 +109,7 @@ error: return ret; }#else -int test__sdt_event (int subtests__maybe_unused ) +int test__sdt_event (struct test *test__maybe_unused ,int subtests__maybe_unused ) {pr_debug ("Skip SDT event test because SDT support is not compiled\n" );return TEST_SKIP ;
tools/perf/tests/stat.c +3 -3
@@ -45,7 +45,7 @@ static int process_stat_config_event(struct perf_tool *tool __maybe_unused,return 0 ; } -int test__synthesize_stat_config (int subtest__maybe_unused ) +int test__synthesize_stat_config (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_stat_config stat_config = { .aggr_mode =AGGR_CORE ,
@@ -75,7 +75,7 @@ static int process_stat_event(struct perf_tool *tool __maybe_unused,return 0 ; } -int test__synthesize_stat (int subtest__maybe_unused ) +int test__synthesize_stat (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct perf_counts_values count;
@@ -101,7 +101,7 @@ static int process_stat_round_event(struct perf_tool *tool __maybe_unused,return 0 ; } -int test__synthesize_stat_round(int subtest __maybe_unused) +int test__synthesize_stat_round(struct test *test __maybe_unused, int subtest __maybe_unused) { TEST_ASSERT_VAL("failed to synthesize stat_config", !perf_event__synthesize_stat_round(NULL, 0xdeadbeef, PERF_STAT_ROUND_TYPE__INTERVAL,
tools/perf/tests/sw-clock.c +1 -1
@@ -124,7 +124,7 @@ out_delete_evlist:return err; } -int test__sw_clock_freq (int subtest__maybe_unused ) +int test__sw_clock_freq (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int ret;
tools/perf/tests/switch-tracking.c +1 -1
@@ -306,7 +306,7 @@ out_free_nodes:* evsel->system_wide and evsel->tracking flags (respectively) with other events * sometimes enabled or disabled. */ -int test__switch_tracking (int subtest__maybe_unused ) +int test__switch_tracking (struct test *test__maybe_unused ,int subtest__maybe_unused ) {const char *sched_switch ="sched:sched_switch" ;struct switch_tracking switch_tracking = { .tids =NULL , };
tools/perf/tests/task-exit.c +1 -1
@@ -32,7 +32,7 @@ static void workload_exec_failed_signal(int signo __maybe_unused,* if the number of exit event reported by the kernel is 1 or not * in order to check the kernel returns correct number of event. */ -int test__task_exit (int subtest__maybe_unused ) +int test__task_exit (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 ;union perf_event *event;
tools/perf/tests/tests.h +56 -56
130 lines not on this page · raw message
tools/perf/tests/thread-map.c +3 -3
@@ -9,7 +9,7 @@#define NAME (const char *) "perf"#define NAMEUL (unsigned long) NAME -int test__thread_map (int subtest__maybe_unused ) +int test__thread_map (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct thread_map *map;
@@ -76,7 +76,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,return 0 ; } -int test__thread_map_synthesize (int subtest__maybe_unused ) +int test__thread_map_synthesize (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct thread_map *threads;
@@ -95,7 +95,7 @@ int test__thread_map_synthesize(int subtest __maybe_unused)return 0 ; } -int test__thread_map_remove (int subtest__maybe_unused ) +int test__thread_map_remove (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct thread_map *threads;char *str;
tools/perf/tests/thread-mg-share.c +1 -1
@@ -4,7 +4,7 @@#include "map.h" #include "debug.h" -int test__thread_mg_share (int subtest__maybe_unused ) +int test__thread_mg_share (struct test *test__maybe_unused ,int subtest__maybe_unused ) {struct machines machines;struct machine *machine;
tools/perf/tests/topology.c +1 -1
@@ -86,7 +86,7 @@ static int check_cpu_topology(char *path, struct cpu_map *map)return 0 ; } -int test_session_topology (int subtest__maybe_unused ) +int test__session_topology (struct test *test__maybe_unused ,int subtest__maybe_unused ) {char path[PATH_MAX ];struct cpu_map *map;
tools/perf/tests/unit_number__scnprintf.c +1 -1
@@ -5,7 +5,7 @@#include "units.h" #include "debug.h" -int test__unit_number__scnprint (int subtest__maybe_unused ) +int test__unit_number__scnprint (struct test *t__maybe_unused ,int subtest__maybe_unused ) {struct {u64 n;
tools/perf/tests/vmlinux-kallsyms.c +1 -1
@@ -11,7 +11,7 @@#define UM (x) kallsyms_map->unmap_ip(kallsyms_map, (x)) -int test__vmlinux_matches_kallsyms (int subtest__maybe_unused ) +int test__vmlinux_matches_kallsyms (struct test *test__maybe_unused ,int subtest__maybe_unused ) {int err =-1 ;struct rb_node *nd;