Home
last modified time | relevance | path

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

12

/openbmc/linux/tools/testing/selftests/powerpc/ptrace/
H A Dperf-hwbreak.c406 int fd1, fd2; in test_process_multi_diff_addr() local
437 close(fd2); in test_process_multi_diff_addr()
451 int fd1, fd2; in test_process_multi_same_addr() local
482 close(fd2); in test_process_multi_same_addr()
496 int fd1, fd2; in test_process_multi_diff_addr_ro_wo() local
527 close(fd2); in test_process_multi_diff_addr_ro_wo()
572 close(fd2); in test_process_multi_same_addr_ro_wo()
616 free(fd2); in test_syswide_multi_diff_addr()
660 free(fd2); in test_syswide_multi_same_addr()
704 free(fd2); in test_syswide_multi_diff_addr_ro_wo()
[all …]
/openbmc/linux/tools/testing/selftests/net/
H A 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()
H A 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()
H A 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()
H A 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()
405 attach_cbpf(fd2, 10); in test_filter_without_bind()
[all …]
H A Dreuseaddr_conflict.c89 int fd1, fd2; in main() local
104 fd2 = open_port(0, 1); in main()
105 if (fd2 >= 0) in main()
/openbmc/phosphor-power/test/
H A Dfile_descriptor_tests.cpp105 FileDescriptor descriptor2{fd2}; in TEST()
106 EXPECT_EQ(descriptor2(), fd2); in TEST()
107 EXPECT_TRUE(isValid(fd2)); in TEST()
113 EXPECT_EQ(descriptor1(), fd2); in TEST()
122 EXPECT_TRUE(isValid(fd2)); in TEST()
259 descriptor.set(fd2); in TEST()
260 EXPECT_EQ(descriptor(), fd2); in TEST()
262 EXPECT_TRUE(isValid(fd2)); in TEST()
265 EXPECT_EQ(descriptor(), fd2); in TEST()
266 EXPECT_TRUE(isValid(fd2)); in TEST()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A 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()
H A Dtc_opts.c18 __u32 fd1, fd2, id1, id2; in serial_test_tc_opts_basic() local
31 id2 = id_from_prog_fd(fd2); in serial_test_tc_opts_basic()
178 .relative_fd = fd2, in test_tc_opts_before_target()
713 detach_fd = fd2; in test_tc_opts_replace_target()
747 .replace_prog_fd = fd2, in test_tc_opts_replace_target()
790 detach_fd = fd2; in test_tc_opts_replace_target()
920 .relative_fd = fd2, in test_tc_opts_invalid_target()
929 .relative_fd = fd2, in test_tc_opts_invalid_target()
1895 .relative_fd = fd2, in test_tc_opts_detach_before_target()
1919 .relative_fd = fd2, in test_tc_opts_detach_before_target()
[all …]
H A Dxdp_dev_bound_only.c30 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()
H A Dxdp_attach.c13 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()
/openbmc/linux/tools/perf/tests/
H 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()
/openbmc/linux/tools/testing/selftests/filelock/
H A Dofdlocks.c40 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()
/openbmc/gpioplus/test/internal/
H A Dfd.cpp129 Fd fd2(fd); in TEST_F() local
130 EXPECT_EQ(expected_fd2, *fd2); in TEST_F()
152 Fd fd2(expected_fd2, std::false_type(), &mock2); in TEST_F() local
155 fd2 = fd; in TEST_F()
156 EXPECT_EQ(expected_fd3, *fd2); in TEST_F()
157 EXPECT_EQ(&mock, fd2.getSys()); in TEST_F()
171 Fd fd2(std::move(fd)); in TEST_F() local
172 EXPECT_EQ(expected_fd, *fd2); in TEST_F()
196 fd2 = std::move(fd); in TEST_F()
197 EXPECT_EQ(expected_fd, *fd2); in TEST_F()
[all …]
/openbmc/linux/tools/testing/selftests/kcmp/
H 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
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()
/openbmc/linux/tools/testing/selftests/memfd/
H A Dmemfd_test.c572 int r, fd2; in mfd_assert_shrink() local
585 close(fd2); in mfd_assert_shrink()
954 int fd, fd2; in test_seal_future_write() local
977 mfd_assert_read(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
1456 close(fd2); in test_share_dup()
1503 int fd, fd2; in test_share_open() local
1528 close(fd2); in test_share_open()
[all …]
/openbmc/linux/tools/testing/selftests/proc/
H 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()
/openbmc/linux/tools/testing/selftests/core/
H A Dclose_range_test.c399 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()
491 fd2 = dup2(fd1, 1000); in TEST()
492 EXPECT_GT(fd2, 0); in TEST()
514 flags = fcntl(fd2, F_GETFD); in TEST()
530 EXPECT_EQ(close(fd2), 0); in TEST()
550 flags = fcntl(fd2, F_GETFD); in TEST()
[all …]
/openbmc/linux/tools/testing/selftests/sync/
H A Dsync.c68 int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
73 data.fd2 = fd2; in sync_merge()
H A Dsync.h36 int sync_merge(const char *name, int fd1, int fd2);
/openbmc/openbmc/poky/meta/recipes-extended/mdadm/files/
H A D0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch48 - seek_res = lseek64(source[fd2],
49 + seek_res = lseek(source[fd2],
50 offsets[fd2] + start * chunk_size, SEEK_SET);
/openbmc/linux/include/uapi/linux/
H A Dsync_file.h32 __s32 fd2; member
/openbmc/linux/Documentation/powerpc/
H 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 …]
/openbmc/linux/scripts/kconfig/
H 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()
/openbmc/linux/include/linux/
H A Daudit.h408 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

12