From a47da51539722b5d414ca02c074f3f8488162899 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 3 Aug 2020 08:51:42 +0000 Subject: [PATCH] ci: AArch64: Enable basic virtio_vsock test case for AArch64 This commit enables the test case for testing the basic function of virtio_vsock (i.e. without the hotplug). Signed-off-by: Henry Wang --- scripts/run_integration_tests_aarch64.sh | 19 ++++++------------- scripts/sha1sums-aarch64 | 4 ++-- tests/integration.rs | 6 ++++-- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index f8476e360..c4fa1967f 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -40,30 +40,23 @@ update_workloads() { popd fi - FOCAL_OS_IMAGE_DOWNLOAD_NAME="focal-server-cloudimg-arm64.img" - FOCAL_OS_IMAGE_DOWNLOAD_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$FOCAL_OS_IMAGE_DOWNLOAD_NAME" - FOCAL_OS_DOWNLOAD_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_IMAGE_DOWNLOAD_NAME" - if [ ! -f "$FOCAL_OS_DOWNLOAD_IMAGE" ]; then - pushd $WORKLOADS_DIR - time wget --quiet $FOCAL_OS_IMAGE_DOWNLOAD_URL || exit 1 - popd - fi - - FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-arm64.raw" + FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-arm64-custom.raw" + FOCAL_OS_RAW_IMAGE_DOWNLOAD_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$FOCAL_OS_RAW_IMAGE_NAME" FOCAL_OS_RAW_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_NAME" if [ ! -f "$FOCAL_OS_RAW_IMAGE" ]; then pushd $WORKLOADS_DIR - time qemu-img convert -p -f qcow2 -O raw $FOCAL_OS_IMAGE_DOWNLOAD_NAME $FOCAL_OS_RAW_IMAGE_NAME || exit 1 + time wget --quiet $FOCAL_OS_RAW_IMAGE_DOWNLOAD_URL || exit 1 popd fi # Convert the raw image to qcow2 image to remove compressed blocks from the disk. Therefore letting the # qcow2 format image can be directly used in the integration test. - FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME="focal-server-cloudimg-arm64.qcow2" + FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME="focal-server-cloudimg-arm64-custom.qcow2" + FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_DOWNLOAD_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME" FOCAL_OS_QCOW2_UNCOMPRESSED_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME" if [ ! -f "$FOCAL_OS_QCOW2_UNCOMPRESSED_IMAGE" ]; then pushd $WORKLOADS_DIR - time qemu-img convert -p -f raw -O qcow2 $FOCAL_OS_RAW_IMAGE_NAME $FOCAL_OS_QCOW2_UNCOMPRESSED_IMAGE || exit 1 + time wget --quiet $FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_DOWNLOAD_URL || exit 1 popd fi diff --git a/scripts/sha1sums-aarch64 b/scripts/sha1sums-aarch64 index dc4206036..6b56ef619 100644 --- a/scripts/sha1sums-aarch64 +++ b/scripts/sha1sums-aarch64 @@ -3,5 +3,5 @@ 34039f2fc4242acff0d42af82fbee91070978da3 bionic-server-cloudimg-arm64.qcow2 e4addb6e212a298144f9eb0eb6e36019d013f0e7 alpine-minirootfs-aarch64.tar.gz b94d74e4af195ee3fbd1e2b8fce46e034b6120e6 focal-server-cloudimg-arm64.img -b48be83f4d507563cef24f22c70655d287ce3ef9 focal-server-cloudimg-arm64.raw -af0bba59337bb28079ce40f15c534f1efed6f99b focal-server-cloudimg-arm64.qcow2 +063d1a9f32db641138e6e0c53f58e6545a3d48e6 focal-server-cloudimg-arm64-custom.raw +013837926872f1c7d1b3a1a95305e4a31c8600ab focal-server-cloudimg-arm64-custom.qcow2 diff --git a/tests/integration.rs b/tests/integration.rs index 3a759cdc1..afd30c9df 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -87,7 +87,7 @@ mod tests { #[cfg(target_arch = "aarch64")] const BIONIC_IMAGE_NAME: &str = "bionic-server-cloudimg-arm64"; #[cfg(target_arch = "aarch64")] - const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64"; + const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom"; const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=ttyS0 console=hvc0 quiet rw"; @@ -1816,6 +1816,9 @@ mod tests { guest.check_vsock(socket.as_str()); #[cfg(not(feature = "mmio"))] + // AArch64 currently does not support reboot, and therefore we + // skip the reboot test here. + #[cfg(target_arch = "x86_64")] { let reboot_count = guest .ssh_command("sudo journalctl | grep -c -- \"-- Reboot --\"") @@ -3565,7 +3568,6 @@ mod tests { } #[test] - #[cfg(target_arch = "x86_64")] fn test_virtio_vsock() { _test_virtio_vsock(false) }