rust-vmm / vm-memory

Virtual machine's guest memory crate
Apache License 2.0
299 stars 97 forks source link

Test `GuestMemory::try_access` error cases #272

Open JonathanWoollett-Light opened 9 months ago

JonathanWoollett-Light commented 9 months ago

https://github.com/rust-vmm/vm-memory/pull/260 introduced error cases to resolve https://github.com/rust-vmm/vm-memory/issues/269 but did not cover these with regression tests.

Writes tests that exercise the paths where GuestMemory::try_access returns Err(Error::CallbackOutOfRange) and Err(Error::GuestAddressOverflow).