Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/powerpc/ptrace/
A Dperf-hwbreak.c360 int fd1, fd2; in test_process_multi_diff_addr() local
391 close(fd2); in test_process_multi_diff_addr()
405 int fd1, fd2; in test_process_multi_same_addr() local
436 close(fd2); in test_process_multi_same_addr()
450 int fd1, fd2; in test_process_multi_diff_addr_ro_wo() local
481 close(fd2); in test_process_multi_diff_addr_ro_wo()
526 close(fd2); in test_process_multi_same_addr_ro_wo()
573 free(fd2); in test_syswide_multi_diff_addr()
620 free(fd2); in test_syswide_multi_same_addr()
667 free(fd2); in test_syswide_multi_diff_addr_ro_wo()
[all …]
/linux/tools/testing/selftests/memfd/
A Dmemfd_test.c473 int r, fd2; in mfd_assert_shrink() local
486 close(fd2); in mfd_assert_shrink()
770 int fd, fd2; in test_seal_future_write() local
793 mfd_assert_read(fd2); in test_seal_future_write()
795 mfd_fail_write(fd2); in test_seal_future_write()
800 close(fd2); in test_seal_future_write()
888 int fd, fd2; in test_share_dup() local
917 close(fd2); in test_share_dup()
964 int fd, fd2; in test_share_open() local
989 close(fd2); in test_share_open()
[all …]
/linux/tools/perf/tests/
A 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/tools/testing/selftests/bpf/prog_tests/
A Dxdp_attach.c13 int err, fd1, fd2, fd3; in serial_test_xdp_attach() local
27 err = bpf_prog_load(file, BPF_PROG_TYPE_XDP, &obj2, &fd2); in serial_test_xdp_attach()
32 err = bpf_obj_get_info_by_fd(fd2, &info, &len); in serial_test_xdp_attach()
51 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, fd2, XDP_FLAGS_REPLACE, in serial_test_xdp_attach()
57 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, fd2, 0, &opts); in serial_test_xdp_attach()
73 opts.old_fd = fd2; in serial_test_xdp_attach()
A Dudp_limit.c13 int fd1 = -1, fd2 = -1; in test_udp_limit() local
38 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit()
39 if (CHECK(fd2 >= 0, "fd2", "errno %d", errno)) in test_udp_limit()
69 if (fd2 >= 0) in test_udp_limit()
70 close(fd2); in test_udp_limit()
A 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/tools/testing/selftests/kcmp/
A 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
91 fd2 = open(kpath, O_RDWR, 0644); in main()
92 if (fd2 < 0) { in main()
102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
/linux/tools/testing/selftests/core/
A Dclose_range_test.c403 fd2 = dup2(fd1, 1000); in TEST()
404 EXPECT_GT(fd2, 0); in TEST()
423 flags = fcntl(fd2, F_GETFD); in TEST()
453 flags = fcntl(fd2, F_GETFD); in TEST()
465 EXPECT_EQ(close(fd2), 0); in TEST()
495 fd2 = dup2(fd1, 1000); in TEST()
496 EXPECT_GT(fd2, 0); in TEST()
518 flags = fcntl(fd2, F_GETFD); in TEST()
534 EXPECT_EQ(close(fd2), 0); in TEST()
554 flags = fcntl(fd2, F_GETFD); in TEST()
[all …]
/linux/tools/testing/selftests/proc/
A 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/tools/testing/selftests/net/
A Dreuseport_bpf.c311 int fd1, fd2, opt; in test_extra_filter() local
317 fd2 = socket(p.recv_family, p.protocol, 0); in test_extra_filter()
318 if (fd2 < 0) in test_extra_filter()
324 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
328 attach_ebpf(fd2, 10); in test_extra_filter()
333 if (!bind(fd2, addr, sockaddr_size()) && errno != EADDRINUSE) in test_extra_filter()
392 int fd1, fd2, opt = 1; in test_filter_without_bind() local
398 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind()
399 if (fd2 < 0) in test_filter_without_bind()
407 attach_cbpf(fd2, 10); in test_filter_without_bind()
[all …]
A Dreuseaddr_conflict.c89 int fd1, fd2; in main() local
104 fd2 = open_port(0, 1); in main()
105 if (fd2 >= 0) in main()
A Dtls.c1428 int fd2, cfd2; in FIXTURE() local
1456 ulp_sock_pair(_metadata, &self->fd2, &self->cfd2, &self->notls); in FIXTURE_SETUP()
1471 close(self->fd2); in FIXTURE_TEARDOWN()
1483 EXPECT_EQ(send(self->fd2, buf, sizeof(buf), 0), sizeof(buf)); in TEST_F()
1505 EXPECT_EQ(send(self->fd2, buf, n, 0), n); in TEST_F()
1532 EXPECT_EQ(send(self->fd2, cip[i], n, 0), n); in TEST_F()
1563 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
1569 EXPECT_EQ(send(self->fd2, cip, n, 0), n); in TEST_F()
/linux/tools/testing/selftests/sync/
A Dsync.c68 int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
73 data.fd2 = fd2; in sync_merge()
A Dsync.h36 int sync_merge(const char *name, int fd1, int fd2);
/linux/Documentation/powerpc/
A 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/scripts/kconfig/
A 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/include/linux/
A Daudit.h410 extern void __audit_fd_pair(int fd1, int fd2);
433 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
436 __audit_fd_pair(fd1, fd2); in audit_fd_pair()
653 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
/linux/include/uapi/linux/
A Dsync_file.h28 __s32 fd2; member
/linux/arch/nds32/include/asm/
A Dnds32_fpu_inst.h69 enum fd2 { enum
/linux/net/
A Dsocket.c1576 int fd1, fd2, err; in __sys_socketpair() local
1596 fd2 = get_unused_fd_flags(flags); in __sys_socketpair()
1597 if (unlikely(fd2 < 0)) { in __sys_socketpair()
1599 return fd2; in __sys_socketpair()
1606 err = put_user(fd2, &usockvec[1]); in __sys_socketpair()
1653 audit_fd_pair(fd1, fd2); in __sys_socketpair()
1656 fd_install(fd2, newfile2); in __sys_socketpair()
1660 put_unused_fd(fd2); in __sys_socketpair()
/linux/drivers/dma-buf/
A Dsync_file.c344 fence2 = sync_file_fdget(data.fd2); in sync_file_ioctl_merge()
/linux/tools/testing/selftests/seccomp/
A Dseccomp_bpf.c291 static int __filecmp(pid_t pid1, pid_t pid2, int fd1, int fd2) in __filecmp() argument
295 return syscall(__NR_kcmp, pid1, pid2, KCMP_FILE, fd1, fd2); in __filecmp()
303 #define filecmp(pid1, pid2, fd1, fd2) ({ \ argument
306 _ret = __filecmp(pid1, pid2, fd1, fd2); \
/linux/arch/m68k/ifpsp060/
A Dftest.sa32 dc.l $42aefea0,$487b0170,$00000fd2,$61ff0000
/linux/kernel/
A Dauditsc.c2644 void __audit_fd_pair(int fd1, int fd2) in __audit_fd_pair() argument
2649 context->fds[1] = fd2; in __audit_fd_pair()
/linux/Documentation/admin-guide/
A Ddevices.txt52 2 = /dev/fd2 Controller 0, drive 2, autodetect

Completed in 61 milliseconds