From 1f4a34ffc89ec7457a1689a7ef61022aeb96770d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 29 Apr 2021 17:10:55 +0100 Subject: [PATCH] tests: Remove last tests using bzImage Signed-off-by: Rob Bradford --- scripts/run_integration_tests_x86_64.sh | 2 - tests/integration.rs | 92 ------------------------- 2 files changed, 94 deletions(-) diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index b69d4dbdd..f53b8c51c 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -96,7 +96,6 @@ popd # Build custom kernel based on virtio-pmem and virtio-fs upstream patches VMLINUX_IMAGE="$WORKLOADS_DIR/vmlinux" -BZIMAGE_IMAGE="$WORKLOADS_DIR/bzImage" LINUX_CUSTOM_DIR="$WORKLOADS_DIR/linux-custom" @@ -112,7 +111,6 @@ if [ ! -f "$VMLINUX_IMAGE" ]; then pushd $LINUX_CUSTOM_DIR time make bzImage -j `nproc` cp vmlinux $VMLINUX_IMAGE || exit 1 - cp arch/x86/boot/bzImage $BZIMAGE_IMAGE || exit 1 popd fi diff --git a/tests/integration.rs b/tests/integration.rs index 4c884e007..fe64ec804 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -2483,52 +2483,6 @@ mod tests { }); } - #[test] - #[cfg(target_arch = "x86_64")] - fn test_bzimage_boot() { - let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = Guest::new(&mut focal); - let mut workload_path = dirs::home_dir().unwrap(); - workload_path.push("workloads"); - - let mut kernel_path = workload_path; - kernel_path.push("bzImage"); - - let mut child = GuestCommand::new(&guest) - .args(&["--cpus", "boot=1"]) - .args(&["--memory", "size=512M"]) - .args(&["--kernel", kernel_path.to_str().unwrap()]) - .args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) - .default_disks() - .default_net() - .capture_output() - .spawn() - .unwrap(); - - let r = std::panic::catch_unwind(|| { - guest.wait_vm_boot(None).unwrap(); - - assert_eq!(guest.get_cpu_count().unwrap_or_default(), 1); - assert!(guest.get_total_memory().unwrap_or_default() > 480_000); - assert!(guest.get_entropy().unwrap_or_default() >= 900); - - assert_eq!( - guest - .ssh_command("grep -c PCI-MSI /proc/interrupts") - .unwrap() - .trim() - .parse::() - .unwrap_or_default(), - 12 - ); - }); - - let _ = child.kill(); - let output = child.wait_with_output().unwrap(); - - handle_child_output(r, &output); - } - fn _test_virtio_block(image_name: &str, disable_io_uring: bool) { let mut focal = UbuntuDiskConfig::new(image_name.to_string()); let guest = Guest::new(&mut focal); @@ -3690,52 +3644,6 @@ mod tests { }); } - #[test] - #[cfg(target_arch = "x86_64")] - fn test_bzimage_reboot() { - let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = Guest::new(&mut focal); - let mut workload_path = dirs::home_dir().unwrap(); - workload_path.push("workloads"); - - let mut kernel_path = workload_path; - kernel_path.push("bzImage"); - - let mut child = GuestCommand::new(&guest) - .args(&["--cpus", "boot=1"]) - .args(&["--memory", "size=512M"]) - .args(&["--kernel", kernel_path.to_str().unwrap()]) - .args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) - .default_disks() - .default_net() - .capture_output() - .spawn() - .unwrap(); - - let r = std::panic::catch_unwind(|| { - guest.wait_vm_boot(None).unwrap(); - - let fd_count_1 = get_fd_count(child.id()); - guest.reboot_linux(0, None); - 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(20)); - 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_eq!(output.status.success(), true); - }); - - handle_child_output(r, &output); - } - #[test] fn test_virtio_vsock() { _test_virtio_vsock(false)