Lines Matching refs:link_fd
601 int prog_fd, link_fd = -1; in tp_btf_subtest() local
616 link_fd = bpf_raw_tracepoint_open_opts(prog_fd, &raw_tp_opts); in tp_btf_subtest()
617 if (!ASSERT_GE(link_fd, 0, "bpf_raw_tracepoint_open_opts")) in tp_btf_subtest()
621 close(link_fd); /* detach */ in tp_btf_subtest()
622 link_fd = -1; in tp_btf_subtest()
630 link_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_RAW_TP, &link_opts); in tp_btf_subtest()
631 if (!ASSERT_GE(link_fd, 0, "bpf_link_create")) in tp_btf_subtest()
635 close(link_fd); /* detach */ in tp_btf_subtest()
636 link_fd = -1; in tp_btf_subtest()
655 if (link_fd >= 0) in tp_btf_subtest()
656 close(link_fd); in tp_btf_subtest()
682 int err, prog_fd, link_fd = -1; in raw_tp_subtest() local
695 link_fd = bpf_raw_tracepoint_open_opts(prog_fd, &raw_tp_opts); in raw_tp_subtest()
696 if (!ASSERT_GE(link_fd, 0, "bpf_raw_tracepoint_open_opts")) in raw_tp_subtest()
701 err = verify_raw_tp_link_info(link_fd, cookie); in raw_tp_subtest()
705 close(link_fd); /* detach */ in raw_tp_subtest()
706 link_fd = -1; in raw_tp_subtest()
726 if (link_fd >= 0) in raw_tp_subtest()
727 close(link_fd); in raw_tp_subtest()