mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
tests: Add explicit QCOW2 based image test
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
e05ed9240a
commit
ef12216c19
@ -92,6 +92,10 @@ mod tests {
|
|||||||
const BIONIC_IMAGE_NAME: &str = "bionic-server-cloudimg-arm64.raw";
|
const BIONIC_IMAGE_NAME: &str = "bionic-server-cloudimg-arm64.raw";
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom.raw";
|
const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom.raw";
|
||||||
|
#[cfg(target_arch = "aarch64")]
|
||||||
|
const FOCAL_IMAGE_NAME_QCOW2: &str = "focal-server-cloudimg-arm64-custom.qcow2";
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
const FOCAL_IMAGE_NAME_QCOW2: &str = "focal-server-cloudimg-amd64-custom.qcow2";
|
||||||
|
|
||||||
const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=hvc0 rw";
|
const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=hvc0 rw";
|
||||||
|
|
||||||
@ -2815,8 +2819,8 @@ mod tests {
|
|||||||
handle_child_output(r, &output);
|
handle_child_output(r, &output);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _test_virtio_block(disable_io_uring: bool) {
|
fn _test_virtio_block(image_name: &str, disable_io_uring: bool) {
|
||||||
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let mut focal = UbuntuDiskConfig::new(image_name.to_string());
|
||||||
let guest = Guest::new(&mut focal);
|
let guest = Guest::new(&mut focal);
|
||||||
|
|
||||||
let mut workload_path = dirs::home_dir().unwrap();
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
@ -2901,12 +2905,17 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_virtio_block() {
|
fn test_virtio_block() {
|
||||||
_test_virtio_block(false)
|
_test_virtio_block(FOCAL_IMAGE_NAME, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_virtio_block_disable_io_uring() {
|
fn test_virtio_block_disable_io_uring() {
|
||||||
_test_virtio_block(false)
|
_test_virtio_block(FOCAL_IMAGE_NAME, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_virtio_block_qcow2() {
|
||||||
|
_test_virtio_block(FOCAL_IMAGE_NAME_QCOW2, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user