| /tools/testing/selftests/mm/ |
| A D | mrelease_test.c | 36 if (write(pipefd, "", 1) < 0) in alloc_noexit() 71 close(pipefd[0]); 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() 119 res = child_main(pipefd, size); in main() 127 close(pipefd[1]); in main() 129 res = read(pipefd[0], &byte, 1); in main() [all …]
|
| A D | memfd_secret.c | 91 int pipefd[2]; in test_vmsplice() local 94 if (pipe(pipefd)) { in test_vmsplice() 113 transferred = vmsplice(pipefd[1], &iov, 1, 0); in test_vmsplice() 122 close(pipefd[0]); in test_vmsplice() 123 close(pipefd[1]); in test_vmsplice() 132 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_process_vm_read() 150 static void try_ptrace(int fd, int pipefd[2]) in try_ptrace() 157 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_ptrace() 204 int pipefd[2]; in test_remote_access() local 208 if (pipe(pipefd)) { in test_remote_access() [all …]
|
| 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_parallel * 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()
|
| A D | uffd-common.h | 103 extern int uffd, uffd_flags, finished, *pipefd, test_type;
|
| A D | uffd-unit-tests.c | 605 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_minor_test_common() 816 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_sigbus_test_common() 869 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_events_test_common() 1084 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_poison_test() 1210 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_move_test_common()
|
| A D | uffd-stress.c | 229 if (write(pipefd[cpu*2+1], &c, 1) != 1) in stress()
|
| /tools/testing/selftests/powerpc/signal/ |
| 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()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| 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()
|
| /tools/testing/selftests/perf_events/ |
| 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()
|
| /tools/testing/selftests/kcmp/ |
| 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()
|
| /tools/testing/selftests/powerpc/dexcr/ |
| 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()
|
| /tools/testing/selftests/arm64/fp/ |
| 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 …]
|
| A D | fp-stress.c | 65 int ret, pipefd[2], i; in child_start() local 68 ret = pipe(pipefd); in child_start() 83 ret = dup2(pipefd[1], 1); in child_start() 129 close(pipefd[1]); in child_start() 130 child->stdout = pipefd[0]; in child_start()
|
| /tools/testing/selftests/riscv/abi/ |
| A D | pointer_masking.c | 23 static int pipefd[2]; variable 247 ret = write(pipefd[1], p, sizeof(*p)); in test_tagged_addr_abi_pmlen() 263 ret = write(pipefd[1], p, sizeof(*p)); in test_tagged_addr_abi_pmlen() 285 ret = write(pipefd[1], p, sizeof(*p)); in test_tagged_addr_abi_pmlen() 333 ret = pipe(pipefd); in main()
|
| /tools/testing/selftests/arm64/gcs/ |
| A D | gcs-stress.c | 61 int ret, pipefd[2], i; in start_thread() local 64 ret = pipe(pipefd); in start_thread() 79 ret = dup2(pipefd[1], 1); in start_thread() 126 close(pipefd[1]); in start_thread() 127 child->stdout = pipefd[0]; in start_thread()
|
| /tools/testing/selftests/net/mptcp/ |
| A D | mptcp_sockopt.c | 568 static void connect_one_server(int fd, int pipefd) in connect_one_server() argument 593 ret = read(pipefd, buf2, 4); in connect_one_server() 595 close(pipefd); in connect_one_server() 637 static void process_one_client(int fd, int pipefd) in process_one_client() argument 646 ret = write(pipefd, "xmit", 4); in process_one_client() 700 static int server(int pipefd) in server() argument 716 r = write(pipefd, "conn", 4); in server() 722 process_one_client(r, pipefd); in server() 765 static int client(int pipefd) in client() argument 784 connect_one_server(fd, pipefd); in client()
|
| /tools/testing/selftests/exec/ |
| A D | check-exec.c | 73 int memfd, pipefd; in FIXTURE() local 164 self->pipefd = open(procfd_path, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP() 165 ASSERT_LE(0, self->pipefd); in FIXTURE_SETUP() 166 ASSERT_EQ(0, fchmod(self->pipefd, variant->file_exec ? 0700 : 0600)); in FIXTURE_SETUP() 319 test_exec_fd(_metadata, self->pipefd, EACCES); in TEST_F()
|
| /tools/include/nolibc/ |
| A D | sys.h | 708 int sys_pipe2(int pipefd[2], int flags) in sys_pipe2() 710 return my_syscall2(__NR_pipe2, pipefd, flags); in sys_pipe2() 714 int pipe2(int pipefd[2], int flags) in pipe2() 716 return __sysret(sys_pipe2(pipefd, flags)); in pipe2() 720 int pipe(int pipefd[2]) in pipe() 722 return pipe2(pipefd, 0); in pipe()
|
| /tools/testing/selftests/proc/ |
| 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()
|
| /tools/perf/tests/ |
| A D | code-reading.c | 582 int pipefd[2]; in syscall_something() local 586 if (pipe(pipefd) < 0) { in syscall_something() 590 close(pipefd[1]); in syscall_something() 591 close(pipefd[0]); in syscall_something()
|
| /tools/testing/selftests/seccomp/ |
| A D | seccomp_bpf.c | 1602 int pipefd[2]; in setup_trace_fixture() local 1607 ASSERT_EQ(0, pipe(pipefd)); in setup_trace_fixture() 1614 close(pipefd[0]); in setup_trace_fixture() 1619 close(pipefd[1]); in setup_trace_fixture() 1621 read(pipefd[0], &sync, 1); in setup_trace_fixture() 1622 close(pipefd[0]); in setup_trace_fixture() 3016 int pipefd[2]; in TEST() local 3050 ASSERT_EQ(0, pipe(pipefd)); in TEST() 3100 EXPECT_EQ(0, close(pipefd[0])); in TEST() 3285 int pipefd[2]; in TEST() local [all …]
|
| /tools/testing/selftests/nolibc/ |
| A D | nolibc-test.c | 1145 int pipefd[2]; in test_pipe() local 1149 if (pipe(pipefd) == -1) in test_pipe() 1152 write(pipefd[1], msg, strlen(msg)); in test_pipe() 1153 close(pipefd[1]); in test_pipe() 1154 len = read(pipefd[0], buf, sizeof(buf)); in test_pipe() 1155 close(pipefd[0]); in test_pipe()
|