/linux/tools/testing/selftests/mm/ |
H A D | mrelease_test.c | 20 static int alloc_noexit(unsigned long nr_pages, int pipefd) in alloc_noexit() argument 36 if (write(pipefd, "", 1) < 0) in alloc_noexit() 66 static int child_main(int pipefd[], size_t size) in child_main() argument 71 close(pipefd[0]); in child_main() 72 res = alloc_noexit(MB(size) / psize(), pipefd[1]); in child_main() 73 close(pipefd[1]); in child_main() 79 int pipefd[2], pidfd; in main() local 107 if (pipe(pipefd)) in main() 112 close(pipefd[0]); in main() 113 close(pipefd[1]); in main() [all …]
|
H A D | memfd_secret.c | 89 int pipefd[2]; in test_vmsplice() local 92 if (pipe(pipefd)) { in test_vmsplice() 111 transferred = vmsplice(pipefd[1], &iov, 1, 0); in test_vmsplice() 120 close(pipefd[0]); in test_vmsplice() 121 close(pipefd[1]); in test_vmsplice() 124 static void try_process_vm_read(int fd, int pipefd[2]) in try_process_vm_read() 130 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_process_vm_read() 148 static void try_ptrace(int fd, int pipefd[2]) in try_ptrace() 155 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_ptrace() 200 void (*func)(int fd, int pipefd[2])) in test_remote_access() [all …]
|
H A D | uffd-common.c | 15 int uffd = -1, uffd_flags, finished, *pipefd, test_type; variable 271 if (pipefd) { in uffd_test_ctx_clear() 273 if (close(pipefd[i])) in uffd_test_ctx_clear() 276 free(pipefd); in uffd_test_ctx_clear() 277 pipefd = NULL; in uffd_test_ctx_clear() 368 pipefd = malloc(sizeof(int) * nr_cpus * 2); in uffd_test_ctx_init() 369 if (!pipefd) in uffd_test_ctx_init() 372 if (pipe2(&pipefd[cpu * 2], O_CLOEXEC | O_NONBLOCK)) in uffd_test_ctx_init() 519 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
|
H A D | uffd-common.h | 103 extern int uffd, uffd_flags, finished, *pipefd, test_type;
|
H A D | uffd-unit-tests.c | 601 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_minor_test_common() 812 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_sigbus_test_common() 865 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_events_test_common() 1072 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_poison_test() 1198 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_move_test_common()
|
/linux/tools/testing/selftests/net/af_unix/ |
H A D | test_unix_oob.c |
|
/linux/tools/testing/selftests/powerpc/signal/ |
H A D | sig_sc_double_restart.c | 83 int pipefd[2]; in test_restart() local 87 if (pipe(pipefd) == -1) { in test_restart() 120 while ((fd = dup(pipefd[0])) != 512) { in test_restart() 149 if (write(pipefd[1], DATA, DLEN) != DLEN) { in test_restart() 153 close(pipefd[0]); in test_restart() 154 close(pipefd[1]); in test_restart()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | d_path.c | 45 int pipefd[2] = { -1, -1 }; in trigger_fstat_events() local 50 if (CHECK(pipe(pipefd) < 0, "trigger", "pipe failed\n")) in trigger_fstat_events() 72 ret = set_pathname(pipefd[0], pid); in trigger_fstat_events() 75 ret = set_pathname(pipefd[1], pid); in trigger_fstat_events() 95 fstat(pipefd[0], &fileStat); in trigger_fstat_events() 96 fstat(pipefd[1], &fileStat); in trigger_fstat_events() 109 close(pipefd[0]); in trigger_fstat_events() 110 close(pipefd[1]); in trigger_fstat_events()
|
/linux/tools/testing/selftests/perf_events/ |
H A D | remove_on_exec.c | 124 int pipefd[2]; in TEST_F() local 138 ASSERT_NE(pipe(pipefd), -1); in TEST_F() 141 ASSERT_NE(dup2(pipefd[1], STDOUT_FILENO), -1); in TEST_F() 142 close(pipefd[0]); in TEST_F() 146 close(pipefd[1]); in TEST_F() 150 EXPECT_EQ(read(pipefd[0], &tmp, sizeof(int)), sizeof(int)); in TEST_F() 152 close(pipefd[0]); in TEST_F()
|
/linux/tools/testing/selftests/kcmp/ |
H A D | kcmp_test.c | 36 int pipefd[2]; in main() local 50 if (pipe(pipefd)) { in main() 64 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, pipefd[0], &ev)) { in main() 69 fddup = dup2(pipefd[1], duped_num); in main() 146 ret = sys_kcmp(pid1, pid1, KCMP_EPOLL_TFD, pipefd[1], in main()
|
/linux/tools/testing/selftests/arm64/fp/ |
H A D | vec-syscfg.c | 92 int pipefd[2]; in get_child_rdvl() local 96 ret = pipe(pipefd); in get_child_rdvl() 109 close(pipefd[0]); in get_child_rdvl() 110 close(pipefd[1]); in get_child_rdvl() 120 ret = dup2(pipefd[1], 1); in get_child_rdvl() 134 close(pipefd[1]); in get_child_rdvl() 142 close(pipefd[0]); in get_child_rdvl() 151 close(pipefd[0]); in get_child_rdvl() 158 close(pipefd[0]); in get_child_rdvl() 162 out = fdopen(pipefd[0], "r"); in get_child_rdvl() [all …]
|
H A D | fp-stress.c | 62 int ret, pipefd[2], i; in child_start() local 65 ret = pipe(pipefd); in child_start() 80 ret = dup2(pipefd[1], 1); in child_start() 127 close(pipefd[1]); in child_start() 128 child->stdout = pipefd[0]; in child_start()
|
/linux/tools/testing/selftests/powerpc/dexcr/ |
H A D | hashchk_test.c | 126 int pipefd[2]; in hashchk_exec_random_key_test() local 132 FAIL_IF_MSG(pipe(pipefd), "failed to create pipe"); in hashchk_exec_random_key_test() 136 if (dup2(pipefd[1], STDOUT_FILENO) == -1) in hashchk_exec_random_key_test() 144 FAIL_IF_MSG(read(pipefd[0], hash_values, sizeof(hash_values)) != sizeof(hash_values), in hashchk_exec_random_key_test()
|
/linux/tools/testing/selftests/resctrl/ |
H A D | resctrl_val.c | 688 int ret = 0, pipefd[2]; in resctrl_val() local 708 if (pipe(pipefd)) { in resctrl_val() 744 close(pipefd[0]); in resctrl_val() 746 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in resctrl_val() 749 close(pipefd[1]); in resctrl_val() 752 close(pipefd[1]); in resctrl_val() 788 close(pipefd[1]); in resctrl_val() 790 if (read(pipefd[0], &pipe_message, sizeof(pipe_message)) < in resctrl_val() 793 close(pipefd[0]); in resctrl_val() 797 close(pipefd[0]); in resctrl_val()
|
/linux/samples/watch_queue/ |
H A D | watch_test.c | 156 int pipefd[2], fd; in main() local 158 if (pipe2(pipefd, O_NOTIFICATION_PIPE) == -1) { in main() 162 fd = pipefd[0]; in main()
|
/linux/tools/testing/selftests/net/mptcp/ |
H A D | mptcp_sockopt.c | 560 static void connect_one_server(int fd, int pipefd) in connect_one_server() argument 585 ret = read(pipefd, buf2, 4); in connect_one_server() 587 close(pipefd); in connect_one_server() 629 static void process_one_client(int fd, int pipefd) in process_one_client() argument 638 ret = write(pipefd, "xmit", 4); in process_one_client() 692 static int server(int pipefd) in server() argument 708 r = write(pipefd, "conn", 4); in server() 714 process_one_client(r, pipefd); in server() 757 static int client(int pipefd) in client() argument 776 connect_one_server(fd, pipefd); in client()
|
/linux/fs/autofs/ |
H A D | dev-ioctl.c | 347 int pipefd; in autofs_dev_ioctl_setpipefd() local 351 if (param->setpipefd.pipefd == -1) in autofs_dev_ioctl_setpipefd() 354 pipefd = param->setpipefd.pipefd; in autofs_dev_ioctl_setpipefd() 371 pipe = fget(pipefd); in autofs_dev_ioctl_setpipefd() 382 sbi->pipefd = pipefd; in autofs_dev_ioctl_setpipefd()
|
H A D | inode.c | 71 seq_printf(m, ",fd=%d", sbi->pipefd); in autofs_show_options() 186 sbi->pipefd = result->uint_32; in autofs_parse_fd() 253 sbi->pipefd = -1; in autofs_alloc_sbi() 356 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super() 374 if (sbi->pipefd < 0) in autofs_get_tree()
|
H A D | autofs_i.h | 114 int pipefd; member
|
/linux/tools/perf/tests/ |
H A D | code-reading.c | 486 int pipefd[2]; in syscall_something() local 490 if (pipe(pipefd) < 0) { in syscall_something() 494 close(pipefd[1]); in syscall_something() 495 close(pipefd[0]); in syscall_something()
|
/linux/tools/testing/selftests/proc/ |
H A D | proc-pid-vm.c | 286 int pipefd[2]; in main() local 316 if (pipe(pipefd) == -1) { in main() 319 if (dup2(pipefd[1], 0) != 0) { in main() 333 if (read(pipefd[0], &_, 1) != 1) { in main()
|
/linux/tools/include/nolibc/ |
H A D | sys.h | 784 int sys_pipe2(int pipefd[2], int flags) in sys_pipe2() 786 return my_syscall2(__NR_pipe2, pipefd, flags); in sys_pipe2() 790 int pipe2(int pipefd[2], int flags) in pipe2() 792 return __sysret(sys_pipe2(pipefd, flags)); in pipe2() 796 int pipe(int pipefd[2]) in pipe() 798 return pipe2(pipefd, 0); in pipe()
|
/linux/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 1591 int pipefd[2]; in setup_trace_fixture() local 1596 ASSERT_EQ(0, pipe(pipefd)); in setup_trace_fixture() 1603 close(pipefd[0]); in setup_trace_fixture() 1604 start_tracer(_metadata, pipefd[1], tracee, func, args, in setup_trace_fixture() 1608 close(pipefd[1]); in setup_trace_fixture() 1610 read(pipefd[0], &sync, 1); in setup_trace_fixture() 1611 close(pipefd[0]); in setup_trace_fixture() 3011 int pipefd[2]; in TEST() local 3045 ASSERT_EQ(0, pipe(pipefd)); in TEST() 3058 EXPECT_EQ(0, close(pipefd[1])); in TEST() [all …]
|
/linux/include/uapi/linux/ |
H A D | auto_dev-ioctl.h | 50 __s32 pipefd; member
|
/linux/tools/testing/selftests/nolibc/ |
H A D | nolibc-test.c | 938 int pipefd[2]; in test_pipe() local 942 if (pipe(pipefd) == -1) in test_pipe() 945 write(pipefd[1], msg, strlen(msg)); in test_pipe() 946 close(pipefd[1]); in test_pipe() 947 len = read(pipefd[0], buf, sizeof(buf)); in test_pipe() 948 close(pipefd[0]); in test_pipe()
|