diff --git a/tests/integration.rs b/tests/integration.rs index 4b829f069..809130aa6 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -4029,52 +4029,6 @@ mod common_parallel { handle_child_output(r, &output); } - #[test] - fn test_reboot() { - let bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string()); - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - - vec![Box::new(bionic), Box::new(focal)] - .drain(..) - .for_each(|disk_config| { - let guest = Guest::new(disk_config); - - let mut cmd = GuestCommand::new(&guest); - cmd.args(["--cpus", "boot=1"]) - .args(["--memory", "size=512M"]) - .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) - .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) - .default_disks() - .default_net() - .capture_output(); - - let mut child = cmd.spawn().unwrap(); - - let r = std::panic::catch_unwind(|| { - guest.wait_vm_boot(Some(120)).unwrap(); - - let fd_count_1 = get_fd_count(child.id()); - guest.reboot_linux(0, Some(120)); - let fd_count_2 = get_fd_count(child.id()); - assert_eq!(fd_count_1, fd_count_2); - - guest.ssh_command("sudo shutdown -h now").unwrap(); - }); - - let _ = child.wait_timeout(std::time::Duration::from_secs(40)); - let _ = child.kill(); - let output = child.wait_with_output().unwrap(); - handle_child_output(r, &output); - - let r = std::panic::catch_unwind(|| { - // Check that the cloud-hypervisor binary actually terminated - assert!(output.status.success()); - }); - - handle_child_output(r, &output); - }); - } - #[test] fn test_virtio_vsock() { _test_virtio_vsock(false)