Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282786

[PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test

From Jiri Olsa <jolsa@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test
Date 2015-12-03 09:40 +0100
Message-ID <qBxAK-2vK-5@gated-at.bofh.it> (permalink)
References <qBxAK-2vK-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The bpf-output is added under software events, but is not
parse-able within parse_events, which is what round trip
test is expecting.

Checking software events only until dummy event.

Link: http://lkml.kernel.org/n/tip-oyz0zo99of6gd9axi5f99szm@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/evsel-roundtrip-name.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c
index 1da92e1159ee..97f3b7268a85 100644
--- a/tools/perf/tests/evsel-roundtrip-name.c
+++ b/tools/perf/tests/evsel-roundtrip-name.c
@@ -61,7 +61,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 	return ret;
 }
 
-static int __perf_evsel__name_array_test(const char *names[], int nr_names)
+static int perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
 	struct perf_evsel *evsel;
@@ -92,18 +92,17 @@ out_delete_evlist:
 	return err;
 }
 
-#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 err = 0, ret = 0;
 
-	err = perf_evsel__name_array_test(perf_evsel__hw_names);
+	err = perf_evsel__name_array_test(perf_evsel__hw_names,
+					  ARRAY_SIZE(perf_evsel__hw_names));
 	if (err)
 		ret = err;
 
-	err = perf_evsel__name_array_test(perf_evsel__sw_names);
+	err = perf_evsel__name_array_test(perf_evsel__sw_names,
+					  PERF_COUNT_SW_DUMMY + 1);
 	if (err)
 		ret = err;
 
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
  [tip:perf/core] perf test:   Prevent using bpf-output event in round trip name test tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-12-08 05:40 +0100

csiph-web