blob: 66efde13869b97e81bb79d6bd058c1d21f9c288e [file] [log] [blame]
Andrew Geissler4fc9e432020-06-27 00:13:56 -05001From 754e3030788702c1f013a88a4fc8546742d84e27 Mon Sep 17 00:00:00 2001
Andrew Geissler062316f2020-05-15 14:19:14 -05002From: Khem Raj <raj.khem@gmail.com>
Andrew Geissler4fc9e432020-06-27 00:13:56 -05003Date: Thu, 18 Jun 2020 13:45:04 -0700
4Subject: [PATCH] Revert "selftests/bpf: Skip perf hw events test if the setup
5 disabled it"
Andrew Geissler062316f2020-05-15 14:19:14 -05006
7This reverts commit da43712a7262891317883d4b3a909fb18dac4b1d.
Andrew Geissler4fc9e432020-06-27 00:13:56 -05008
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
Andrew Geissler062316f2020-05-15 14:19:14 -050010---
11 .../selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 ++------
12 1 file changed, 2 insertions(+), 6 deletions(-)
13
14diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
Andrew Geissler4fc9e432020-06-27 00:13:56 -050015index 437cb93e72ac..f62aa0eb959b 100644
Andrew Geissler062316f2020-05-15 14:19:14 -050016--- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
17+++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
18@@ -49,12 +49,8 @@ void test_stacktrace_build_id_nmi(void)
19 pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */,
20 0 /* cpu 0 */, -1 /* group id */,
21 0 /* flags */);
22- if (pmu_fd < 0 && errno == ENOENT) {
23- printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__);
24- test__skip();
Andrew Geissler4fc9e432020-06-27 00:13:56 -050025- goto close_prog;
Andrew Geissler062316f2020-05-15 14:19:14 -050026- }
27- if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n",
28+ if (CHECK(pmu_fd < 0, "perf_event_open",
29+ "err %d errno %d. Does the test host support PERF_COUNT_HW_CPU_CYCLES?\n",
30 pmu_fd, errno))
31 goto close_prog;
32
33--
Andrew Geissler4fc9e432020-06-27 00:13:56 -0500342.27.0
Andrew Geissler062316f2020-05-15 14:19:14 -050035