diff options
| author | Tony Lindgren <tony@atomide.com> | 2021-07-27 11:25:08 +0300 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2021-07-27 11:25:08 +0300 |
| commit | 353b7a55dcaf5fb8758e09ebe2ddf5f3adbac7c5 (patch) | |
| tree | 081200957b3d8925cbe913020d45a4e3ba61a7a3 /tools/testing/selftests/bpf/prog_tests/perf_branches.c | |
| parent | 3ff340e24c9dd5cff9fc07d67914c5adf67f80d6 (diff) | |
| parent | c68ef4ad180e09805fa46965d15e1dfadf09ffa5 (diff) | |
Merge branch 'fixes-v5.14' into fixes
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__); |
