lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1467339831-171169-2-git-send-email-wangnan0@huawei.com>
Date:	Fri, 1 Jul 2016 02:23:44 +0000
From:	Wang Nan <wangnan0@...wei.com>
To:	<acme@...nel.org>, <jolsa@...hat.com>
CC:	<linux-kernel@...r.kernel.org>, <pi3orama@....com>,
	<lizefan@...wei.com>, Arnaldo Carvalho de Melo <acme@...hat.com>,
	Wang Nan <wangnan0@...wei.com>
Subject: [PATCH v12 1/8] perf tests: Skip backward ring buffer on old kernel

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

'perf test backward' FAILED on old kernel:

 [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 ~]#

Reason: when kernel doesn't support 'attr.backward', perf_evsel__open() will
trim this bit and try again, unless evsel->overwrite is true.

Set evsel->overwrite in this test.

Signed-off-by: Wang Nan <wangnan0@...wei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/tests/backward-ring-buffer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c
index e70313f..0731b0b 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) {
-- 
1.8.3.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ