You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consolidates the jungle of functions out unit tests use to allocate
(mock) guest memory into three central utility functions. The main
intention behind this is to (mostly) prevent unit tests from calling
GuestMemoryMmap::from_raw_regions because that function will gain a huge
pages related parameter, and I dont want to have to touch 349082 files
in the feature commit that introduces it. This will also make it easier
to later on switch our unittests to use memfd based memory instead of
anonymous memory once vhost snapshot support is done.
After this commit, the only places that directly use from_raw_regions
are the tests in memory.rs itself (because they test from_raw_regions,
and not the utility wrappers), and any call sites that deviate from the
defaults chosen in test_utils.rs (e.g. if something wants dirty page
tracking).
The test being removed in this commit duplicates test_from_raw_regions
in memory.rs.
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments