From b2907595e5e974d2b011ea011033aa06d796e090 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 27 Jun 2019 17:21:34 -0700 Subject: Complete pipe support on overlayfs Get/Set pipe size and ioctl support were missing from overlayfs. It required moving the pipe.Sizer interface to fs so that overlay could get access. Fixes #318 PiperOrigin-RevId: 255511125 --- test/syscalls/linux/pipe.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/syscalls/linux/pipe.cc') diff --git a/test/syscalls/linux/pipe.cc b/test/syscalls/linux/pipe.cc index 1f4422f4e..65afb90f3 100644 --- a/test/syscalls/linux/pipe.cc +++ b/test/syscalls/linux/pipe.cc @@ -339,11 +339,13 @@ TEST_P(PipeTest, BlockPartialWriteClosed) { SKIP_IF(!CreateBlocking()); ScopedThread t([this]() { - std::vector buf(2 * Size()); + const int pipe_size = Size(); + std::vector buf(2 * pipe_size); + // Write more than fits in the buffer. Blocks then returns partial write // when the other end is closed. The next call returns EPIPE. ASSERT_THAT(write(wfd_.get(), buf.data(), buf.size()), - SyscallSucceedsWithValue(Size())); + SyscallSucceedsWithValue(pipe_size)); EXPECT_THAT(write(wfd_.get(), buf.data(), buf.size()), SyscallFailsWithErrno(EPIPE)); }); -- cgit v1.2.3