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
do not backdoor-enable backend-bitmap in unittests
The bitmap backend implementation in vm_memory::bitmap::backend is only
exported if the backend-bitmap feature is enabled. However, compiling
the crate in test mode (e.g. `cargo test`), also unconditionally enables
it. This is weird, and actually causes problems: The bitmap backend code
depends on the libc crate, and this weird "enable unconditionally for
tests" behavior means we have to go through more trouble in Cargo.toml
to get the code to compile in some feature combinations, as not only do
we need to add the libc crate as a dependency of the backend-bitmap
feature, we also have to add it as a dev-dependency.
Add a #[cfg(feature = "backend-bitmap")] to the test module in
src/bitmap/mod.rs, as otherwise some of the functions will be warned
about being unused in some feature configurations.
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments