/linux-6.12.1/tools/testing/selftests/powerpc/ptrace/ |
D | perf-hwbreak.c | 406 int fd1, fd2; in test_process_multi_diff_addr() local 416 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&b, (__u64)sizeof(b)); in test_process_multi_diff_addr() 417 if (fd2 < 0) { in test_process_multi_diff_addr() 424 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr() 426 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr() 429 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr() 433 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_diff_addr() 437 close(fd2); in test_process_multi_diff_addr() 451 int fd1, fd2; in test_process_multi_same_addr() local 461 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr() [all …]
|
/linux-6.12.1/tools/testing/selftests/net/ |
D | sk_bind_sendto_listen.c | 10 int fd1, fd2, one = 1; in main() local 43 fd2 = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); in main() 44 if (fd2 < 0) { in main() 49 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { in main() 54 if (bind(fd2, (struct sockaddr *)&bind_addr, sizeof(bind_addr))) { in main() 59 if (sendto(fd2, NULL, 0, MSG_FASTOPEN, (struct sockaddr *)&bind_addr, in main() 65 if (listen(fd2, 0)) { in main() 70 close(fd2); in main() 75 close(fd2); in main()
|
D | sk_connect_zero_addr.c | 10 int fd1, fd2, one = 1; in main() local 42 fd2 = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); in main() 43 if (fd2 < 0) { in main() 48 if (connect(fd2, (struct sockaddr *)&bind_addr, sizeof(bind_addr))) { in main() 53 close(fd2); in main() 58 close(fd2); in main()
|
D | tun.c | 108 int fd, fd2; in FIXTURE() local 118 self->fd2 = tun_alloc(self->ifname); in FIXTURE_SETUP() 119 ASSERT_GE(self->fd2, 0); in FIXTURE_SETUP() 126 if (self->fd2 >= 0) in FIXTURE_TEARDOWN() 127 close(self->fd2); in FIXTURE_TEARDOWN()
|
D | reuseport_bpf.c | 309 int fd1, fd2, opt; in test_extra_filter() local 315 fd2 = socket(p.recv_family, p.protocol, 0); in test_extra_filter() 316 if (fd2 < 0) in test_extra_filter() 322 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter() 326 attach_ebpf(fd2, 10); in test_extra_filter() 331 if (!bind(fd2, addr, sockaddr_size()) || errno != EADDRINUSE) in test_extra_filter() 390 int fd1, fd2, opt = 1; in test_filter_without_bind() local 396 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind() 397 if (fd2 < 0) in test_filter_without_bind() 401 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind() [all …]
|
D | reuseaddr_conflict.c | 89 int fd1, fd2; in main() local 104 fd2 = open_port(0, 1); in main() 105 if (fd2 >= 0) in main()
|
D | tls.c | 1655 int fd2, cfd2; in FIXTURE() local 1683 ulp_sock_pair(_metadata, &self->fd2, &self->cfd2, &self->notls); in FIXTURE_SETUP() 1698 close(self->fd2); in FIXTURE_TEARDOWN() 1710 EXPECT_EQ(send(self->fd2, buf, sizeof(buf), 0), sizeof(buf)); in TEST_F() 1732 EXPECT_EQ(send(self->fd2, buf, n, 0), n); in TEST_F() 1759 EXPECT_EQ(send(self->fd2, cip[i], n, 0), n); in TEST_F() 1790 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F() 1796 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F() 1858 EXPECT_EQ(send(self->fd2, rec, 100, 0), 100); in TEST_F() 1864 EXPECT_EQ(send(self->fd2, rec + 100, rec_len - 100, 0), rec_len - 100); in TEST_F() [all …]
|
/linux-6.12.1/tools/perf/tests/ |
D | bp_signal.c | 34 static int fd2; variable 77 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2() 98 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler() 243 fd2 = bp_event(sig_handler, SIGUSR1); in test__bp_signal() 247 ioctl(fd2, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal() 257 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal() 261 count2 = bp_count(fd2); in test__bp_signal() 265 close(fd2); in test__bp_signal()
|
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | udp_limit.c | 11 int fd1 = -1, fd2 = -1; in test_udp_limit() local 36 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit() 37 if (!ASSERT_LT(fd2, 0, "socket(fd2)")) in test_udp_limit() 65 if (fd2 >= 0) in test_udp_limit() 66 close(fd2); in test_udp_limit()
|
D | tc_opts.c | 18 __u32 fd1, fd2, id1, id2; in serial_test_tc_opts_basic() local 28 fd2 = bpf_program__fd(skel->progs.tc2); in serial_test_tc_opts_basic() 31 id2 = id_from_prog_fd(fd2); in serial_test_tc_opts_basic() 68 err = bpf_prog_attach_opts(fd2, loopback, BPF_TCX_EGRESS, &opta); in serial_test_tc_opts_basic() 94 err = bpf_prog_detach_opts(fd2, loopback, BPF_TCX_EGRESS, &optd); in serial_test_tc_opts_basic() 116 __u32 fd1, fd2, fd3, fd4, id1, id2, id3, id4; in test_tc_opts_before_target() local 126 fd2 = bpf_program__fd(skel->progs.tc2); in test_tc_opts_before_target() 131 id2 = id_from_prog_fd(fd2); in test_tc_opts_before_target() 147 err = bpf_prog_attach_opts(fd2, loopback, target, &opta); in test_tc_opts_before_target() 178 .relative_fd = fd2, in test_tc_opts_before_target() [all …]
|
D | xdp_dev_bound_only.c | 30 int fd2 = -1; in test_xdp_dev_bound_only_offdev() local 50 fd2 = load_dummy_prog("dummy2", ifindex, 0); in test_xdp_dev_bound_only_offdev() 51 ASSERT_EQ(fd2, -EINVAL, "load_dummy_prog #2 (offloaded)"); in test_xdp_dev_bound_only_offdev() 55 close(fd2); in test_xdp_dev_bound_only_offdev()
|
D | xdp_attach.c | 13 int err, fd1, fd2, fd3; in test_xdp_attach() local 26 err = bpf_prog_test_load(file, BPF_PROG_TYPE_XDP, &obj2, &fd2); in test_xdp_attach() 31 err = bpf_prog_get_info_by_fd(fd2, &info, &len); in test_xdp_attach() 49 err = bpf_xdp_attach(IFINDEX_LO, fd2, XDP_FLAGS_REPLACE, &opts); in test_xdp_attach() 54 err = bpf_xdp_attach(IFINDEX_LO, fd2, 0, &opts); in test_xdp_attach() 70 opts.old_prog_fd = fd2; in test_xdp_attach()
|
D | tc_netkit.c | 410 __u32 pid1, pid2, fd1, fd2; in serial_test_tc_netkit_multi_opts_target() local 425 fd2 = bpf_program__fd(skel->progs.tc2); in serial_test_tc_netkit_multi_opts_target() 428 pid2 = id_from_prog_fd(fd2); in serial_test_tc_netkit_multi_opts_target() 470 err = bpf_prog_attach_opts(fd2, ifindex, target, &opta); in serial_test_tc_netkit_multi_opts_target() 497 err = bpf_prog_detach_opts(fd2, ifindex, target, &optd); in serial_test_tc_netkit_multi_opts_target()
|
/linux-6.12.1/tools/testing/selftests/memfd/ |
D | memfd_test.c | 569 int r, fd2; in mfd_assert_shrink() local 579 fd2 = mfd_assert_open(fd, in mfd_assert_shrink() 582 close(fd2); in mfd_assert_shrink() 948 int fd, fd2; in test_seal_future_write() local 969 fd2 = mfd_assert_reopen_fd(fd); in test_seal_future_write() 971 mfd_assert_read(fd2); in test_seal_future_write() 972 mfd_assert_read_shared(fd2); in test_seal_future_write() 973 mfd_fail_write(fd2); in test_seal_future_write() 978 close(fd2); in test_seal_future_write() 1417 int fd, fd2; in test_share_dup() local [all …]
|
/linux-6.12.1/tools/testing/selftests/filelock/ |
D | ofdlocks.c | 40 int fd2 = open("/tmp/aa", O_RDONLY); in main() local 44 assert(fd2 != -1); in main() 45 ksft_print_msg("[INFO] opened fds %i %i\n", fd, fd2); in main() 63 rc = lock_get(fd2, &fl); in main() 74 rc = lock_get(fd2, &fl); in main() 125 lock_get(fd2, &fl); in main()
|
/linux-6.12.1/tools/testing/selftests/kcmp/ |
D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp() 37 int fd1, fd2; in main() local 94 fd2 = open(kpath, O_RDWR); in main() 95 if (fd2 < 0) { in main() 105 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
|
/linux-6.12.1/tools/testing/selftests/proc/ |
D | fd-002-posix-eq.c | 27 int fd0, fd1, fd2; in main() local 40 fd2 = open(buf, O_RDONLY); in main() 41 assert(fd2 >= 0); in main() 47 rv = fstat(fd2, &st2); in main()
|
/linux-6.12.1/tools/testing/selftests/core/ |
D | close_range_test.c | 383 int fd1, fd2, fd3, fd4, flags, ret, status; in TEST() local 394 fd2 = dup2(fd1, 1000); in TEST() 395 EXPECT_GT(fd2, 0); in TEST() 397 flags = fcntl(fd1, F_DUPFD_QUERY, fd2); in TEST() 421 flags = fcntl(fd2, F_GETFD); in TEST() 460 flags = fcntl(fd2, F_GETFD); in TEST() 490 EXPECT_EQ(close(fd2), 0); in TEST() 500 int i, fd1, fd2, fd3, flags, ret, status; in TEST() local 521 fd2 = dup2(fd1, 1000); in TEST() 522 EXPECT_GT(fd2, 0); in TEST() [all …]
|
/linux-6.12.1/tools/testing/selftests/kvm/ |
D | guest_memfd_test.c | 147 int fd1, fd2, ret; in test_create_guest_memfd_multiple() local 157 fd2 = __vm_create_guest_memfd(vm, 8192, 0); in test_create_guest_memfd_multiple() 158 TEST_ASSERT(fd2 != -1, "memfd creation should succeed"); in test_create_guest_memfd_multiple() 160 ret = fstat(fd2, &st2); in test_create_guest_memfd_multiple() 169 close(fd2); in test_create_guest_memfd_multiple()
|
/linux-6.12.1/tools/testing/selftests/sync/ |
D | sync.c | 68 int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument 73 data.fd2 = fd2; in sync_merge()
|
D | sync.h | 36 int sync_merge(const char *name, int fd1, int fd2);
|
/linux-6.12.1/scripts/kconfig/ |
D | confdata.c | 49 int fd1, fd2; in is_same() local 58 fd2 = open(file2, O_RDONLY); in is_same() 59 if (fd2 < 0) in is_same() 65 ret = fstat(fd2, &st2); in is_same() 76 map2 = mmap(NULL, st2.st_size, PROT_READ, MAP_PRIVATE, fd2, 0); in is_same() 85 close(fd2); in is_same()
|
/linux-6.12.1/Documentation/arch/powerpc/ |
D | cxlflash.rst | 157 referred to as fd2) that is used by the block library to initiate 166 and fd2) that are provided back to the user: 178 - A valid adapter file descriptor (fd2 >= 0) is only returned on 190 - When this ioctl returns with a valid fd2 and the return flag 192 close fd2 in the following circumstances: 195 + Following a successful recovery on the context's original fd2 197 on the fd2 associated with the source context 199 - At any time, a close on fd2 will invalidate the tokens. Applications 200 should exercise caution to only close fd2 when appropriate (outlined 292 attach, the application _must_ close the fd2 associated with the context [all …]
|
/linux-6.12.1/include/uapi/linux/ |
D | sync_file.h | 32 __s32 fd2; member
|
/linux-6.12.1/include/linux/ |
D | audit.h | 409 extern void __audit_fd_pair(int fd1, int fd2); 432 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument 435 __audit_fd_pair(fd1, fd2); in audit_fd_pair() 648 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
|