/linux-6.6.21/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.6.21/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 | 1562 int fd2, cfd2; in FIXTURE() local 1590 ulp_sock_pair(_metadata, &self->fd2, &self->cfd2, &self->notls); in FIXTURE_SETUP() 1605 close(self->fd2); in FIXTURE_TEARDOWN() 1617 EXPECT_EQ(send(self->fd2, buf, sizeof(buf), 0), sizeof(buf)); in TEST_F() 1639 EXPECT_EQ(send(self->fd2, buf, n, 0), n); in TEST_F() 1666 EXPECT_EQ(send(self->fd2, cip[i], n, 0), n); in TEST_F() 1697 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F() 1703 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F() 1765 EXPECT_EQ(send(self->fd2, rec, 100, 0), 100); in TEST_F() 1771 EXPECT_EQ(send(self->fd2, rec + 100, rec_len - 100, 0), rec_len - 100); in TEST_F() [all …]
|
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
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 | 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 | 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 | sockmap_helpers.h | 298 static inline int add_to_sockmap(int sock_mapfd, int fd1, int fd2) in add_to_sockmap() argument 311 value = fd2; in add_to_sockmap()
|
/linux-6.6.21/tools/perf/tests/ |
D | bp_signal.c | 33 static int fd2; variable 76 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2() 97 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler() 242 fd2 = bp_event(sig_handler, SIGUSR1); in test__bp_signal() 246 ioctl(fd2, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal() 256 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal() 260 count2 = bp_count(fd2); in test__bp_signal() 264 close(fd2); in test__bp_signal()
|
/linux-6.6.21/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.6.21/tools/testing/selftests/memfd/ |
D | memfd_test.c | 572 int r, fd2; in mfd_assert_shrink() local 582 fd2 = mfd_assert_open(fd, in mfd_assert_shrink() 585 close(fd2); in mfd_assert_shrink() 954 int fd, fd2; in test_seal_future_write() local 975 fd2 = mfd_assert_reopen_fd(fd); in test_seal_future_write() 977 mfd_assert_read(fd2); in test_seal_future_write() 978 mfd_assert_read_shared(fd2); in test_seal_future_write() 979 mfd_fail_write(fd2); in test_seal_future_write() 984 close(fd2); in test_seal_future_write() 1427 int fd, fd2; in test_share_dup() local [all …]
|
/linux-6.6.21/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, 0644); in main() 95 if (fd2 < 0) { in main() 105 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
|
/linux-6.6.21/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.6.21/tools/testing/selftests/core/ |
D | close_range_test.c | 388 int fd1, fd2, fd3, flags, ret, status; in TEST() local 399 fd2 = dup2(fd1, 1000); in TEST() 400 EXPECT_GT(fd2, 0); in TEST() 419 flags = fcntl(fd2, F_GETFD); in TEST() 449 flags = fcntl(fd2, F_GETFD); in TEST() 461 EXPECT_EQ(close(fd2), 0); in TEST() 470 int i, fd1, fd2, fd3, flags, ret, status; in TEST() local 491 fd2 = dup2(fd1, 1000); in TEST() 492 EXPECT_GT(fd2, 0); in TEST() 514 flags = fcntl(fd2, F_GETFD); in TEST() [all …]
|
/linux-6.6.21/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.6.21/include/uapi/linux/ |
D | sync_file.h | 32 __s32 fd2; member
|
/linux-6.6.21/Documentation/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.6.21/scripts/kconfig/ |
D | confdata.c | 45 int fd1, fd2; in is_same() local 54 fd2 = open(file2, O_RDONLY); in is_same() 55 if (fd2 < 0) in is_same() 61 ret = fstat(fd2, &st2); in is_same() 72 map2 = mmap(NULL, st2.st_size, PROT_READ, MAP_PRIVATE, fd2, 0); in is_same() 81 close(fd2); in is_same()
|
/linux-6.6.21/include/linux/ |
D | audit.h | 408 extern void __audit_fd_pair(int fd1, int fd2); 431 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument 434 __audit_fd_pair(fd1, fd2); in audit_fd_pair() 647 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
|
/linux-6.6.21/net/ |
D | socket.c | 1734 int fd1, fd2, err; in __sys_socketpair() local 1754 fd2 = get_unused_fd_flags(flags); in __sys_socketpair() 1755 if (unlikely(fd2 < 0)) { in __sys_socketpair() 1757 return fd2; in __sys_socketpair() 1764 err = put_user(fd2, &usockvec[1]); in __sys_socketpair() 1811 audit_fd_pair(fd1, fd2); in __sys_socketpair() 1814 fd_install(fd2, newfile2); in __sys_socketpair() 1818 put_unused_fd(fd2); in __sys_socketpair()
|