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/probe_user.c | |
| parent | 3ff340e24c9dd5cff9fc07d67914c5adf67f80d6 (diff) | |
| parent | c68ef4ad180e09805fa46965d15e1dfadf09ffa5 (diff) | |
Merge branch 'fixes-v5.14' into fixes
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/probe_user.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/probe_user.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/probe_user.c b/tools/testing/selftests/bpf/prog_tests/probe_user.c index 7aecfd9e87d1..95bd12097358 100644 --- a/tools/testing/selftests/bpf/prog_tests/probe_user.c +++ b/tools/testing/selftests/bpf/prog_tests/probe_user.c @@ -15,7 +15,7 @@ void test_probe_user(void) static const int zero = 0; obj = bpf_object__open_file(obj_file, &opts); - if (CHECK(IS_ERR(obj), "obj_open_file", "err %ld\n", PTR_ERR(obj))) + if (!ASSERT_OK_PTR(obj, "obj_open_file")) return; kprobe_prog = bpf_object__find_program_by_title(obj, prog_name); @@ -33,11 +33,8 @@ void test_probe_user(void) goto cleanup; kprobe_link = bpf_program__attach(kprobe_prog); - if (CHECK(IS_ERR(kprobe_link), "attach_kprobe", - "err %ld\n", PTR_ERR(kprobe_link))) { - kprobe_link = NULL; + if (!ASSERT_OK_PTR(kprobe_link, "attach_kprobe")) goto cleanup; - } memset(&curr, 0, sizeof(curr)); in->sin_family = AF_INET; |
