Lines Matching refs:i
30 int cg = 0, i; in test_cgroup_attach_autodetach() local
33 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) { in test_cgroup_attach_autodetach()
34 allow_prog[i] = prog_load(); in test_cgroup_attach_autodetach()
35 if (CHECK(allow_prog[i] < 0, "prog_load", in test_cgroup_attach_autodetach()
51 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) in test_cgroup_attach_autodetach()
52 if (CHECK(bpf_prog_attach(allow_prog[i], cg, in test_cgroup_attach_autodetach()
55 "prog_attach", "prog[%d], errno=%d\n", i, errno)) in test_cgroup_attach_autodetach()
72 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) { in test_cgroup_attach_autodetach()
73 close(allow_prog[i]); in test_cgroup_attach_autodetach()
74 allow_prog[i] = -1; in test_cgroup_attach_autodetach()
86 for (i = 0; i < ARRAY_SIZE(prog_ids); i++) { in test_cgroup_attach_autodetach()
88 int fd = bpf_prog_get_fd_by_id(prog_ids[i]); in test_cgroup_attach_autodetach()
104 for (i = 0; i < ARRAY_SIZE(allow_prog); i++) in test_cgroup_attach_autodetach()
105 if (allow_prog[i] >= 0) in test_cgroup_attach_autodetach()
106 close(allow_prog[i]); in test_cgroup_attach_autodetach()