Lines Matching refs:err
10 int err; in prog_attach() local
12 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_attach()
13 if (err) { in prog_attach()
24 err = bpf_prog_attach(bpf_program__fd(prog), cgroup_fd, in prog_attach()
26 if (err) { in prog_attach()
39 int err; in prog_detach() local
41 err = libbpf_prog_type_by_name(title, &prog_type, &attach_type); in prog_detach()
42 if (err) in prog_detach()
49 err = bpf_prog_detach2(bpf_program__fd(prog), cgroup_fd, in prog_detach()
51 if (err) in prog_detach()
62 int err; in run_getsockopt_test() local
67 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
68 if (err < 0) { in run_getsockopt_test()
75 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
76 if (err) { in run_getsockopt_test()
83 err = -1; in run_getsockopt_test()
92 err = prog_attach(obj, cg_child, "cgroup/getsockopt/child"); in run_getsockopt_test()
93 if (err) in run_getsockopt_test()
98 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
99 if (err) { in run_getsockopt_test()
106 err = -1; in run_getsockopt_test()
116 err = prog_attach(obj, cg_parent, "cgroup/getsockopt/parent"); in run_getsockopt_test()
117 if (err) in run_getsockopt_test()
122 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
123 if (err) { in run_getsockopt_test()
130 err = -1; in run_getsockopt_test()
141 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
142 if (err < 0) { in run_getsockopt_test()
149 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
150 if (!err) { in run_getsockopt_test()
160 err = prog_detach(obj, cg_child, "cgroup/getsockopt/child"); in run_getsockopt_test()
161 if (err) { in run_getsockopt_test()
168 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
169 if (!err) { in run_getsockopt_test()
180 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
181 if (err < 0) { in run_getsockopt_test()
188 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test()
189 if (err) { in run_getsockopt_test()
196 err = -1; in run_getsockopt_test()
204 return err; in run_getsockopt_test()
212 int err; in run_setsockopt_test() local
217 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
218 if (err < 0) { in run_setsockopt_test()
225 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_setsockopt_test()
226 if (err) { in run_setsockopt_test()
233 err = -1; in run_setsockopt_test()
239 err = prog_attach(obj, cg_child, "cgroup/setsockopt"); in run_setsockopt_test()
240 if (err) in run_setsockopt_test()
244 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
245 if (err < 0) { in run_setsockopt_test()
252 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_setsockopt_test()
253 if (err) { in run_setsockopt_test()
260 err = -1; in run_setsockopt_test()
266 err = prog_attach(obj, cg_parent, "cgroup/setsockopt"); in run_setsockopt_test()
267 if (err) in run_setsockopt_test()
271 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
272 if (err < 0) { in run_setsockopt_test()
279 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_setsockopt_test()
280 if (err) { in run_setsockopt_test()
287 err = -1; in run_setsockopt_test()
295 return err; in run_setsockopt_test()
306 int err = -1; in test_sockopt_multi() local
317 err = bpf_prog_load_xattr(&attr, &obj, &ignored); in test_sockopt_multi()
318 if (CHECK_FAIL(err)) in test_sockopt_multi()