Home
last modified time | relevance | path

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

12

/linux-6.15/tools/testing/selftests/mm/
H A Dmrelease_test.c36 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 …]
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()
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 …]
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_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()
H A Duffd-common.h103 extern int uffd, uffd_flags, finished, *pipefd, test_type;
H A Duffd-unit-tests.c605 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()
1076 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_poison_test()
1202 if (write(pipefd[1], &c, sizeof(c)) != sizeof(c)) in uffd_move_test_common()
/linux-6.15/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-6.15/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-6.15/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-6.15/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-6.15/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 …]
H A Dfp-stress.c65 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()
/linux-6.15/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-6.15/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-6.15/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-6.15/tools/testing/selftests/arm64/gcs/
H A Dgcs-stress.c61 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()
/linux-6.15/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-6.15/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()
/linux-6.15/tools/testing/selftests/exec/
H A Dcheck-exec.c73 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()
/linux-6.15/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-6.15/tools/include/nolibc/
H A Dsys.h826 int sys_pipe2(int pipefd[2], int flags) in sys_pipe2()
828 return my_syscall2(__NR_pipe2, pipefd, flags); in sys_pipe2()
832 int pipe2(int pipefd[2], int flags) in pipe2()
834 return __sysret(sys_pipe2(pipefd, flags)); in pipe2()
838 int pipe(int pipefd[2]) in pipe()
840 return pipe2(pipefd, 0); in pipe()
/linux-6.15/tools/perf/tests/
H A Dcode-reading.c582 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()
/linux-6.15/tools/testing/selftests/nolibc/
H A Dnolibc-test.c986 int pipefd[2]; in test_pipe() local
990 if (pipe(pipefd) == -1) in test_pipe()
993 write(pipefd[1], msg, strlen(msg)); in test_pipe()
994 close(pipefd[1]); in test_pipe()
995 len = read(pipefd[0], buf, sizeof(buf)); in test_pipe()
996 close(pipefd[0]); in test_pipe()
1298 int ret, pipefd[2]; in expect_vfprintf() local
1304 ret = pipe(pipefd); in expect_vfprintf()
1311 memfile = fdopen(pipefd[1], "w"); in expect_vfprintf()
1329 r = read(pipefd[0], buf, sizeof(buf) - 1); in expect_vfprintf()
/linux-6.15/tools/testing/selftests/seccomp/
H A Dseccomp_bpf.c1602 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()
3022 int pipefd[2]; in TEST() local
3056 ASSERT_EQ(0, pipe(pipefd)); in TEST()
3106 EXPECT_EQ(0, close(pipefd[0])); in TEST()
3288 int pipefd[2]; in TEST() local
[all …]
/linux-6.15/include/uapi/linux/
H A Dauto_dev-ioctl.h50 __s32 pipefd; member

12