Home
last modified time | relevance | path

Searched refs:fd2 (Results 1 – 25 of 27) sorted by relevance

12

/Linux-v6.1/tools/testing/selftests/powerpc/ptrace/
Dperf-hwbreak.c360 int fd1, fd2; in test_process_multi_diff_addr() local
370 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&b, (__u64)sizeof(b)); in test_process_multi_diff_addr()
371 if (fd2 < 0) { in test_process_multi_diff_addr()
378 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
380 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
383 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
387 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_diff_addr()
391 close(fd2); in test_process_multi_diff_addr()
405 int fd1, fd2; in test_process_multi_same_addr() local
415 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr()
[all …]
/Linux-v6.1/tools/testing/selftests/net/
Dsk_bind_sendto_listen.c10 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()
Dsk_connect_zero_addr.c10 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()
Dtun.c108 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()
Dreuseport_bpf.c309 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 …]
Dreuseaddr_conflict.c89 int fd1, fd2; in main() local
104 fd2 = open_port(0, 1); in main()
105 if (fd2 >= 0) in main()
Dtls.c1457 int fd2, cfd2; in FIXTURE() local
1485 ulp_sock_pair(_metadata, &self->fd2, &self->cfd2, &self->notls); in FIXTURE_SETUP()
1500 close(self->fd2); in FIXTURE_TEARDOWN()
1512 EXPECT_EQ(send(self->fd2, buf, sizeof(buf), 0), sizeof(buf)); in TEST_F()
1534 EXPECT_EQ(send(self->fd2, buf, n, 0), n); in TEST_F()
1561 EXPECT_EQ(send(self->fd2, cip[i], n, 0), n); in TEST_F()
1592 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
1598 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
/Linux-v6.1/tools/testing/selftests/memfd/
Dmemfd_test.c474 int r, fd2; in mfd_assert_shrink() local
484 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
487 close(fd2); in mfd_assert_shrink()
771 int fd, fd2; in test_seal_future_write() local
792 fd2 = mfd_assert_reopen_fd(fd); in test_seal_future_write()
794 mfd_assert_read(fd2); in test_seal_future_write()
795 mfd_assert_read_shared(fd2); in test_seal_future_write()
796 mfd_fail_write(fd2); in test_seal_future_write()
801 close(fd2); in test_seal_future_write()
889 int fd, fd2; in test_share_dup() local
[all …]
/Linux-v6.1/tools/perf/tests/
Dbp_signal.c33 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-v6.1/tools/testing/selftests/bpf/prog_tests/
Dudp_limit.c11 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()
Dxdp_attach.c13 int err, fd1, fd2, fd3; in serial_test_xdp_attach() local
26 err = bpf_prog_test_load(file, BPF_PROG_TYPE_XDP, &obj2, &fd2); in serial_test_xdp_attach()
31 err = bpf_obj_get_info_by_fd(fd2, &info, &len); in serial_test_xdp_attach()
49 err = bpf_xdp_attach(IFINDEX_LO, fd2, XDP_FLAGS_REPLACE, &opts); in serial_test_xdp_attach()
54 err = bpf_xdp_attach(IFINDEX_LO, fd2, 0, &opts); in serial_test_xdp_attach()
70 opts.old_prog_fd = fd2; in serial_test_xdp_attach()
Dsockmap_listen.c924 static int add_to_sockmap(int sock_mapfd, int fd1, int fd2) in add_to_sockmap() argument
937 value = fd2; in add_to_sockmap()
/Linux-v6.1/tools/testing/selftests/kcmp/
Dkcmp_test.c23 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-v6.1/tools/testing/selftests/proc/
Dfd-002-posix-eq.c27 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-v6.1/tools/testing/selftests/core/
Dclose_range_test.c388 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-v6.1/tools/testing/selftests/sync/
Dsync.c68 int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
73 data.fd2 = fd2; in sync_merge()
Dsync.h36 int sync_merge(const char *name, int fd1, int fd2);
/Linux-v6.1/include/uapi/linux/
Dsync_file.h28 __s32 fd2; member
/Linux-v6.1/scripts/kconfig/
Dconfdata.c45 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-v6.1/Documentation/powerpc/
Dcxlflash.rst157 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-v6.1/include/linux/
Daudit.h407 extern void __audit_fd_pair(int fd1, int fd2);
430 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
433 __audit_fd_pair(fd1, fd2); in audit_fd_pair()
646 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
/Linux-v6.1/net/
Dsocket.c1659 int fd1, fd2, err; in __sys_socketpair() local
1679 fd2 = get_unused_fd_flags(flags); in __sys_socketpair()
1680 if (unlikely(fd2 < 0)) { in __sys_socketpair()
1682 return fd2; in __sys_socketpair()
1689 err = put_user(fd2, &usockvec[1]); in __sys_socketpair()
1736 audit_fd_pair(fd1, fd2); in __sys_socketpair()
1739 fd_install(fd2, newfile2); in __sys_socketpair()
1743 put_unused_fd(fd2); in __sys_socketpair()
/Linux-v6.1/drivers/dma-buf/
Dsync_file.c228 fence2 = sync_file_fdget(data.fd2); in sync_file_ioctl_merge()
/Linux-v6.1/tools/testing/selftests/seccomp/
Dseccomp_bpf.c298 static int __filecmp(pid_t pid1, pid_t pid2, int fd1, int fd2) in __filecmp() argument
302 return syscall(__NR_kcmp, pid1, pid2, KCMP_FILE, fd1, fd2); in __filecmp()
310 #define filecmp(pid1, pid2, fd1, fd2) ({ \ argument
313 _ret = __filecmp(pid1, pid2, fd1, fd2); \
/Linux-v6.1/arch/m68k/ifpsp060/
Dftest.sa32 dc.l $42aefea0,$487b0170,$00000fd2,$61ff0000

12