Home
last modified time | relevance | path

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

123

/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dmrelease_test.c20 static int alloc_noexit(unsigned long nr_pages, int pipefd) in alloc_noexit() argument
38 if (write(pipefd, "", 1) < 0) { in alloc_noexit()
76 static int child_main(int pipefd[], size_t size) in child_main() argument
81 close(pipefd[0]); in child_main()
82 res = alloc_noexit(MB(size) / psize(), pipefd[1]); in child_main()
83 close(pipefd[1]); in child_main()
89 int pipefd[2], pidfd; in main() local
110 if (pipe(pipefd)) { in main()
117 close(pipefd[0]); in main()
118 close(pipefd[ in main()
[all...]
H A Dmemfd_secret.c86 static void try_process_vm_read(int fd, int pipefd[2]) in try_process_vm_read() argument
92 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_process_vm_read()
110 static void try_ptrace(int fd, int pipefd[2]) in try_ptrace() argument
117 if (read(pipefd[0], &mem, sizeof(mem)) < 0) { in try_ptrace()
162 void (*func)(int fd, int pipefd[2])) in test_remote_access()
164 int pipefd[2]; in test_remote_access() local
168 if (pipe(pipefd)) { in test_remote_access()
180 func(fd, pipefd); in test_remote_access()
193 if (write(pipefd[1], &mem, sizeof(mem)) < 0) { in test_remote_access()
161 test_remote_access(int fd, const char *name, void (*func)(int fd, int pipefd[2])) test_remote_access() argument
/kernel/liteos_a/testsuites/unittest/extended/signal/smoke/
H A Dpipe_test_002.cpp38 int pipefd[2]; // 2, array subscript in TestPipeMultiProcess() local
41 retValue = pipe(pipefd); in TestPipeMultiProcess()
44 int *readFd = &pipefd[0]; in TestPipeMultiProcess()
45 int *writeFd = &pipefd[1]; in TestPipeMultiProcess()
65 close(pipefd[0]); in TestPipeMultiProcess()
77 ret = close(pipefd[1]); in TestPipeMultiProcess()
81 close(pipefd[1]); in TestPipeMultiProcess()
100 ret = close(pipefd[0]); in TestPipeMultiProcess()
H A DIt_ipc_pipe_004.cpp37 int pipefd[2]; // 2, array subscript in TestCase() local
38 int retValue = pipe2(pipefd, O_CLOEXEC); in TestCase()
41 int *readFd = &pipefd[0]; in TestCase()
42 int *writeFd = &pipefd[1]; in TestCase()
78 ret = close(pipefd[0]); in TestCase()
82 ret = close(pipefd[1]); in TestCase()
H A DIt_ipc_pipe_005.cpp35 int pipefd[2]; // 2, array subscript in TestCase() local
37 int ret = pipe2(pipefd, -1); in TestCase()
40 pipefd[0] = 2; // 2, set pipe fd in TestCase()
41 pipefd[1] = 3; // 3, set pipe fd in TestCase()
/kernel/linux/linux-6.6/tools/testing/selftests/net/af_unix/
H 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[ in main()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/resctrl/
H A Dcat_test.c93 int ret, pipefd[2], sibling_cpu_no; in cat_perf_miss_val() local
151 if (pipe(pipefd)) { in cat_perf_miss_val()
180 close(pipefd[0]); in cat_perf_miss_val()
182 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in cat_perf_miss_val()
190 close(pipefd[1]); in cat_perf_miss_val()
195 close(pipefd[1]); in cat_perf_miss_val()
198 if (read(pipefd[0], &pipe_message, in cat_perf_miss_val()
204 close(pipefd[0]); in cat_perf_miss_val()
H A Dresctrl_val.c641 int ret = 0, pipefd[2]; in resctrl_val() local
661 if (pipe(pipefd)) { in resctrl_val()
695 close(pipefd[0]); in resctrl_val()
697 if (write(pipefd[1], &pipe_message, sizeof(pipe_message)) < in resctrl_val()
700 close(pipefd[1]); in resctrl_val()
703 close(pipefd[1]); in resctrl_val()
745 close(pipefd[1]); in resctrl_val()
747 if (read(pipefd[0], &pipe_message, sizeof(pipe_message)) < in resctrl_val()
750 close(pipefd[0]); in resctrl_val()
754 close(pipefd[ in resctrl_val()
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/resctrl/
H A Dcat_test.c125 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()
H 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[ in resctrl_val()
[all...]
/kernel/liteos_a/testsuites/unittest/extended/signal/full/
H A Dpipe_test_003.cpp37 int pipefd[2]; // 2, array subscript in TestPipeSingleProcessFcntl() local
40 retValue = pipe(pipefd); in TestPipeSingleProcessFcntl()
43 int *readFd = &pipefd[0]; in TestPipeSingleProcessFcntl()
44 int *writeFd = &pipefd[1]; in TestPipeSingleProcessFcntl()
96 ret = close(pipefd[0]); in TestPipeSingleProcessFcntl()
98 ret = close(pipefd[1]); in TestPipeSingleProcessFcntl()
H A Dpipe_test_001.cpp37 int pipefd[2]; // 2, array subscript in TestPipeSingleProcess() local
40 retValue = pipe(pipefd); in TestPipeSingleProcess()
43 int *readFd = &pipefd[0]; in TestPipeSingleProcess()
44 int *writeFd = &pipefd[1]; in TestPipeSingleProcess()
82 ret = close(pipefd[0]); in TestPipeSingleProcess()
86 ret = close(pipefd[1]); in TestPipeSingleProcess()
H A Dpipe_test_005.cpp42 int pipefd[2]; // 2, array subscript in PipecommonWrite() local
47 int *readFd = &pipefd[0]; in PipecommonWrite()
48 int *writeFd = &pipefd[1]; in PipecommonWrite()
53 retValue = pipe(pipefd); in PipecommonWrite()
H A Dpipe_test_006.cpp40 int pipefd[MAX_PIPES][2]; // 2, array subscript in PipeUnlinkTest() local
53 retValue = pipe(pipefd[i]); in PipeUnlinkTest()
62 retValue = close(pipefd[i][0]); in PipeUnlinkTest()
66 retValue = close(pipefd[i][1]); in PipeUnlinkTest()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
H A Dd_path.c34 int pipefd[2] = { -1, -1 }; in trigger_fstat_events() local
39 if (CHECK(pipe(pipefd) < 0, "trigger", "pipe failed\n")) in trigger_fstat_events()
61 ret = set_pathname(pipefd[0], pid); in trigger_fstat_events()
64 ret = set_pathname(pipefd[1], pid); in trigger_fstat_events()
84 fstat(pipefd[0], &fileStat); in trigger_fstat_events()
85 fstat(pipefd[1], &fileStat); in trigger_fstat_events()
94 close(pipefd[0]); in trigger_fstat_events()
95 close(pipefd[1]); in trigger_fstat_events()
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-5.10/fs/autofs/
H 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()
[all...]
/kernel/linux/linux-6.6/fs/autofs/
H A Dinode.c70 seq_printf(m, ",fd=%d", sbi->pipefd); in autofs_show_options()
139 int pipefd = -1; in parse_options() local
149 sbi->pipefd = -1; in parse_options()
163 if (match_int(args, &pipefd)) in parse_options()
165 sbi->pipefd = pipefd; in parse_options()
218 return (sbi->pipefd < 0); in parse_options()
239 sbi->pipefd = -1; in autofs_fill_super()
323 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super()
324 pipe = fget(sbi->pipefd); in autofs_fill_super()
[all...]
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-5.10/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()
143 ret = sys_kcmp(pid1, pid1, KCMP_EPOLL_TFD, pipefd[1], in main()
/kernel/linux/linux-6.6/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()
/kernel/linux/linux-6.6/tools/testing/selftests/arm64/fp/
H A Dvec-syscfg.c87 int pipefd[2]; in get_child_rdvl() local
91 ret = pipe(pipefd); in get_child_rdvl()
104 close(pipefd[0]); in get_child_rdvl()
105 close(pipefd[1]); in get_child_rdvl()
115 ret = dup2(pipefd[1], 1); in get_child_rdvl()
129 close(pipefd[1]); in get_child_rdvl()
137 close(pipefd[0]); in get_child_rdvl()
146 close(pipefd[0]); in get_child_rdvl()
153 close(pipefd[0]); in get_child_rdvl()
157 out = fdopen(pipefd[ in get_child_rdvl()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/dexcr/
H A Dhashchk_test.c120 int pipefd[2]; in hashchk_exec_random_key_test() local
126 FAIL_IF_MSG(pipe(pipefd), "failed to create pipe"); in hashchk_exec_random_key_test()
130 if (dup2(pipefd[1], STDOUT_FILENO) == -1) in hashchk_exec_random_key_test()
138 FAIL_IF_MSG(read(pipefd[0], hash_values, sizeof(hash_values)) != sizeof(hash_values), in hashchk_exec_random_key_test()

Completed in 12 milliseconds

123