Home
last modified time | relevance | path

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

/tools/testing/selftests/kcmp/
Dkcmp_test.c22 static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2) in sys_kcmp() argument
24 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp()
31 int fd1, fd2; in main() local
52 fd2 = open(kpath, O_RDWR, 0644); in main()
53 if (fd2 < 0) { in main()
63 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
/tools/perf/tests/
Dbp_signal.c31 static int fd2; variable
80 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2()
101 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler()
241 fd2 = bp_event(sig_handler, SIGUSR1); in test__bp_signal()
245 ioctl(fd2, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal()
255 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal()
259 count2 = bp_count(fd2); in test__bp_signal()
263 close(fd2); in test__bp_signal()
/tools/testing/selftests/memfd/
Dmemfd_test.c391 int r, fd2; in mfd_assert_shrink() local
401 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
404 close(fd2); in mfd_assert_shrink()
734 int fd, fd2; in test_share_dup() local
741 fd2 = mfd_assert_dup(fd); in test_share_dup()
742 mfd_assert_has_seals(fd2, 0); in test_share_dup()
746 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_dup()
748 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_dup()
750 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup()
754 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup()
[all …]
/tools/testing/selftests/powerpc/context_switch/
Dcp_abort.c70 int fd1[2], fd2[2], pid; in test_cp_abort() local
84 FAIL_IF(pipe(fd1) || pipe(fd2)); in test_cp_abort()
92 FAIL_IF((read(fd2[READ_FD], &c, 1)) != 1); in test_cp_abort()
100 FAIL_IF((write(fd2[WRITE_FD], &c, 1) != 1)); in test_cp_abort()
/tools/testing/selftests/net/
Dreuseport_bpf.c307 int fd1, fd2, opt; in test_extra_filter() local
313 fd2 = socket(p.recv_family, p.protocol, 0); in test_extra_filter()
314 if (fd2 < 0) in test_extra_filter()
320 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
324 attach_ebpf(fd2, 10); in test_extra_filter()
329 if (!bind(fd2, addr, sockaddr_size()) && errno != EADDRINUSE) in test_extra_filter()
388 int fd1, fd2, opt = 1; in test_filter_without_bind() local
394 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind()
395 if (fd2 < 0) in test_filter_without_bind()
399 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
[all …]