/tools/testing/selftests/powerpc/signal/ |
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/resctrl/ |
D | cat_test.c | 125 int ret, pipefd[2], sibling_cpu_no; in cat_perf_miss_val() local 186 if (pipe(pipefd)) { in cat_perf_miss_val() 218 close(pipefd[0]); in cat_perf_miss_val() 220 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in cat_perf_miss_val() 222 close(pipefd[1]); in cat_perf_miss_val() 227 close(pipefd[1]); in cat_perf_miss_val() 232 close(pipefd[1]); in cat_perf_miss_val() 235 if (read(pipefd[0], &pipe_message, in cat_perf_miss_val() 241 close(pipefd[0]); in cat_perf_miss_val()
|
D | resctrl_val.c | 598 int ret = 0, pipefd[2]; in resctrl_val() local 622 if (pipe(pipefd)) { in resctrl_val() 655 close(pipefd[0]); in resctrl_val() 657 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in resctrl_val() 660 close(pipefd[1]); in resctrl_val() 663 close(pipefd[1]); in resctrl_val() 713 close(pipefd[1]); in resctrl_val() 715 if (read(pipefd[0], &pipe_message, sizeof(pipe_message)) < in resctrl_val() 718 close(pipefd[0]); in resctrl_val() 722 close(pipefd[0]); in resctrl_val()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | d_path.c | 32 int pipefd[2] = { -1, -1 }; in trigger_fstat_events() local 37 if (CHECK(pipe(pipefd) < 0, "trigger", "pipe failed\n")) in trigger_fstat_events() 59 ret = set_pathname(pipefd[0], pid); in trigger_fstat_events() 62 ret = set_pathname(pipefd[1], pid); in trigger_fstat_events() 82 fstat(pipefd[0], &fileStat); in trigger_fstat_events() 83 fstat(pipefd[1], &fileStat); in trigger_fstat_events() 92 close(pipefd[0]); in trigger_fstat_events() 93 close(pipefd[1]); in trigger_fstat_events()
|
/tools/testing/selftests/kcmp/ |
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() 143 ret = sys_kcmp(pid1, pid1, KCMP_EPOLL_TFD, pipefd[1], in main()
|
/tools/testing/selftests/kvm/ |
D | demand_paging_test.c | 113 int pipefd; member 121 int pipefd = uffd_args->pipefd; in uffd_handler_thread_fn() local 137 pollfd[1].fd = pipefd; in uffd_handler_thread_fn() 203 pthread_t *uffd_handler_thread, int pipefd, in setup_demand_paging() argument 240 uffd_args->pipefd = pipefd; in setup_demand_paging()
|
/tools/testing/selftests/vm/ |
D | userfaultfd.c | 92 static int uffd_flags, finished, *pipefd; variable 381 if (pipefd) { in uffd_test_ctx_clear() 383 if (close(pipefd[i])) in uffd_test_ctx_clear() 386 free(pipefd); in uffd_test_ctx_clear() 387 pipefd = NULL; in uffd_test_ctx_clear() 457 pipefd = malloc(sizeof(int) * nr_cpus * 2); in uffd_test_ctx_init_ext() 458 if (!pipefd) in uffd_test_ctx_init_ext() 461 if (pipe2(&pipefd[cpu * 2], O_CLOEXEC | O_NONBLOCK)) in uffd_test_ctx_init_ext() 704 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread() 850 if (write(pipefd[cpu*2+1], &c, 1) != 1) in stress() [all …]
|
/tools/testing/selftests/proc/ |
D | proc-pid-vm.c | 258 int pipefd[2]; in main() local 275 if (pipe(pipefd) == -1) { in main() 278 if (dup2(pipefd[1], 0) != 0) { in main() 292 if (read(pipefd[0], &_, 1) != 1) { in main()
|
/tools/perf/tests/ |
D | code-reading.c | 475 int pipefd[2]; in syscall_something() local 479 if (pipe(pipefd) < 0) { in syscall_something() 483 close(pipefd[1]); in syscall_something() 484 close(pipefd[0]); in syscall_something()
|
/tools/testing/selftests/seccomp/ |
D | seccomp_bpf.c | 1562 int pipefd[2]; in setup_trace_fixture() local 1567 ASSERT_EQ(0, pipe(pipefd)); in setup_trace_fixture() 1574 close(pipefd[0]); in setup_trace_fixture() 1575 start_tracer(_metadata, pipefd[1], tracee, func, args, in setup_trace_fixture() 1579 close(pipefd[1]); in setup_trace_fixture() 1581 read(pipefd[0], &sync, 1); in setup_trace_fixture() 1582 close(pipefd[0]); in setup_trace_fixture() 2937 int pipefd[2]; in TEST() local 2971 ASSERT_EQ(0, pipe(pipefd)); in TEST() 2984 EXPECT_EQ(0, close(pipefd[1])); in TEST() [all …]
|