diff --git a/test/syscalls/linux/pipe.cc b/test/syscalls/linux/pipe.cc index 209801e36..b02e47048 100644 --- a/test/syscalls/linux/pipe.cc +++ b/test/syscalls/linux/pipe.cc @@ -664,6 +664,13 @@ TEST_P(PipeTest, Streaming) { } } +TEST_P(PipeTest, ZeroSize) { + SKIP_IF(!CreateBlocking()); + + ASSERT_THAT(write(wfd_.get(), nullptr, 0), SyscallSucceedsWithValue(0)); + ASSERT_THAT(read(rfd_.get(), nullptr, 0), SyscallSucceedsWithValue(0)); +} + std::string PipeCreatorName(::testing::TestParamInfo info) { return info.param.name_; // Use the name specified. }