diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 9f459267a..28a46f582 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -49,6 +49,8 @@ mod x86_64 { "jammy-server-cloudimg-amd64-custom-20241017-0-backing-zstd.qcow2"; pub const JAMMY_IMAGE_NAME_QCOW2_BACKING_UNCOMPRESSED_FILE: &str = "jammy-server-cloudimg-amd64-custom-20241017-0-backing-uncompressed.qcow2"; + pub const JAMMY_IMAGE_NAME_QCOW2_BACKING_RAW_FILE: &str = + "jammy-server-cloudimg-amd64-custom-20241017-0-backing-raw.qcow2"; pub const WINDOWS_IMAGE_NAME: &str = "windows-server-2022-amd64-2.raw"; pub const OVMF_NAME: &str = "CLOUDHV.fd"; pub const GREP_SERIAL_IRQ_CMD: &str = "grep -c 'IO-APIC.*ttyS0' /proc/interrupts || true"; @@ -74,6 +76,8 @@ mod aarch64 { "jammy-server-cloudimg-arm64-custom-20220329-0-backing-zstd.qcow2"; pub const JAMMY_IMAGE_NAME_QCOW2_BACKING_UNCOMPRESSED_FILE: &str = "jammy-server-cloudimg-arm64-custom-20220329-0-backing-uncompressed.qcow2"; + pub const JAMMY_IMAGE_NAME_QCOW2_BACKING_RAW_FILE: &str = + "jammy-server-cloudimg-arm64-custom-20220329-0-backing-raw.qcow2"; pub const WINDOWS_IMAGE_NAME: &str = "windows-11-iot-enterprise-aarch64.raw"; pub const OVMF_NAME: &str = "CLOUDHV_EFI.fd"; pub const GREP_SERIAL_IRQ_CMD: &str = "grep -c 'GICv3.*uart-pl011' /proc/interrupts || true"; @@ -3574,6 +3578,11 @@ mod common_parallel { ); } + #[test] + fn test_virtio_block_qcow2_backing_raw_file() { + _test_virtio_block(JAMMY_IMAGE_NAME_QCOW2_BACKING_RAW_FILE, false, false, true); + } + #[test] fn test_virtio_block_vhd() { let mut workload_path = dirs::home_dir().unwrap(); diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index c13d7b9ad..f3fee6007 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -100,6 +100,16 @@ update_workloads() { popd || exit fi + JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME="jammy-server-cloudimg-arm64-custom-20220329-0-backing-raw.qcow2" + JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME" + if [ ! -f "$JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE" ]; then + pushd "$WORKLOADS_DIR" || exit + time qemu-img create -f qcow2 \ + -b "$JAMMY_OS_RAW_IMAGE" \ + -F raw $JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME + popd || exit + fi + ALPINE_MINIROOTFS_URL="http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/aarch64/alpine-minirootfs-3.11.3-aarch64.tar.gz" ALPINE_MINIROOTFS_TARBALL="$WORKLOADS_DIR/alpine-minirootfs-aarch64.tar.gz" if [ ! -f "$ALPINE_MINIROOTFS_TARBALL" ]; then diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index 32983672b..5eb8531d4 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -100,6 +100,16 @@ if [ ! -f "$JAMMY_OS_QCOW_BACKING_UNCOMPRESSED_FILE_IMAGE" ]; then popd || exit fi +JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20241017-0-backing-raw.qcow2" +JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME" +if [ ! -f "$JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE" ]; then + pushd "$WORKLOADS_DIR" || exit + time qemu-img create -f qcow2 \ + -b "$JAMMY_OS_RAW_IMAGE" \ + -F raw $JAMMY_OS_QCOW_BACKING_RAW_FILE_IMAGE_NAME + popd || exit +fi + ALPINE_MINIROOTFS_URL="http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/x86_64/alpine-minirootfs-3.11.3-x86_64.tar.gz" ALPINE_MINIROOTFS_TARBALL="$WORKLOADS_DIR/alpine-minirootfs-x86_64.tar.gz" if [ ! -f "$ALPINE_MINIROOTFS_TARBALL" ]; then