Lines Matching refs:err

13 	int err;  in get_map_id()  local
21 err = bpf_obj_get_info_by_fd(bpf_map__fd(map), in get_map_id()
23 CHECK(err, "get map info", "err %d errno %d", err, errno); in get_map_id()
40 int err, map_fd; in test_pinning() local
47 err = libbpf_get_error(obj); in test_pinning()
48 if (CHECK(err != -EINVAL, "invalid open", "err %d errno %d\n", err, errno)) { in test_pinning()
55 err = libbpf_get_error(obj); in test_pinning()
56 if (CHECK(err, "default open", "err %d errno %d\n", err, errno)) { in test_pinning()
61 err = bpf_object__load(obj); in test_pinning()
62 if (CHECK(err, "default load", "err %d errno %d\n", err, errno)) in test_pinning()
66 err = stat(pinpath, &statbuf); in test_pinning()
67 if (CHECK(err, "stat pinpath", "err %d errno %d\n", err, errno)) in test_pinning()
71 err = stat(nopinpath, &statbuf); in test_pinning()
72 if (CHECK(!err || errno != ENOENT, "stat nopinpath", in test_pinning()
73 "err %d errno %d\n", err, errno)) in test_pinning()
77 err = stat(nopinpath2, &statbuf); in test_pinning()
78 if (CHECK(!err || errno != ENOENT, "stat nopinpath2", in test_pinning()
79 "err %d errno %d\n", err, errno)) in test_pinning()
94 err = bpf_object__load(obj); in test_pinning()
95 if (CHECK(err, "default load", "err %d errno %d\n", err, errno)) in test_pinning()
101 "err %d errno %d id %d id2 %d\n", err, errno, map_id, map_id2)) in test_pinning()
109 err = bpf_map__pin(map, NULL); in test_pinning()
110 if (CHECK(err, "re-pin map", "err %d errno %d\n", err, errno)) in test_pinning()
114 err = bpf_map__pin(map, "/sys/fs/bpf/other"); in test_pinning()
115 if (CHECK(!err, "pin map different", "err %d errno %d\n", err, errno)) in test_pinning()
119 err = bpf_object__unpin_maps(obj, NULL); in test_pinning()
120 if (CHECK(err, "unpin maps", "err %d errno %d\n", err, errno)) in test_pinning()
124 err = bpf_object__pin_maps(obj, NULL); in test_pinning()
125 if (CHECK(err, "pin maps", "err %d errno %d\n", err, errno)) in test_pinning()
133 err = bpf_map__set_pin_path(map, custpinpath); in test_pinning()
134 if (CHECK(err, "set pin path", "err %d errno %d\n", err, errno)) in test_pinning()
138 err = bpf_object__pin_maps(obj, NULL); in test_pinning()
139 if (CHECK(err, "pin maps", "err %d errno %d\n", err, errno)) in test_pinning()
143 err = stat(custpinpath, &statbuf); in test_pinning()
144 if (CHECK(err, "stat custpinpath", "err %d errno %d\n", err, errno)) in test_pinning()
148 err = unlink(custpinpath); in test_pinning()
149 if (CHECK(err, "unlink custpinpath", "err %d errno %d\n", err, errno)) in test_pinning()
152 err = rmdir(custpath); in test_pinning()
153 if (CHECK(err, "rmdir custpindir", "err %d errno %d\n", err, errno)) in test_pinning()
160 err = libbpf_get_error(obj); in test_pinning()
161 if (CHECK(err, "default open", "err %d errno %d\n", err, errno)) { in test_pinning()
172 err = bpf_map__set_pin_path(map, nopinpath2); in test_pinning()
174 err = bpf_map__set_pin_path(map, pinpath); in test_pinning()
178 if (CHECK(err, "set pin path", "err %d errno %d\n", err, errno)) in test_pinning()
183 err = bpf_object__load(obj); in test_pinning()
184 if (CHECK(err != -EINVAL, "param mismatch load", "err %d errno %d\n", err, errno)) in test_pinning()
188 err = stat(nopinpath2, &statbuf); in test_pinning()
189 if (CHECK(!err || errno != ENOENT, "stat nopinpath2", in test_pinning()
190 "err %d errno %d\n", err, errno)) in test_pinning()
194 err = stat(pinpath, &statbuf); in test_pinning()
195 if (CHECK(err, "stat pinpath", "err %d errno %d\n", err, errno)) in test_pinning()
207 err = bpf_object__load(obj); in test_pinning()
208 if (CHECK(err, "custom load", "err %d errno %d\n", err, errno)) in test_pinning()
212 err = stat(custpinpath, &statbuf); in test_pinning()
213 if (CHECK(err, "stat custpinpath", "err %d errno %d\n", err, errno)) in test_pinning()
217 err = unlink(custpinpath); in test_pinning()
218 if (CHECK(err, "unlink custpinpath", "err %d errno %d\n", err, errno)) in test_pinning()
221 err = rmdir(custpath); in test_pinning()
222 if (CHECK(err, "rmdir custpindir", "err %d errno %d\n", err, errno)) in test_pinning()
229 err = libbpf_get_error(obj); in test_pinning()
230 if (CHECK(err, "default open", "err %d errno %d\n", err, errno)) { in test_pinning()
244 err = bpf_map__reuse_fd(map, map_fd); in test_pinning()
245 if (CHECK(err, "reuse pinmap fd", "err %d errno %d\n", err, errno)) in test_pinning()
248 err = bpf_map__set_pin_path(map, custpinpath); in test_pinning()
249 if (CHECK(err, "set pin path", "err %d errno %d\n", err, errno)) in test_pinning()
252 err = bpf_object__load(obj); in test_pinning()
253 if (CHECK(err, "custom load", "err %d errno %d\n", err, errno)) in test_pinning()
257 err = stat(custpinpath, &statbuf); in test_pinning()
258 if (CHECK(err, "stat custpinpath", "err %d errno %d\n", err, errno)) in test_pinning()