From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Wang Nan <wangnan0@huawei.com>
Cc: He Kuang <hekuang@huawei.com>, Jiri Olsa <jolsa@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: 'perf test backward' failing with older kernels, should Skip
Date: Thu, 30 Jun 2016 18:00:52 -0300 [thread overview]
Message-ID: <20160630210052.GE5324@kernel.org> (raw)
Hi Wang,
I booted a machine with the f24 distro kernel and the backward
ring buffer test started FAILing, when it should've noticed that the
kernel doesn't support it and Skip instead:
[root@jouet ~]# perf test -v backward
45: Test backward reading from ring buffer :
--- start ---
<SNIP>
mmap size 1052672B
Unexpected counter: sample_count=0, comm_count=0
---- end ----
Test backward reading from ring buffer: FAILED!
[root@jouet ~]#
Ok, so I think the patch below should do the trick, is that right? With it
I get:
[root@jouet ~]# perf test backward
45: Test backward reading from ring buffer : Skip
[root@jouet ~]#
diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c
index e70313fac5a5..0731b0bf9552 100644
--- a/tools/perf/tests/backward-ring-buffer.c
+++ b/tools/perf/tests/backward-ring-buffer.c
@@ -118,8 +118,10 @@ int test__backward_ring_buffer(int subtest __maybe_unused)
perf_evlist__config(evlist, &opts, NULL);
/* Set backward bit, ring buffer should be writing from end */
- evlist__for_each_entry(evlist, evsel)
+ evlist__for_each_entry(evlist, evsel) {
+ evsel->overwrite = true;
evsel->attr.write_backward = 1;
+ }
err = perf_evlist__open(evlist);
if (err < 0) {
next reply other threads:[~2016-06-30 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 21:00 Arnaldo Carvalho de Melo [this message]
2016-07-01 1:53 ` 'perf test backward' failing with older kernels, should Skip Wangnan (F)
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=20160630210052.GE5324@kernel.org \
--to=acme@kernel.org \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.