From 319d1b8ba0604e7bc029f98ae0e9b09badd5abad Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Thu, 17 Sep 2020 15:36:40 -0700 Subject: Complete vfs2 implementation of fallocate. This change includes overlay, special regular gofer files, and hostfs. Fixes #3589. PiperOrigin-RevId: 332330860 --- test/syscalls/linux/fallocate.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/syscalls/linux') 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 -- cgit v1.2.3