Searched refs:proc_fd (Results 1 – 6 of 6) sorted by relevance
/openbmc/linux/tools/testing/selftests/net/ |
H A D | tcp_fastopen_backup_key.c | 44 static int proc_fd; variable 59 lseek(proc_fd, 0, SEEK_SET); in get_keys() 60 if (read(proc_fd, buf, sizeof(buf)) <= 0) in get_keys() 84 lseek(proc_fd, 0, SEEK_SET); in set_keys() 85 if (write(proc_fd, buf, sizeof(buf)) <= 0) in set_keys() 322 proc_fd = open(PROC_FASTOPEN_KEY, O_RDWR); in main() 323 if (proc_fd < 0) in main() 330 close(proc_fd); in main()
|
/openbmc/linux/tools/testing/selftests/iommu/ |
H A D | iommufd_fail_nth.c | 85 int proc_fd; member 95 nth_state->proc_fd = open(buf, O_RDWR); in fail_nth_first() 96 ASSERT_NE(-1, nth_state->proc_fd); in fail_nth_first() 123 res = pread(nth_state->proc_fd, buf, sizeof(buf), 0); in fail_nth_next() 130 res2 = pwrite(nth_state->proc_fd, disable_nth, in fail_nth_next() 133 res2 = pwrite(nth_state->proc_fd, disable_nth, in fail_nth_next() 169 ASSERT_EQ(len, pwrite(nth_state->proc_fd, buf, len, 0)); in __fail_nth_enable()
|
/openbmc/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_setns_test.c | 126 int i, proc_fd, ret; in FIXTURE_SETUP() local 136 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP() 137 ASSERT_GE(proc_fd, 0) { in FIXTURE_SETUP() 144 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 237 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 272 close(proc_fd); in FIXTURE_SETUP()
|
/openbmc/linux/fs/proc/ |
H A D | fd.h | 16 static inline unsigned int proc_fd(struct inode *inode) in proc_fd() function
|
H A D | fd.c | 37 unsigned int fd = proc_fd(m->private); in seq_show() 156 fd = proc_fd(inode); in tid_fd_revalidate() 182 unsigned int fd = proc_fd(d_inode(dentry)); in proc_fd_link()
|
/openbmc/linux/tools/testing/selftests/landlock/ |
H A D | fs_test.c | 3191 int reg_fd, proc_fd; in TEST_F_FORK() local 3207 proc_fd = open_proc_fd(_metadata, reg_fd, O_RDONLY | O_CLOEXEC); in TEST_F_FORK() 3208 ASSERT_LE(0, proc_fd); in TEST_F_FORK() 3209 ASSERT_EQ(0, close(proc_fd)); in TEST_F_FORK() 3211 proc_fd = open_proc_fd(_metadata, reg_fd, O_RDWR | O_CLOEXEC); in TEST_F_FORK() 3212 ASSERT_EQ(-1, proc_fd) in TEST_F_FORK() 3224 int proc_fd; in TEST_F_FORK() local 3257 proc_fd = open_proc_fd(_metadata, pipe_fds[1], O_WRONLY | O_CLOEXEC); in TEST_F_FORK() 3258 ASSERT_LE(0, proc_fd); in TEST_F_FORK() 3259 ASSERT_EQ(1, write(proc_fd, ".", 1)) in TEST_F_FORK() [all …]
|