linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 01/11] perf tests parse-events: Add intel_pt parse test
Date: Wed, 16 May 2018 11:48:58 -0300	[thread overview]
Message-ID: <20180516144908.22212-2-acme@kernel.org> (raw)
In-Reply-To: <20180516144908.22212-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

To avoid regressions such as the one fixed by 4a35a9027f64 ("Revert
"perf pmu: Fix pmu events parsing rule""), where '-e intel_pt//u' got
broken, with this new entry in this 'perf tests' subtest, we would have
caught it before pushing upstream.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-kw62fys9bwdgsp722so2ln1l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/parse-events.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 18b06444f230..6829dd416a99 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1309,6 +1309,14 @@ static int test__checkevent_config_cache(struct perf_evlist *evlist)
 	return 0;
 }
 
+static int test__intel_pt(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel = perf_evlist__first(evlist);
+
+	TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "intel_pt//u") == 0);
+	return 0;
+}
+
 static int count_tracepoints(void)
 {
 	struct dirent *events_ent;
@@ -1637,6 +1645,11 @@ static struct evlist_test test__events[] = {
 		.check = test__checkevent_config_cache,
 		.id    = 51,
 	},
+	{
+		.name  = "intel_pt//u",
+		.check = test__intel_pt,
+		.id    = 52,
+	},
 };
 
 static struct evlist_test test__events_pmu[] = {
-- 
2.14.3

  reply	other threads:[~2018-05-16 14:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 14:48 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2018-05-16 14:48 ` Arnaldo Carvalho de Melo [this message]
2018-05-16 21:33   ` [PATCH 01/11] perf tests parse-events: Add intel_pt parse test Kim Phillips
2018-05-17 20:15     ` Arnaldo Carvalho de Melo
2018-05-17 20:58       ` Jiri Olsa
2018-05-17 22:54         ` Kim Phillips
2018-05-18 14:13           ` Arnaldo Carvalho de Melo
2018-05-16 14:48 ` [PATCH 02/11] perf buildid-cache: Warn --purge-all failures Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 03/11] perf llvm-utils: Add bpf include path to clang command line Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 04/11] perf bpf: Add 'examples' directories Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 05/11] perf bpf: Add bpf.h to be used in eBPF proggies Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 06/11] perf bpf: Add kprobe example to catch 5s naps Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 07/11] perf bpf: Add license(NAME) helper Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 08/11] perf bpf: Add probe() helper to reduce kprobes boilerplate Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 09/11] perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 10/11] perf parse-events: Handle uncore event aliases in small groups properly Arnaldo Carvalho de Melo
2018-05-16 14:49 ` [PATCH 11/11] perf bpf: Fix NULL return handling in bpf__prepare_load() Arnaldo Carvalho de Melo
2018-05-16 15:58 ` [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180516144908.22212-2-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).