diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/BUILD | 2 | ||||
-rw-r--r-- | test/syscalls/linux/pipe.cc | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/syscalls/BUILD b/test/syscalls/BUILD index b06e46c03..b5f89033b 100644 --- a/test/syscalls/BUILD +++ b/test/syscalls/BUILD @@ -255,7 +255,7 @@ syscall_test(test = "//test/syscalls/linux:pause_test") syscall_test( size = "large", - add_overlay = False, # TODO(gvisor.dev/issue/318): enable when fixed. + add_overlay = True, shard_count = 5, test = "//test/syscalls/linux:pipe_test", ) 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<char> buf(2 * Size()); + const int pipe_size = Size(); + std::vector<char> 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)); }); |