mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add test for zero size read and write
PiperOrigin-RevId: 495456453
This commit is contained in:
@@ -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<PipeCreator> info) {
|
||||
return info.param.name_; // Use the name specified.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user