crosvm/base
Frederick Mayle c9628cf0da base: windows: named_pipes: implement std::io::Read EOF correctly
std::io::Read should return Ok(0) on EOF so that callers can read all of
the data of a variable length stream.

The fix is implemented in PipeConnection::read_internal, so it will
affect more than just the std::io::Read users of Pipe and likely cause
some breakages, but we decided that making them inconsistent would be
too confusing.

I also added a test for std::io::Write, but didn't not change its
behavior. The stdlib docs aren't clear if there are similar expectations
for writes and methods like write_all ought to work as expected with the
currently implementation.

BUG=b:301269927

Change-Id: I808993cdad722a4e95b28800e5681035f254e637
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5768033
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
2024-08-08 23:01:13 +00:00
..
base_event_token_derive Update to syn-2 2023-12-02 00:23:50 +00:00
src base: windows: named_pipes: implement std::io::Read EOF correctly 2024-08-08 23:01:13 +00:00
tests base: move fork_process to jail crate 2024-05-22 21:21:59 +00:00
.build_test_serial Refactoring: Move common/base into base 2022-03-17 00:01:27 +00:00
Cargo.toml Enable clippy for android code 2024-07-09 20:43:44 +00:00