ci: Run vhost-user-blk tests for mmio builds

There's no reason mmio builds cannot support vhost-user-blk, therefore
there's no reason to skip these tests for mmio.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-03-23 17:07:57 +01:00 committed by Rob Bradford
parent 0c9c72c583
commit dd8debf201

View File

@ -1355,7 +1355,7 @@ mod tests {
test_vhost_user_net(None, 4, None, true)
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_vhost_user_blk() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1447,7 +1447,7 @@ mod tests {
});
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_vhost_user_blk_self_spawning() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1535,7 +1535,7 @@ mod tests {
});
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_vhost_user_blk_readonly() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1627,7 +1627,7 @@ mod tests {
});
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_vhost_user_blk_direct() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1719,7 +1719,7 @@ mod tests {
});
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_boot_from_vhost_user_blk() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1775,7 +1775,7 @@ mod tests {
});
}
#[cfg_attr(not(feature = "mmio"), test)]
#[test]
fn test_boot_from_vhost_user_blk_self_spawning() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -1808,24 +1808,28 @@ mod tests {
aver_eq!(tb, guest.get_cpu_count().unwrap_or_default(), 1);
aver!(tb, guest.get_total_memory().unwrap_or_default() > 491_000);
let reboot_count = guest
.ssh_command("sudo journalctl | grep -c -- \"-- Reboot --\"")
.unwrap_or_default()
.trim()
.parse::<u32>()
.unwrap_or(1);
// The reboot is not supported with mmio, so no reason to test it.
#[cfg(not(feature = "mmio"))]
{
let reboot_count = guest
.ssh_command("sudo journalctl | grep -c -- \"-- Reboot --\"")
.unwrap_or_default()
.trim()
.parse::<u32>()
.unwrap_or(1);
aver_eq!(tb, reboot_count, 0);
guest.ssh_command("sudo reboot").unwrap_or_default();
aver_eq!(tb, reboot_count, 0);
guest.ssh_command("sudo reboot").unwrap_or_default();
thread::sleep(std::time::Duration::new(20, 0));
let reboot_count = guest
.ssh_command("sudo journalctl | grep -c -- \"-- Reboot --\"")
.unwrap_or_default()
.trim()
.parse::<u32>()
.unwrap_or_default();
aver_eq!(tb, reboot_count, 1);
thread::sleep(std::time::Duration::new(20, 0));
let reboot_count = guest
.ssh_command("sudo journalctl | grep -c -- \"-- Reboot --\"")
.unwrap_or_default()
.trim()
.parse::<u32>()
.unwrap_or_default();
aver_eq!(tb, reboot_count, 1);
}
let _ = cloud_child.kill();
let _ = cloud_child.wait();