mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
tests: Move to use Jammy guest image for test_vfio_user
Fixes: #3495 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
661e5eb084
commit
0e2cb9fd06
@ -71,6 +71,23 @@ if [ ! -f "$FOCAL_OS_RAW_IMAGE" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
JAMMY_OS_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20220329-0.qcow2"
|
||||
JAMMY_OS_IMAGE_URL="https://cloud-hypervisor.azureedge.net/$JAMMY_OS_IMAGE_NAME"
|
||||
JAMMY_OS_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_IMAGE_NAME"
|
||||
if [ ! -f "$JAMMY_OS_IMAGE" ]; then
|
||||
pushd $WORKLOADS_DIR
|
||||
time wget --quiet $JAMMY_OS_IMAGE_URL || exit 1
|
||||
popd
|
||||
fi
|
||||
|
||||
JAMMY_OS_RAW_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20220329-0.raw"
|
||||
JAMMY_OS_RAW_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_RAW_IMAGE_NAME"
|
||||
if [ ! -f "$JAMMY_OS_RAW_IMAGE" ]; then
|
||||
pushd $WORKLOADS_DIR
|
||||
time qemu-img convert -p -f qcow2 -O raw $JAMMY_OS_IMAGE_NAME $JAMMY_OS_RAW_IMAGE_NAME || exit 1
|
||||
popd
|
||||
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
|
||||
|
@ -3,3 +3,5 @@
|
||||
d4a44acc6014d5f83dea1c625c43d677a95fa75f alpine-minirootfs-x86_64.tar.gz
|
||||
f1eccdc5e1b515dbad294426ab081b47ebfb97c0 focal-server-cloudimg-amd64-custom-20210609-0.qcow2
|
||||
7f5a8358243a96adf61f5c20139b29f308f2c0e3 focal-server-cloudimg-amd64-custom-20210609-0.raw
|
||||
272102ac243e544bc5c2303f383eeb217bd2e446 jammy-server-cloudimg-amd64-custom-20220329-0.qcow2
|
||||
0b5b4816a0976c458f8e8bab061e9d63ebc1b806 jammy-server-cloudimg-amd64-custom-20220329-0.raw
|
@ -43,6 +43,7 @@ mod x86_64 {
|
||||
pub const FOCAL_IMAGE_NAME_QCOW2: &str = "focal-server-cloudimg-amd64-custom-20210609-0.qcow2";
|
||||
pub const FOCAL_IMAGE_NAME_VHD: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhd";
|
||||
pub const FOCAL_IMAGE_NAME_VHDX: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhdx";
|
||||
pub const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-custom-20220329-0.raw";
|
||||
pub const WINDOWS_IMAGE_NAME: &str = "windows-server-2019.raw";
|
||||
pub const OVMF_NAME: &str = "CLOUDHV.fd";
|
||||
pub const GREP_SERIAL_IRQ_CMD: &str = "grep -c 'IO-APIC.*ttyS0' /proc/interrupts || true";
|
||||
@ -5764,16 +5765,12 @@ mod parallel {
|
||||
exec_host_command_status("pkill -f nvmf_tgt");
|
||||
}
|
||||
|
||||
#[ignore]
|
||||
#[test]
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
fn test_vfio_user() {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
let focal_image = FOCAL_IMAGE_UPDATE_KERNEL_NAME.to_string();
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
let focal_image = FOCAL_IMAGE_NAME.to_string();
|
||||
let focal = UbuntuDiskConfig::new(focal_image);
|
||||
let guest = Guest::new(Box::new(focal));
|
||||
let jammy_image = JAMMY_IMAGE_NAME.to_string();
|
||||
let jammy = UbuntuDiskConfig::new(jammy_image);
|
||||
let guest = Guest::new(Box::new(jammy));
|
||||
|
||||
let spdk_nvme_dir = guest.tmp_dir.as_path().join("test-vfio-user");
|
||||
setup_spdk_nvme(spdk_nvme_dir.as_path());
|
||||
|
Loading…
Reference in New Issue
Block a user