crosvm/kvm/tests
David Tolnay 4adfdc0322 memory: Add methods to return error on short writes and reads
Add GuestMemory::write_all_at_addr, GuestMemory::read_exact_at_addr
which return error if the entire write or read cannot be completed.

Also rename write_slice_at_addr to write_at_addr, read_slice_at_addr to
read_at_addr to make the entire set of four methods consistent in naming
with the methods of std::io::Write and std::io::Read.

Context:
https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1387624/16/devices/src/virtio/tpm.rs#75

TEST=cargo test

Change-Id: Ia0775b75281ccf8030c84b41f9018a511204b8c9
Reviewed-on: https://chromium-review.googlesource.com/1407156
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2019-01-13 03:23:13 -08:00
..
dirty_log.rs toolchain: Update to Rust 1.31.0 2018-12-13 19:28:04 -08:00
read_only_memory.rs toolchain: Update to Rust 1.31.0 2018-12-13 19:28:04 -08:00
real_run_adder.rs memory: Add methods to return error on short writes and reads 2019-01-13 03:23:13 -08:00