diff options
author | Dean Deng <deandeng@google.com> | 2020-09-17 15:36:40 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-17 15:38:44 -0700 |
commit | 319d1b8ba0604e7bc029f98ae0e9b09badd5abad (patch) | |
tree | 59de10aebb09e3ee68dc5444fb9abafc070cffdb /test/syscalls/linux | |
parent | 8070cc3386d461752dc0e601f8a11f8b54f482a6 (diff) |
Complete vfs2 implementation of fallocate.
This change includes overlay, special regular gofer files, and hostfs.
Fixes #3589.
PiperOrigin-RevId: 332330860
Diffstat (limited to 'test/syscalls/linux')
-rw-r--r-- | test/syscalls/linux/fallocate.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/syscalls/linux/fallocate.cc b/test/syscalls/linux/fallocate.cc index cabc2b751..edd23e063 100644 --- a/test/syscalls/linux/fallocate.cc +++ b/test/syscalls/linux/fallocate.cc @@ -179,6 +179,12 @@ TEST_F(AllocateTest, FallocateOtherFDs) { auto sock0 = FileDescriptor(socks[0]); auto sock1 = FileDescriptor(socks[1]); EXPECT_THAT(fallocate(sock0.get(), 0, 0, 10), SyscallFailsWithErrno(ENODEV)); + + int pipefds[2]; + ASSERT_THAT(pipe(pipefds), SyscallSucceeds()); + EXPECT_THAT(fallocate(pipefds[1], 0, 0, 10), SyscallFailsWithErrno(ESPIPE)); + close(pipefds[0]); + close(pipefds[1]); } } // namespace |