Lines Matching +full:differ +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
30 return -errno; in prog_holds_map()
35 return -errno; in prog_holds_map()
39 return -ENOMEM; in prog_holds_map()
49 ret = -errno; in prog_holds_map()
53 ret = -ENOENT; in prog_holds_map()
72 if (CHECK(!obj, "skel-load", "errno %d", errno)) in test_metadata_unused()
75 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused()
76 bpf_map__fd(obj->maps.rodata)); in test_metadata_unused()
77 if (CHECK(err, "prog-holds-rodata", "errno: %d", err)) in test_metadata_unused()
83 if (CHECK(strncmp(obj->rodata->bpf_metadata_a, "foo", in test_metadata_unused()
84 sizeof(obj->rodata->bpf_metadata_a)), in test_metadata_unused()
85 "bpf_metadata_a", "expected \"foo\", value differ")) in test_metadata_unused()
87 if (CHECK(obj->rodata->bpf_metadata_b != 1, "bpf_metadata_b", in test_metadata_unused()
88 "expected 1, got %d", obj->rodata->bpf_metadata_b)) in test_metadata_unused()
92 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused()
93 bpf_map__fd(obj->maps.rodata), NULL); in test_metadata_unused()
106 if (CHECK(!obj, "skel-load", "errno %d", errno)) in test_metadata_used()
109 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_used()
110 bpf_map__fd(obj->maps.rodata)); in test_metadata_used()
111 if (CHECK(err, "prog-holds-rodata", "errno: %d", err)) in test_metadata_used()
117 if (CHECK(strncmp(obj->rodata->bpf_metadata_a, "bar", in test_metadata_used()
118 sizeof(obj->rodata->bpf_metadata_a)), in test_metadata_used()
119 "metadata_a", "expected \"bar\", value differ")) in test_metadata_used()
121 if (CHECK(obj->rodata->bpf_metadata_b != 2, "metadata_b", in test_metadata_used()
122 "expected 2, got %d", obj->rodata->bpf_metadata_b)) in test_metadata_used()
126 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_used()
127 bpf_map__fd(obj->maps.rodata), NULL); in test_metadata_used()