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

From: Jiri Olsa
Date: Thu Dec 03 2015 - 03:35:55 EST


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@xxxxxxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/