vmm, tests: Disable reboot support

Being able to reboot requires us to identify all the resources we are
leaking and cleaning those up before we can enable reboot. For now if
the user requests a reboot then shutdown instead.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2019-08-30 18:33:36 +01:00 committed by Samuel Ortiz
parent ad128bf72d
commit 8308e1bf25
2 changed files with 5 additions and 0 deletions

View File

@ -2017,6 +2017,7 @@ mod tests {
}
#[test]
#[ignore]
fn test_reboot() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
@ -2085,6 +2086,7 @@ mod tests {
}
#[test]
#[ignore]
fn test_bzimage_reboot() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();

View File

@ -55,6 +55,7 @@ impl Vmm {
}
pub fn boot_kernel(config: VmConfig) -> Result<()> {
#[allow(clippy::never_loop)]
loop {
let vmm = Vmm::new()?;
let mut vm = Vm::new(&vmm.kvm, &config).map_err(Error::VmNew)?;
@ -63,6 +64,8 @@ pub fn boot_kernel(config: VmConfig) -> Result<()> {
if vm.start(entry).map_err(Error::VmStart)? == ExitBehaviour::Shutdown {
break;
}
error!("Shutting down rather than rebooting due to known resource leaks: https://github.com/intel/cloud-hypervisor/issues/223");
break;
}
Ok(())