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


Groups > linux.kernel > #1239817

[PATCH 6/9] perf tests: Add parsing test for 'P' modifier

From Jiri Olsa <jolsa@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 6/9] perf tests: Add parsing test for 'P' modifier
Date 2015-10-05 20:10 +0200
Message-ID <qgin0-6vn-25@gated-at.bofh.it> (permalink)
References <qgimZ-6vn-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


We cant test 'P' modifier gets properly parsed, the functionality
test itself is beyond this suite.

Link: http://lkml.kernel.org/n/tip-pa4pmc6mnakmyss5ca2c9yo5@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/parse-events.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 3a2ebe666192..0648b84a9171 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1259,6 +1259,17 @@ test__checkevent_breakpoint_len_rw_modifier(struct perf_evlist *evlist)
 	return test__checkevent_breakpoint_rw(evlist);
 }
 
+static int test__checkevent_precise_max_modifier(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel = perf_evlist__first(evlist);
+
+	TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config",
+			PERF_COUNT_SW_TASK_CLOCK == evsel->attr.config);
+	return 0;
+}
+
 static int count_tracepoints(void)
 {
 	struct dirent *events_ent;
@@ -1562,6 +1573,11 @@ static struct evlist_test test__events[] = {
 		.check = test__checkevent_exclude_idle_modifier_1,
 		.id    = 46,
 	},
+	{
+		.name  = "task-clock:P,cycles",
+		.check = test__checkevent_precise_max_modifier,
+		.id    = 47,
+	},
 };
 
 static struct evlist_test test__events_pmu[] = {
-- 
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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] perf tools: Various fixes Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
  [PATCH 6/9] perf tests: Add parsing test for 'P' modifier Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    [tip:perf/core] perf tests: Add parsing test for 'P' modifier tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-06 09:20 +0200
  [PATCH 1/9] tools lib api fs: Do not use PATH_MAX + 1 Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    [tip:perf/core] tools lib api fs: No need to use PATH_MAX + 1 tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-06 09:20 +0200
  [PATCH 5/9] perf tools: Introduce 'P' modifier Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    Re: [PATCH 5/9] perf tools: Introduce 'P' modifier David Ahern <dsahern@gmail.com> - 2015-10-05 20:20 +0200
      Re: [PATCH 5/9] perf tools: Introduce 'P' modifier Jiri Olsa <jolsa@redhat.com> - 2015-10-05 20:40 +0200
        Re: [PATCH 5/9] perf tools: Introduce 'P' modifier Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-05 21:10 +0200
    Re: [PATCH 5/9] perf tools: Introduce 'P' modifier Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-05 21:30 +0200
      Re: [PATCH 5/9] perf tools: Introduce 'P' modifier Jiri Olsa <jolsa@redhat.com> - 2015-10-06 09:10 +0200
    [tip:perf/core] perf tools: Introduce 'P'   modifier to request max precision tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-06 09:20 +0200
  [PATCH 7/9] perf tools: Add support for sorting on the iaddr Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    [tip:perf/core] perf tools: Add support for sorting on the iaddr tip-bot for Don Zickus <tipbot@zytor.com> - 2015-10-06 09:20 +0200
  [PATCH 8/9] perf tools: Setup proper width for symbol_iaddr field Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    [tip:perf/core] perf tools:   Setup proper width for symbol_iaddr field tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-06 09:20 +0200
  [PATCH 2/9] perf evlist: Display DATA_SRC sample type bit Jiri Olsa <jolsa@kernel.org> - 2015-10-05 20:10 +0200
    [tip:perf/core] perf evlist: Display DATA_SRC sample type bit tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-10-06 09:20 +0200

csiph-web