Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame^] | 1 | From a7783676c60dd90a6f4c26bcb9be03dc5703b74e Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 13 Apr 2020 11:25:32 -0700 |
| 4 | Subject: [PATCH 1/2] Revert "selftests/bpf: Skip perf hw events test if the |
| 5 | setup disabled it" |
| 6 | |
| 7 | This reverts commit da43712a7262891317883d4b3a909fb18dac4b1d. |
| 8 | --- |
| 9 | .../selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 ++------ |
| 10 | 1 file changed, 2 insertions(+), 6 deletions(-) |
| 11 | |
| 12 | diff --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 |
| 13 | index 1735faf17536..f62aa0eb959b 100644 |
| 14 | --- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c |
| 15 | +++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c |
| 16 | @@ -49,12 +49,8 @@ void test_stacktrace_build_id_nmi(void) |
| 17 | pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, |
| 18 | 0 /* cpu 0 */, -1 /* group id */, |
| 19 | 0 /* flags */); |
| 20 | - if (pmu_fd < 0 && errno == ENOENT) { |
| 21 | - printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__); |
| 22 | - test__skip(); |
| 23 | - goto cleanup; |
| 24 | - } |
| 25 | - if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n", |
| 26 | + if (CHECK(pmu_fd < 0, "perf_event_open", |
| 27 | + "err %d errno %d. Does the test host support PERF_COUNT_HW_CPU_CYCLES?\n", |
| 28 | pmu_fd, errno)) |
| 29 | goto close_prog; |
| 30 | |
| 31 | -- |
| 32 | 2.26.0 |
| 33 | |