Lines Matching refs:fd
25 int fd = open("/proc/version", O_RDONLY); in TEST() local
26 ASSERT_TRUE(fd != -1); in TEST()
28 int flags = fcntl(fd, F_GETFD); in TEST()
32 int rc = fcntl(fd, F_SETFD, FD_CLOEXEC); in TEST()
35 flags = fcntl(fd, F_GETFD); in TEST()
39 close(fd); in TEST()
43 int fd; in TEST() local
45 fd = open("/proc/version", O_RDONLY); in TEST()
46 ASSERT_TRUE(fd != -1); in TEST()
47 close(fd); in TEST()
49 fd = open64("/proc/version", O_RDONLY); in TEST()
50 ASSERT_TRUE(fd != -1); in TEST()
51 close(fd); in TEST()
55 int fd; in TEST() local
57 fd = openat(AT_FDCWD, "/proc/version", O_RDONLY); in TEST()
58 ASSERT_TRUE(fd != -1); in TEST()
59 close(fd); in TEST()
61 fd = openat64(AT_FDCWD, "/proc/version", O_RDONLY); in TEST()
62 ASSERT_TRUE(fd != -1); in TEST()
63 close(fd); in TEST()
83 EXPECT_EQ(EINVAL, posix_fadvise(tf.fd, 0, 0, -1)); in TEST()
86 EXPECT_EQ(EINVAL, posix_fadvise64(tf.fd, 0, 0, -1)); in TEST()
89 EXPECT_EQ(0, posix_fadvise(tf.fd, 0, 0, POSIX_FADV_NORMAL)); in TEST()
90 EXPECT_EQ(0, posix_fadvise64(tf.fd, 0, 0, POSIX_FADV_NORMAL)); in TEST()
100 ASSERT_EQ(-1, fallocate(tf.fd, 0, 0, -1)); in TEST()
104 ASSERT_EQ(-1, fallocate64(tf.fd, 0, 0, -1)); in TEST()
108 ASSERT_EQ(EINVAL, posix_fallocate(tf.fd, 0, -1)); in TEST()
112 ASSERT_EQ(EINVAL, posix_fallocate64(tf.fd, 0, -1)); in TEST()
119 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
123 ASSERT_EQ(0, fallocate(tf.fd, 0, 0, 1)); in TEST()
124 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
127 ASSERT_EQ(0, fallocate64(tf.fd, 0, 0, 2)); in TEST()
128 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
132 ASSERT_EQ(0, posix_fallocate(tf.fd, 0, 3)); in TEST()
133 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
136 ASSERT_EQ(0, posix_fallocate64(tf.fd, 0, 4)); in TEST()
137 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
142 int fd = open64("/proc/version", O_RDONLY); in TEST() local
143 ASSERT_TRUE(fd != -1); in TEST()
151 int rc = fcntl(fd, F_GETLK64, &check_lock); in TEST()
154 close(fd); in TEST()
169 …ssize_t bytes_written = splice(pipe_fds[0], NULL, tf.fd, 0, bytes_read, SPLICE_F_MORE | SPLICE_F_M… in TEST()