diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh index 1a777704a..1698ed380 100755 --- a/scripts/run_integration_tests.sh +++ b/scripts/run_integration_tests.sh @@ -22,7 +22,7 @@ if [ ! -f "$OVMF" ]; then popd fi -CLEAR_OS_IMAGE_NAME="clear-29810-cloud.img" +CLEAR_OS_IMAGE_NAME="clear-cloudguest.img" CLEAR_OS_IMAGE_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$CLEAR_OS_IMAGE_NAME.xz" CLEAR_OS_IMAGE="$WORKLOADS_DIR/$CLEAR_OS_IMAGE_NAME" if [ ! -f "$CLEAR_OS_IMAGE" ]; then @@ -32,7 +32,7 @@ if [ ! -f "$CLEAR_OS_IMAGE" ]; then popd fi -CLEAR_OS_RAW_IMAGE_NAME="clear-29810-cloud-raw.img" +CLEAR_OS_RAW_IMAGE_NAME="clear-cloudguest-raw.img" CLEAR_OS_RAW_IMAGE="$WORKLOADS_DIR/$CLEAR_OS_RAW_IMAGE_NAME" if [ ! -f "$CLEAR_OS_RAW_IMAGE" ]; then pushd $WORKLOADS_DIR diff --git a/src/main.rs b/src/main.rs index 7dba09b4d..4e3864098 100755 --- a/src/main.rs +++ b/src/main.rs @@ -430,10 +430,10 @@ mod tests { workload_path.push("workloads"); let mut osdisk_base_path = workload_path.clone(); - osdisk_base_path.push("clear-29810-cloud.img"); + osdisk_base_path.push("clear-cloudguest.img"); let mut osdisk_raw_base_path = workload_path.clone(); - osdisk_raw_base_path.push("clear-29810-cloud-raw.img"); + osdisk_raw_base_path.push("clear-cloudguest-raw.img"); let osdisk_path = String::from(tmp_dir.path().join("osdisk.img").to_str().unwrap()); let osdisk_raw_path = @@ -739,14 +739,6 @@ mod tests { .to_string()) } - fn is_console_detected(&self) -> Result { - Ok(!(self - .ssh_command("dmesg | grep \"hvc0] enabled\"")? - .trim() - .to_string() - .is_empty())) - } - fn does_device_vendor_pair_match( &self, device_id: &str, @@ -940,7 +932,7 @@ mod tests { thread::sleep(std::time::Duration::new(20, 0)); - aver!(tb, guest.get_total_memory().unwrap_or_default() > 5_063_000); + aver!(tb, guest.get_total_memory().unwrap_or_default() > 5_000_000); guest.ssh_command("sudo shutdown -h now")?; thread::sleep(std::time::Duration::new(10, 0)); @@ -1026,7 +1018,7 @@ mod tests { .as_str(), ]) .args(&["--net", guest.default_net_string().as_str()]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) .spawn() .unwrap(); @@ -1083,7 +1075,7 @@ mod tests { .as_str(), ]) .args(&["--net", guest.default_net_string().as_str()]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) .spawn() .unwrap(); @@ -1282,7 +1274,7 @@ mod tests { ]) .args(&[ "--cmdline", - "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a \ + "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b \ console=tty0 console=ttyS0,115200n8 console=hvc0 quiet \ init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable \ no_timer_check noreplace-smp cryptomgr.notests \ @@ -1406,7 +1398,7 @@ mod tests { ) .as_str(), ]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) .spawn() .unwrap(); @@ -1457,7 +1449,7 @@ mod tests { ) .as_str(), ]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) .spawn() .unwrap(); @@ -1814,7 +1806,6 @@ mod tests { .does_device_vendor_pair_match("0x1043", "0x1af4") .unwrap_or_default() ); - aver!(tb, guest.is_console_detected().unwrap_or_default()); let text = String::from("On a branch floating down river a cricket, singing."); let cmd = format!("sudo -E bash -c 'echo {} > /dev/hvc0'", text); @@ -1869,9 +1860,6 @@ mod tests { thread::sleep(std::time::Duration::new(20, 0)); - // Test that there is a ttyS0 - aver!(tb, guest.is_console_detected().unwrap_or_default()); - guest.ssh_command("sudo shutdown -h now")?; thread::sleep(std::time::Duration::new(10, 0)); @@ -2057,7 +2045,7 @@ mod tests { .as_str(), ]) .args(&["--net", guest.default_net_string().as_str()]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw acpi=off"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw acpi=off"]) .spawn() .unwrap(); @@ -2188,7 +2176,7 @@ mod tests { .as_str(), ]) .args(&["--net", guest.default_net_string().as_str()]) - .args(&["--cmdline", "root=PARTUUID=3cb0e0a5-925d-405e-bc55-edf0cec8f10a console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) + .args(&["--cmdline", "root=PARTUUID=19866ecd-ecc4-4ef8-b313-09a92260ef9b console=tty0 console=ttyS0,115200n8 console=hvc0 quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp cryptomgr.notests rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw"]) .spawn() .unwrap(); diff --git a/test_data/cloud-init/clear/openstack/latest/user_data b/test_data/cloud-init/clear/openstack/latest/user_data index 53f04db31..ea38d5c4d 100644 --- a/test_data/cloud-init/clear/openstack/latest/user_data +++ b/test_data/cloud-init/clear/openstack/latest/user_data @@ -53,4 +53,4 @@ write_files: bash -c "echo 0000:00:03.0 > /sys/bus/pci/devices/0000\:00\:03.0/driver/unbind" bash -c "echo 1af4 1041 > /sys/bus/pci/drivers/vfio-pci/new_id" - /mnt/cloud-hypervisor --console off --serial tty --kernel /mnt/vmlinux --cmdline "console=ttyS0 reboot=k panic=1 nomodules i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd root=/dev/vda2 VFIOTAG" --disk /mnt/clear-29810-cloud.img /mnt/cloudinit.img --cpus 1 --memory size=512M --rng --device /sys/bus/pci/devices/0000:00:03.0/ + /mnt/cloud-hypervisor --console off --serial tty --kernel /mnt/vmlinux --cmdline "console=ttyS0 reboot=k panic=1 nomodules i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd root=/dev/vda2 VFIOTAG" --disk /mnt/clear-cloudguest.img /mnt/cloudinit.img --cpus 1 --memory size=512M --rng --device /sys/bus/pci/devices/0000:00:03.0/