tests: Re-enable the virtio-fs tests and make them work with virtio-mmio

As part of bringing the tests up with virtio-mmio the virtio-fs were
wrongly disabled. Re-enable them and remove the cache size check as the
cache does not appear in /proc/iomem on virtio-mmio.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-03-04 16:34:39 +00:00 committed by Sebastien Boeuf
parent 7b1d5c1ad9
commit 97affbebfe

View File

@ -1723,7 +1723,10 @@ mod tests {
guest.ssh_command(&mount_cmd).unwrap_or_default().trim(),
"ok"
);
// Check the cache size is the expected one
// Check the cache size is the expected one.
// With virtio-mmio the cache doesn't appear in /proc/iomem
#[cfg(not(feature = "mmio"))]
aver_eq!(
tb,
guest
@ -1767,22 +1770,27 @@ mod tests {
});
}
#[test]
fn test_virtio_fs_dax_on_default_cache_size() {
test_virtio_fs(true, None, "none", &prepare_virtiofsd)
}
#[test]
fn test_virtio_fs_dax_on_cache_size_1_gib() {
test_virtio_fs(true, Some(0x4000_0000), "none", &prepare_virtiofsd)
}
#[test]
fn test_virtio_fs_dax_off() {
test_virtio_fs(false, None, "none", &prepare_virtiofsd)
}
#[test]
fn test_virtio_fs_dax_on_default_cache_size_w_vhost_user_fs_daemon() {
test_virtio_fs(true, None, "none", &prepare_vhost_user_fs_daemon)
}
#[test]
fn test_virtio_fs_dax_on_cache_size_1_gib_w_vhost_user_fs_daemon() {
test_virtio_fs(
true,
@ -1792,6 +1800,7 @@ mod tests {
)
}
#[test]
fn test_virtio_fs_dax_off_w_vhost_user_fs_daemon() {
test_virtio_fs(false, None, "none", &prepare_vhost_user_fs_daemon)
}