From f73a3451077cd204b8753dca8e9ada28d857dd2d Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 15 Oct 2020 14:20:29 +0200 Subject: [PATCH] scripts: Remove all references to 'mmio' feature Signed-off-by: Sebastien Boeuf --- scripts/dev_cli.sh | 2 +- scripts/run_cargo_tests.sh | 10 ++++------ scripts/run_integration_tests_aarch64.sh | 16 ++-------------- scripts/run_integration_tests_sgx.sh | 9 --------- scripts/run_integration_tests_x86_64.sh | 20 -------------------- scripts/run_unit_tests.sh | 2 +- 6 files changed, 8 insertions(+), 51 deletions(-) diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 4ca4fc500..d49fd9110 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -210,7 +210,7 @@ cmd_build() { [ $build = "release" ] && cargo_args+=("--release") cargo_args+=(--target "$target") [ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features") - [ $(uname -m) = "aarch64" ] && cargo_args+=(--features "mmio,kvm") + [ $(uname -m) = "aarch64" ] && cargo_args+=(--features "kvm") rustflags="" if [ $(uname -m) = "aarch64" ] && [ $libc = "musl" ] ; then diff --git a/scripts/run_cargo_tests.sh b/scripts/run_cargo_tests.sh index 0b878275b..20127dfe0 100755 --- a/scripts/run_cargo_tests.sh +++ b/scripts/run_cargo_tests.sh @@ -15,11 +15,9 @@ time cargo rustc --bin cloud-hypervisor -- -D warnings time cargo rustc -p vhost_user_net --bin vhost_user_net -- -D warnings time cargo test time cargo audit -time cargo clippy --all-targets --no-default-features --features "pci,acpi,kvm" -- -D warnings -time cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,acpi,kvm" -- -D warnings -time cargo clippy --all-targets --no-default-features --features "pci,kvm" -- -D warnings -time cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,kvm" -- -D warnings -time cargo clippy --all-targets --no-default-features --features "mmio,kvm" -- -D warnings -time cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio,kvm" -- -D warnings +time cargo clippy --all-targets --no-default-features --features "acpi,kvm" -- -D warnings +time cargo rustc --bin cloud-hypervisor --no-default-features --features "acpi,kvm" -- -D warnings +time cargo clippy --all-targets --no-default-features --features "kvm" -- -D warnings +time cargo rustc --bin cloud-hypervisor --no-default-features --features "kvm" -- -D warnings time cargo fmt -- --check time cargo build --all --release diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index a6a189f1e..124188652 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -185,7 +185,7 @@ TARGET_CC="musl-gcc" CFLAGS="-I /usr/include/aarch64-linux-musl/ -idirafter /usr/include/" fi -cargo build --all --release --no-default-features --features pci,kvm --target $BUILD_TARGET +cargo build --all --release --no-default-features --features kvm --target $BUILD_TARGET strip target/$BUILD_TARGET/release/cloud-hypervisor strip target/$BUILD_TARGET/release/vhost_user_net strip target/$BUILD_TARGET/release/ch-remote @@ -197,21 +197,9 @@ sudo bash -c "echo 10 > /sys/kernel/mm/ksm/sleep_millisecs" sudo bash -c "echo 1 > /sys/kernel/mm/ksm/run" export RUST_BACKTRACE=1 -time cargo test --no-default-features --features "integration_tests,pci,kvm" "tests::parallel::$@" -- --skip test_snapshot_restore +time cargo test --no-default-features --features "integration_tests,kvm" "tests::parallel::$@" -- --skip test_snapshot_restore RES=$? -if [ $RES -eq 0 ]; then - # virtio-mmio based testing - cargo build --release --target $BUILD_TARGET --no-default-features --features "mmio,kvm" - strip target/$BUILD_TARGET/release/cloud-hypervisor - strip target/$BUILD_TARGET/release/vhost_user_net - strip target/$BUILD_TARGET/release/ch-remote - - export RUST_BACKTRACE=1 - time cargo test --no-default-features --features "integration_tests,mmio,kvm" "tests::parallel::$@" - RES=$? -fi - # Tear vhost_user_net test network down sudo ip link del vunet-tap0 sudo ip link del vunet-tap1 diff --git a/scripts/run_integration_tests_sgx.sh b/scripts/run_integration_tests_sgx.sh index 69a6a8ee8..806ada439 100755 --- a/scripts/run_integration_tests_sgx.sh +++ b/scripts/run_integration_tests_sgx.sh @@ -19,13 +19,4 @@ export RUST_BACKTRACE=1 time cargo test --features "integration_tests" "tests::sgx::$@" RES=$? -if [ $RES -eq 0 ]; then - # virtio-mmio based testing - cargo build --all --release --target $BUILD_TARGET --no-default-features --features "mmio,kvm" - strip target/$BUILD_TARGET/release/cloud-hypervisor - - time cargo test --features "integration_tests,mmio" "tests::sgx::$@" - RES=$? -fi - exit $RES diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index f29ee4084..798d9b2fb 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -232,26 +232,6 @@ if [ $RES -eq 0 ]; then RES=$? fi -if [ $RES -eq 0 ]; then - # virtio-mmio based testing - cargo build --all --release --target $BUILD_TARGET --no-default-features --features "mmio,kvm" - strip target/$BUILD_TARGET/release/cloud-hypervisor - strip target/$BUILD_TARGET/release/vhost_user_net - strip target/$BUILD_TARGET/release/ch-remote - - export RUST_BACKTRACE=1 - time cargo test --features "integration_tests,mmio" "tests::parallel::$@" - RES=$? - - # Run some tests in sequence since the result could be affected by other tests - # running in parallel. - if [ $RES -eq 0 ]; then - export RUST_BACKTRACE=1 - time cargo test --features "integration_tests,mmio" "tests::sequential::$@" -- --test-threads=1 - RES=$? - fi -fi - # Tear VFIO test network down sudo ip link del vfio-br0 sudo ip link del vfio-tap0 diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 48299c4ab..dea876542 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -5,7 +5,7 @@ source $HOME/.cargo/env BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu} cargo_args=("$@") [ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features") -[ $(uname -m) = "aarch64" ] && cargo_args+=("--features mmio,kvm") +[ $(uname -m) = "aarch64" ] && cargo_args+=("--features kvm") export RUST_BACKTRACE=1 cargo test --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1;