From 196a59f2091fdbf019efcc8c848b23b3ecf88f28 Mon Sep 17 00:00:00 2001 From: Ravi kumar Veeramally Date: Mon, 23 Oct 2023 15:54:13 +0300 Subject: [PATCH] tests: Migrate docker container from ubuntu 20.04 to 22.04 The following tests have been temporarily disabled: 1. Live upgrade/migration test with ovs-dpdk (#5532); 2. Disk hotplug tests on windows guests (#6037); This patch has been tested with PR #6048. Signed-off-by: Ravi kumar Veeramally Signed-off-by: Michael Zhao Tested-by: Bo Chen (cherry picked from commit 24f384d2397a93ca32b7efcda2105e67bdac7b3c) --- resources/Dockerfile | 3 +-- scripts/dev_cli.sh | 8 +++----- scripts/run_integration_tests_aarch64.sh | 6 +++--- scripts/run_integration_tests_x86_64.sh | 2 +- tests/integration.rs | 8 ++++++-- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/resources/Dockerfile b/resources/Dockerfile index 3faa9c119..0b370061b 100644 --- a/resources/Dockerfile +++ b/resources/Dockerfile @@ -3,7 +3,7 @@ # When changing this file don't forget to update the tag name in the # .github/workflows/docker-image.yaml file if doing multiple per day -FROM ubuntu:20.04 as dev +FROM ubuntu:22.04 as dev ARG TARGETARCH ARG RUST_TOOLCHAIN="1.70.0" @@ -43,7 +43,6 @@ RUN apt-get update \ socat \ dosfstools \ cpio \ - python \ python3 \ python3-setuptools \ ntfs-3g \ diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 35d6f39ca..e2ca189c6 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -7,7 +7,7 @@ CLI_NAME="Cloud Hypervisor" CTR_IMAGE_TAG="ghcr.io/cloud-hypervisor/cloud-hypervisor" -CTR_IMAGE_VERSION="20231108-0" +CTR_IMAGE_VERSION="20231220-0" : "${CTR_IMAGE:=${CTR_IMAGE_TAG}:${CTR_IMAGE_VERSION}}" DOCKER_RUNTIME="docker" @@ -285,8 +285,7 @@ cmd_build() { rustflags="$RUSTFLAGS" target_cc="" if [ "$(uname -m)" = "aarch64" ] && [ "$libc" = "musl" ]; then - rustflags="$rustflags -C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs" - target_cc="musl-gcc" + rustflags="$rustflags -C link-args=-Wl,-Bstatic -C link-args=-lc" fi $DOCKER_RUNTIME run \ @@ -399,8 +398,7 @@ cmd_tests() { rustflags="$RUSTFLAGS" target_cc="" if [ "$(uname -m)" = "aarch64" ] && [ "$libc" = "musl" ]; then - rustflags="$rustflags -C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs" - target_cc="musl-gcc" + rustflags="$rustflags -C link-args=-Wl,-Bstatic -C link-args=-lc" fi if [[ "$unit" = true ]]; then diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index 5e40c6eb0..16e061cef 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -20,7 +20,7 @@ build_spdk_nvme() { sed -i "/grpcio/d" scripts/pkgdep/debian.sh ./scripts/pkgdep.sh ./configure --with-vfio-user - chmod +x /usr/local/lib/python3.8/dist-packages/ninja/data/bin/ninja + chmod +x /usr/local/lib/python3.10/dist-packages/ninja/data/bin/ninja make -j `nproc` || exit 1 touch .built popd @@ -30,7 +30,7 @@ build_spdk_nvme() { fi cp "$WORKLOADS_DIR/spdk/build/bin/nvmf_tgt" $SPDK_DEPLOY_DIR/nvmf_tgt cp "$WORKLOADS_DIR/spdk/scripts/rpc.py" $SPDK_DEPLOY_DIR/rpc.py - cp -r "$WORKLOADS_DIR/spdk/scripts/rpc" $SPDK_DEPLOY_DIR/rpc + cp -r "$WORKLOADS_DIR/spdk/python/spdk/" $SPDK_DEPLOY_DIR/ cp -r "$WORKLOADS_DIR/spdk/python" $SPDK_DEPLOY_DIR/../ } @@ -38,7 +38,7 @@ build_virtiofsd() { VIRTIOFSD_DIR="$WORKLOADS_DIR/virtiofsd_build" VIRTIOFSD_REPO="https://gitlab.com/virtio-fs/virtiofsd.git" - checkout_repo "$VIRTIOFSD_DIR" "$VIRTIOFSD_REPO" v1.1.0 "220405d7a2606c92636d31992b5cb3036a41047b" + checkout_repo "$VIRTIOFSD_DIR" "$VIRTIOFSD_REPO" v1.8.0 "97ea7908fe7f9bc59916671a771bdcfaf4044b45" if [ ! -f "$VIRTIOFSD_DIR/.built" ]; then pushd $VIRTIOFSD_DIR diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index 285a85393..e189b179d 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -116,7 +116,7 @@ if [ ! -f "$VIRTIOFSD" ]; then pushd $WORKLOADS_DIR git clone "https://gitlab.com/virtio-fs/virtiofsd.git" $VIRTIOFSD_DIR pushd $VIRTIOFSD_DIR - git checkout v1.1.0 + git checkout v1.8.0 time cargo build --release cp target/release/virtiofsd $VIRTIOFSD || exit 1 popd diff --git a/tests/integration.rs b/tests/integration.rs index 77500e157..561125f2a 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -4281,8 +4281,8 @@ mod common_parallel { fn test_vfio() { setup_vfio_network_interfaces(); - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = Guest::new_from_ip_range(Box::new(focal), "172.18", 0); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = Guest::new_from_ip_range(Box::new(jammy), "172.18", 0); let mut workload_path = dirs::home_dir().unwrap(); workload_path.push("workloads"); @@ -8055,6 +8055,7 @@ mod windows { } #[test] + #[ignore = "See #6037"] #[cfg(not(feature = "mshv"))] #[cfg(not(target_arch = "aarch64"))] fn test_windows_guest_disk_hotplug() { @@ -8150,6 +8151,7 @@ mod windows { } #[test] + #[ignore = "See #6037"] #[cfg(not(feature = "mshv"))] #[cfg(not(target_arch = "aarch64"))] fn test_windows_guest_disk_hotplug_multi() { @@ -9651,6 +9653,7 @@ mod live_migration { // Require to run ovs-dpdk tests sequentially because they rely on the same ovs-dpdk setup #[test] + #[ignore = "See #5532"] #[cfg(target_arch = "x86_64")] #[cfg(not(feature = "mshv"))] fn test_live_migration_ovs_dpdk() { @@ -9665,6 +9668,7 @@ mod live_migration { } #[test] + #[ignore = "See #5532"] #[cfg(target_arch = "x86_64")] #[cfg(not(feature = "mshv"))] fn test_live_upgrade_ovs_dpdk() {