Home
last modified time | relevance | path

Searched refs:pipe_fds (Results 1 – 5 of 5) sorted by relevance

/openbmc/linux/tools/testing/selftests/pidfd/
H A Dpidfd_test.c245 int pipe_fds[2]; in test_pidfd_send_signal_recycled_pid_fail() local
249 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
258 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail()
259 (void)read(pipe_fds[0], &c, 1); in test_pidfd_send_signal_recycled_pid_fail()
260 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail()
269 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail()
271 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail()
/openbmc/qemu/hw/virtio/
H A Dvhost.c2245 int pipe_fds[2], read_fd = -1, write_fd = -1, reply_fd = -1; in vhost_save_backend_state() local
2249 if (!g_unix_open_pipe(pipe_fds, FD_CLOEXEC, &g_err)) { in vhost_save_backend_state()
2256 read_fd = pipe_fds[0]; in vhost_save_backend_state()
2257 write_fd = pipe_fds[1]; in vhost_save_backend_state()
2337 int pipe_fds[2], read_fd = -1, write_fd = -1, reply_fd = -1; in vhost_load_backend_state() local
2341 if (!g_unix_open_pipe(pipe_fds, FD_CLOEXEC, &g_err)) { in vhost_load_backend_state()
2348 read_fd = pipe_fds[0]; in vhost_load_backend_state()
2349 write_fd = pipe_fds[1]; in vhost_load_backend_state()
/openbmc/linux/tools/testing/selftests/mm/
H A Dprotection_keys.c1120 int pipe_fds[2]; in test_kernel_gup_of_access_disabled_region() local
1122 pipe_ret = pipe(pipe_fds); in test_kernel_gup_of_access_disabled_region()
1130 vmsplice_ret = vmsplice(pipe_fds[1], &iov, 1, SPLICE_F_GIFT); in test_kernel_gup_of_access_disabled_region()
1134 close(pipe_fds[0]); in test_kernel_gup_of_access_disabled_region()
1135 close(pipe_fds[1]); in test_kernel_gup_of_access_disabled_region()
/openbmc/linux/tools/testing/selftests/landlock/
H A Dfs_test.c3224 int pipe_fds[2]; in TEST_F_FORK() local
3247 ASSERT_EQ(0, pipe2(pipe_fds, O_CLOEXEC)); in TEST_F_FORK()
3248 ASSERT_EQ(1, write(pipe_fds[1], ".", 1)) in TEST_F_FORK()
3252 ASSERT_EQ(1, read(pipe_fds[0], &buf, 1)); in TEST_F_FORK()
3256 proc_fd = open_proc_fd(_metadata, pipe_fds[1], O_WRONLY | O_CLOEXEC); in TEST_F_FORK()
3261 pipe_fds[1], strerror(errno)); in TEST_F_FORK()
3266 proc_fd = open_proc_fd(_metadata, pipe_fds[0], O_RDONLY | O_CLOEXEC); in TEST_F_FORK()
3272 pipe_fds[1], strerror(errno)); in TEST_F_FORK()
3276 ASSERT_EQ(0, close(pipe_fds[0])); in TEST_F_FORK()
3277 ASSERT_EQ(0, close(pipe_fds[1])); in TEST_F_FORK()
/openbmc/linux/tools/testing/selftests/seccomp/
H A Dseccomp_bpf.c3841 int dup_fd, pipe_fds[2]; in TEST() local
3844 ASSERT_GE(pipe(pipe_fds), 0); in TEST()
3846 dup_fd = dup(pipe_fds[0]); in TEST()
3848 EXPECT_NE(pipe_fds[0], dup_fd); in TEST()
3851 ASSERT_EQ(filecmp(self, self, pipe_fds[0], dup_fd), 0); in TEST()