[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160630210052.GE5324@kernel.org>
Date: Thu, 30 Jun 2016 18:00:52 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Wang Nan <wangnan0@...wei.com>
Cc: He Kuang <hekuang@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: 'perf test backward' failing with older kernels, should Skip
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@...et ~]# 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@...et ~]#
Ok, so I think the patch below should do the trick, is that right? With it
I get:
[root@...et ~]# perf test backward
45: Test backward reading from ring buffer : Skip
[root@...et ~]#
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) {
Powered by blists - more mailing lists