tests: Disable unsupported tests for MSHV

On MSHV some of the integration test cases are not supported yet
or still in progress. This patch disables all those test cases.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2021-09-23 15:15:45 -07:00 committed by Rob Bradford
parent 6454c677d0
commit 73244aa6f2

View File

@ -584,7 +584,7 @@ mod tests {
}
fn api_create_body(&self, cpu_count: u8) -> String {
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", not(feature = "mshv")))]
format! {"{{\"cpus\":{{\"boot_vcpus\":{},\"max_vcpus\":{}}},\"kernel\":{{\"path\":\"{}\"}},\"cmdline\":{{\"args\": \"\"}},\"net\":[{{\"ip\":\"{}\", \"mask\":\"255.255.255.0\", \"mac\":\"{}\"}}], \"disks\":[{{\"path\":\"{}\"}}, {{\"path\":\"{}\"}}]}}",
cpu_count,
cpu_count,
@ -594,7 +594,8 @@ mod tests {
self.disk_config.disk(DiskType::OperatingSystem).unwrap().as_str(),
self.disk_config.disk(DiskType::CloudInit).unwrap().as_str(),
}
#[cfg(target_arch = "aarch64")]
#[cfg(any(target_arch = "aarch64", feature = "mshv"))]
format! {"{{\"cpus\":{{\"boot_vcpus\":{},\"max_vcpus\":{}}},\"kernel\":{{\"path\":\"{}\"}},\"cmdline\":{{\"args\": \"{}\"}},\"net\":[{{\"ip\":\"{}\", \"mask\":\"255.255.255.0\", \"mac\":\"{}\"}}], \"disks\":[{{\"path\":\"{}\"}}, {{\"path\":\"{}\"}}]}}",
cpu_count,
cpu_count,
@ -2383,22 +2384,26 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_cpu_topology_421() {
test_cpu_topology(4, 2, 1, false);
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_cpu_topology_142() {
test_cpu_topology(1, 4, 2, false);
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_cpu_topology_262() {
test_cpu_topology(2, 6, 2, false);
}
#[test]
#[cfg(target_arch = "x86_64")]
#[cfg(not(feature = "mshv"))]
fn test_cpu_physical_bits() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
@ -2434,6 +2439,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_large_vm() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
@ -2474,6 +2480,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_huge_memory() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
@ -2506,6 +2513,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_user_defined_memory_regions() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
@ -2573,6 +2581,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_guest_numa_nodes() {
_test_guest_numa_nodes(false);
}
@ -3022,11 +3031,13 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_dax_on_default_cache_size() {
test_virtio_fs(true, None, "none", &prepare_virtiofsd, false)
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_dax_on_cache_size_1_gib() {
test_virtio_fs(true, Some(0x4000_0000), "none", &prepare_virtiofsd, false)
}
@ -3037,11 +3048,13 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_dax_on_default_cache_size_w_virtiofsd_rs_daemon() {
test_virtio_fs(true, None, "never", &prepare_virtiofsd_rs_daemon, false)
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_dax_on_cache_size_1_gib_w_virtiofsd_rs_daemon() {
test_virtio_fs(
true,
@ -3059,6 +3072,7 @@ mod tests {
#[test]
#[cfg(target_arch = "x86_64")]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_hotplug_dax_on() {
test_virtio_fs(true, None, "none", &prepare_virtiofsd, true)
}
@ -3071,6 +3085,7 @@ mod tests {
#[test]
#[cfg(target_arch = "x86_64")]
#[cfg(not(feature = "mshv"))]
fn test_virtio_fs_hotplug_dax_on_w_virtiofsd_rs_daemon() {
test_virtio_fs(true, None, "never", &prepare_virtiofsd_rs_daemon, true)
}
@ -3602,6 +3617,7 @@ mod tests {
#[test]
#[cfg(target_arch = "x86_64")]
#[cfg(not(feature = "mshv"))]
// The VFIO integration test starts cloud-hypervisor guest with 3 TAP
// backed networking interfaces, bound through a simple bridge on the host.
// So if the nested cloud-hypervisor succeeds in getting a directly
@ -4350,6 +4366,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_virtio_mem() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
@ -4423,6 +4440,7 @@ mod tests {
#[test]
#[cfg(target_arch = "x86_64")]
#[cfg(not(feature = "mshv"))]
// Test both vCPU and memory resizing together
fn test_resize() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
@ -5521,6 +5539,7 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_ovs_dpdk() {
let focal1 = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest1 = Guest::new(Box::new(focal1));
@ -7152,10 +7171,12 @@ mod tests {
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_live_migration_numa() {
_test_live_migration(true)
}
#[test]
#[cfg(not(feature = "mshv"))]
fn test_live_migration_ovs_dpdk() {
let ovs_focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let ovs_guest = Guest::new(Box::new(ovs_focal));