diff options
| author | Petr Mladek <[email protected]> | 2021-08-30 14:56:06 +0200 |
|---|---|---|
| committer | Petr Mladek <[email protected]> | 2021-08-30 14:56:06 +0200 |
| commit | 71af75b6929458d85f63c0649dc26d6f4c19729e (patch) | |
| tree | c05c57903424d8270f6b6f3ec3493791fdba4e5c /tools/testing/selftests/bpf/prog_tests/perf_branches.c | |
| parent | fe8e3ee0d588566c1f44f28a555042ef50eba491 (diff) | |
| parent | bc17bed5fd73ef1a9aed39f3b0ea26936dad60b8 (diff) | |
Merge branch 'for-5.15-printk-index' into for-linus
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_branches.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/perf_branches.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/perf_branches.c b/tools/testing/selftests/bpf/prog_tests/perf_branches.c index e35c444902a7..12c4f45cee1a 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_branches.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_branches.c @@ -74,7 +74,7 @@ static void test_perf_branches_common(int perf_fd, /* attach perf_event */ link = bpf_program__attach_perf_event(skel->progs.perf_branches, perf_fd); - if (CHECK(IS_ERR(link), "attach_perf_event", "err %ld\n", PTR_ERR(link))) + if (!ASSERT_OK_PTR(link, "attach_perf_event")) goto out_destroy_skel; /* generate some branches on cpu 0 */ @@ -119,7 +119,7 @@ static void test_perf_branches_hw(void) * Some setups don't support branch records (virtual machines, !x86), * so skip test in this case. */ - if (pfd == -1) { + if (pfd < 0) { if (errno == ENOENT || errno == EOPNOTSUPP) { printf("%s:SKIP:no PERF_SAMPLE_BRANCH_STACK\n", __func__); |