Home
last modified time | relevance | path

Searched refs:pipefd (Results 1 – 23 of 23) sorted by relevance

/linux/tools/testing/selftests/net/af_unix/
A Dtest_unix_oob.c16 static int pipefd[2]; variable
125 wait_for_signal(pipefd[0]); in producer()
135 wait_for_signal(pipefd[0]); in producer()
140 wait_for_signal(pipefd[0]); in producer()
151 wait_for_signal(pipefd[0]); in producer()
165 wait_for_signal(pipefd[0]); in producer()
200 pipe(pipefd); in main()
211 signal_producer(pipefd[1]); in main()
217 signal_producer(pipefd[1]); in main()
234 signal_producer(pipefd[1]); in main()
[all …]
/linux/tools/testing/selftests/resctrl/
A Dcat_test.c104 int ret, pipefd[2], sibling_cpu_no; in cat_perf_miss_val() local
165 if (pipe(pipefd)) { in cat_perf_miss_val()
197 close(pipefd[0]); in cat_perf_miss_val()
199 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in cat_perf_miss_val()
201 close(pipefd[1]); in cat_perf_miss_val()
206 close(pipefd[1]); in cat_perf_miss_val()
211 close(pipefd[1]); in cat_perf_miss_val()
214 if (read(pipefd[0], &pipe_message, in cat_perf_miss_val()
220 close(pipefd[0]); in cat_perf_miss_val()
A Dresctrl_val.c598 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()
/linux/tools/testing/selftests/bpf/prog_tests/
A Dd_path.c32 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()
/linux/tools/testing/selftests/vm/
A Dmemfd_secret.c83 static void try_process_vm_read(int fd, int pipefd[2]) in try_process_vm_read()
89 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_process_vm_read()
107 static void try_ptrace(int fd, int pipefd[2]) in try_ptrace()
114 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_ptrace()
159 void (*func)(int fd, int pipefd[2])) in test_remote_access()
161 int pipefd[2]; in test_remote_access() local
165 if (pipe(pipefd)) { in test_remote_access()
177 func(fd, pipefd); in test_remote_access()
190 if (write(pipefd[1], &mem, sizeof(mem)) < 0) { in test_remote_access()
A Duserfaultfd.c94 static int uffd_flags, finished, *pipefd; variable
410 if (pipefd) { in uffd_test_ctx_clear()
412 if (close(pipefd[i])) in uffd_test_ctx_clear()
415 free(pipefd); in uffd_test_ctx_clear()
416 pipefd = NULL; in uffd_test_ctx_clear()
486 pipefd = malloc(sizeof(int) * nr_cpus * 2); in uffd_test_ctx_init()
487 if (!pipefd) in uffd_test_ctx_init()
722 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
868 if (write(pipefd[cpu*2+1], &c, 1) != 1) in stress()
1147 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in userfaultfd_events_test()
[all …]
/linux/tools/testing/selftests/powerpc/signal/
A Dsig_sc_double_restart.c83 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/perf_events/
A Dremove_on_exec.c124 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/fs/autofs/
A Dinode.c69 seq_printf(m, ",fd=%d", sbi->pipefd); in autofs_show_options()
138 int pipefd = -1; in parse_options() local
148 sbi->pipefd = -1; in parse_options()
162 if (match_int(args, &pipefd)) in parse_options()
164 sbi->pipefd = pipefd; in parse_options()
217 return (sbi->pipefd < 0); in parse_options()
238 sbi->pipefd = -1; in autofs_fill_super()
322 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super()
323 pipe = fget(sbi->pipefd); in autofs_fill_super()
A Ddev-ioctl.c342 int pipefd; in autofs_dev_ioctl_setpipefd() local
346 if (param->setpipefd.pipefd == -1) in autofs_dev_ioctl_setpipefd()
349 pipefd = param->setpipefd.pipefd; in autofs_dev_ioctl_setpipefd()
366 pipe = fget(pipefd); in autofs_dev_ioctl_setpipefd()
377 sbi->pipefd = pipefd; in autofs_dev_ioctl_setpipefd()
A Dautofs_i.h110 int pipefd; member
A Dwaitq.c41 sbi->pipefd = -1; in autofs_catatonic_mode()
/linux/tools/testing/selftests/kcmp/
A Dkcmp_test.c36 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()
/linux/tools/testing/selftests/arm64/fp/
A Dvec-syscfg.c76 int pipefd[2]; in get_child_rdvl() local
80 ret = pipe(pipefd); in get_child_rdvl()
93 close(pipefd[0]); in get_child_rdvl()
94 close(pipefd[1]); in get_child_rdvl()
104 ret = dup2(pipefd[1], 1); in get_child_rdvl()
118 close(pipefd[1]); in get_child_rdvl()
126 close(pipefd[0]); in get_child_rdvl()
135 close(pipefd[0]); in get_child_rdvl()
142 close(pipefd[0]); in get_child_rdvl()
146 out = fdopen(pipefd[0], "r"); in get_child_rdvl()
[all …]
/linux/tools/testing/selftests/kvm/
A Ddemand_paging_test.c126 int pipefd; member
134 int pipefd = uffd_args->pipefd; in uffd_handler_thread_fn() local
150 pollfd[1].fd = pipefd; in uffd_handler_thread_fn()
216 pthread_t *uffd_handler_thread, int pipefd, in setup_demand_paging() argument
263 uffd_args->pipefd = pipefd; in setup_demand_paging()
/linux/tools/testing/selftests/net/mptcp/
A Dmptcp_sockopt.c455 static void connect_one_server(int fd, int pipefd) in connect_one_server() argument
480 ret = read(pipefd, buf2, 4); in connect_one_server()
482 close(pipefd); in connect_one_server()
524 static void process_one_client(int fd, int pipefd) in process_one_client() argument
533 ret = write(pipefd, "xmit", 4); in process_one_client()
570 static int server(int pipefd) in server() argument
586 r = write(pipefd, "conn", 4); in server()
592 process_one_client(r, pipefd); in server()
597 static int client(int pipefd) in client() argument
614 connect_one_server(fd, pipefd); in client()
/linux/samples/watch_queue/
A Dwatch_test.c156 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/proc/
A Dproc-pid-vm.c258 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()
/linux/tools/perf/tests/
A Dcode-reading.c467 int pipefd[2]; in syscall_something() local
471 if (pipe(pipefd) < 0) { in syscall_something()
475 close(pipefd[1]); in syscall_something()
476 close(pipefd[0]); in syscall_something()
/linux/tools/testing/selftests/seccomp/
A Dseccomp_bpf.c1566 int pipefd[2]; in setup_trace_fixture() local
1571 ASSERT_EQ(0, pipe(pipefd)); in setup_trace_fixture()
1578 close(pipefd[0]); in setup_trace_fixture()
1583 close(pipefd[1]); in setup_trace_fixture()
1585 read(pipefd[0], &sync, 1); in setup_trace_fixture()
1586 close(pipefd[0]); in setup_trace_fixture()
2941 int pipefd[2]; in TEST() local
2975 ASSERT_EQ(0, pipe(pipefd)); in TEST()
3025 EXPECT_EQ(0, close(pipefd[0])); in TEST()
3207 int pipefd[2]; in TEST() local
[all …]
/linux/include/uapi/linux/
A Dauto_dev-ioctl.h50 __s32 pipefd; member
/linux/Documentation/filesystems/
A Dautofs-mount-control.rst307 the pipefd field of struct args_setpipefd set to descriptor of the pipe.
A Dautofs.rst498 in `setpipefd.pipefd` to re-establish communication with a daemon.

Completed in 58 milliseconds