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/probe_user.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/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; |