diff options
Diffstat (limited to 'test/fuse/linux')
-rw-r--r-- | test/fuse/linux/fuse_base.cc | 2 | ||||
-rw-r--r-- | test/fuse/linux/fuse_fd_util.cc | 1 | ||||
-rw-r--r-- | test/fuse/linux/readdir_test.cc | 15 |
3 files changed, 10 insertions, 8 deletions
diff --git a/test/fuse/linux/fuse_base.cc b/test/fuse/linux/fuse_base.cc index a033db117..5b45804e1 100644 --- a/test/fuse/linux/fuse_base.cc +++ b/test/fuse/linux/fuse_base.cc @@ -24,8 +24,8 @@ #include <sys/uio.h> #include <unistd.h> -#include "absl/strings/str_format.h" #include "gtest/gtest.h" +#include "absl/strings/str_format.h" #include "test/util/fuse_util.h" #include "test/util/posix_error.h" #include "test/util/temp_path.h" diff --git a/test/fuse/linux/fuse_fd_util.cc b/test/fuse/linux/fuse_fd_util.cc index 4a2505b00..30d1157bb 100644 --- a/test/fuse/linux/fuse_fd_util.cc +++ b/test/fuse/linux/fuse_fd_util.cc @@ -59,4 +59,3 @@ Cleanup FuseFdTest::CloseFD(FileDescriptor &fd) { } // namespace testing } // namespace gvisor - diff --git a/test/fuse/linux/readdir_test.cc b/test/fuse/linux/readdir_test.cc index ab61eb676..2afb4b062 100644 --- a/test/fuse/linux/readdir_test.cc +++ b/test/fuse/linux/readdir_test.cc @@ -127,8 +127,9 @@ TEST_F(ReaddirTest, SingleEntry) { char *readdir_payload = readdir_payload_vec.data(); // Use fake ino for other directories. - fill_fuse_dirent(readdir_payload, dot.c_str(), ino_dir-2); - fill_fuse_dirent(readdir_payload + dot_file_dirent_size, dot_dot.c_str(), ino_dir-1); + fill_fuse_dirent(readdir_payload, dot.c_str(), ino_dir - 2); + fill_fuse_dirent(readdir_payload + dot_file_dirent_size, dot_dot.c_str(), + ino_dir - 1); fill_fuse_dirent( readdir_payload + dot_file_dirent_size + dot_dot_file_dirent_size, test_file.c_str(), ino_dir); @@ -148,8 +149,9 @@ TEST_F(ReaddirTest, SingleEntry) { std::vector<char> buf(4090, 0); int nread, off = 0, i = 0; - EXPECT_THAT(nread = syscall(__NR_getdents64, fd.get(), buf.data(), buf.size()), - SyscallSucceeds()); + EXPECT_THAT( + nread = syscall(__NR_getdents64, fd.get(), buf.data(), buf.size()), + SyscallSucceeds()); for (; off < nread;) { struct dirent64 *ent = (struct dirent64 *)(buf.data() + off); off += ent->d_reclen; @@ -166,8 +168,9 @@ TEST_F(ReaddirTest, SingleEntry) { } } - EXPECT_THAT(nread = syscall(__NR_getdents64, fd.get(), buf.data(), buf.size()), - SyscallSucceedsWithValue(0)); + EXPECT_THAT( + nread = syscall(__NR_getdents64, fd.get(), buf.data(), buf.size()), + SyscallSucceedsWithValue(0)); SkipServerActualRequest(); // READDIR. SkipServerActualRequest(); // READDIR with no data. |