From d3a8332282028483329ade13a41cd2c3bb89d4bb Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 14 Nov 2022 16:38:03 +0000 Subject: [PATCH] tests: Remove test_reboot There is no need for this test any longer as we have plenty of other tests that reboot the VM. Further this test used unmodified bionic image, which not only will be EOLed soon but also took a long time to shutdown as it still had snapd installed. Fixes: #4849 Signed-off-by: Rob Bradford --- tests/integration.rs | 46 -------------------------------------------- 1 file changed, 46 deletions(-) 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)