Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/mm/
H A Dmrelease_test.c20 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 Dmemfd_secret.c91 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()
126 static void try_process_vm_read(int fd, int pipefd[2]) in try_process_vm_read()
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()
202 void (*func)(int fd, int pipefd[2])) in test_remote_access()
[all …]
H A Duffd-common.c15 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 Duffd-common.h103 extern int uffd, uffd_flags, finished, *pipefd, test_type;
H A Duffd-unit-tests.c602 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_minor_test_common()
813 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_sigbus_test_common()
866 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_events_test_common()
1073 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_poison_test()
1199 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_move_test_common()
H A Duffd-stress.c229 if (write(pipefd[cpu*2+1], &c, 1) != 1) in stress()
/linux/tools/testing/selftests/net/af_unix/
H A Dtest_unix_oob.c
/linux/tools/testing/selftests/powerpc/signal/
H 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/bpf/prog_tests/
H A Dd_path.c45 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 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/tools/testing/selftests/kcmp/
H 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()
146 ret = sys_kcmp(pid1, pid1, KCMP_EPOLL_TFD, pipefd[1], in main()
/linux/tools/testing/selftests/arm64/fp/
H A Dvec-syscfg.c92 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 …]
/linux/tools/testing/selftests/powerpc/dexcr/
H A Dhashchk_test.c126 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/riscv/abi/
H A Dpointer_masking.c23 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()
/linux/samples/watch_queue/
H 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/net/mptcp/
H A Dmptcp_sockopt.c560 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 Ddev-ioctl.c347 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 Dinode.c71 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 Dautofs_i.h114 int pipefd; member
H A Dwaitq.c42 sbi->pipefd = -1; in autofs_catatonic_mode()
/linux/tools/perf/tests/
H A Dcode-reading.c576 int pipefd[2]; in do_test_code_reading()
580 if (pipe(pipefd) < 0) { in do_test_code_reading()
584 close(pipefd[1]); in do_test_code_reading()
585 close(pipefd[0]); in do_test_code_reading()
486 int pipefd[2]; syscall_something() local
/linux/tools/testing/selftests/proc/
H A Dproc-pid-vm.c286 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/testing/selftests/seccomp/
H A Dseccomp_bpf.c1596 int pipefd[2]; in setup_trace_fixture() local
1601 ASSERT_EQ(0, pipe(pipefd)); in setup_trace_fixture()
1608 close(pipefd[0]); in setup_trace_fixture()
1609 start_tracer(_metadata, pipefd[1], tracee, func, args, in setup_trace_fixture()
1613 close(pipefd[1]); in setup_trace_fixture()
1615 read(pipefd[0], &sync, 1); in setup_trace_fixture()
1616 close(pipefd[0]); in setup_trace_fixture()
3016 int pipefd[2]; in TEST() local
3050 ASSERT_EQ(0, pipe(pipefd)); in TEST()
3063 EXPECT_EQ(0, close(pipefd[1])); in TEST()
[all …]
/linux/include/uapi/linux/
H A Dauto_dev-ioctl.h50 __s32 pipefd; member
/linux/Documentation/filesystems/
H A Dautofs-mount-control.rst307 the pipefd field of struct args_setpipefd set to descriptor of the pipe.