From 320c96a9e20e25d105786d62e52717a3aa72ec41 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 19 Jul 2026 09:48:29 +0200 Subject: [PATCH] tests: Cap concurrent Windows guests with a nextest profile Each Windows integration test boots a full Windows Server guest using several vCPUs and gigabytes of RAM. nextest runs up to one test per logical CPU by default, so the whole suite started at once and thrashed the host. Add a dedicated 'windows' nextest profile that inherits from integration and assigns the tests to a 'windows' test group capped at four concurrent runs. Point the Windows test scripts at the profile and drop the redundant retries flag, which now comes from the profile. Running the tests in parallel is safe because every guest gets a unique network via next_guest_id, so there is no shared address to conflict over. Assisted-by: Claude:Opus-4.8 Signed-off-by: Anatol Belski --- .config/nextest.toml | 12 ++++++++++++ scripts/run_integration_tests_windows_aarch64.sh | 4 +--- scripts/run_integration_tests_windows_x86_64.sh | 4 +--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.config/nextest.toml b/.config/nextest.toml index 4c5f04191..fe1e30010 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -2,6 +2,9 @@ # Don't let one individual test run for more than 10 minutes slow-timeout = { period = "60s", terminate-after = 10 } +[test-groups] +windows = { max-threads = 4 } + [profile.integration] fail-fast = false retries = 3 @@ -36,3 +39,12 @@ junit.path = "/root/workloads/junit/ivshmem.xml" inherits = "integration" default-filter = 'test(common_cvm::)' junit.path = "/root/workloads/junit/cvm.xml" + +[profile.windows] +inherits = "integration" +default-filter = 'test(windows::)' +junit.path = "/root/workloads/junit/windows.xml" + +[[profile.windows.overrides]] +filter = 'test(windows::)' +test-group = 'windows' diff --git a/scripts/run_integration_tests_windows_aarch64.sh b/scripts/run_integration_tests_windows_aarch64.sh index d41889965..33d11ef66 100755 --- a/scripts/run_integration_tests_windows_aarch64.sh +++ b/scripts/run_integration_tests_windows_aarch64.sh @@ -67,9 +67,7 @@ export RUSTFLAGS="$RUSTFLAGS" cargo build --all --release --target "$BUILD_TARGET" -# Only run with 1 thread to avoid tests interfering with one another because -# Windows has a static IP configured -time cargo nextest run -p cloud-hypervisor --retries 3 --no-tests=pass "windows::$test_filter" --target "$BUILD_TARGET" -- ${test_binary_args[*]} +time cargo nextest run -p cloud-hypervisor --profile windows --no-tests=pass "windows::$test_filter" --target "$BUILD_TARGET" -- ${test_binary_args[*]} RES=$? # Tear down the base and any per-test snapshot devices left over from a crash, diff --git a/scripts/run_integration_tests_windows_x86_64.sh b/scripts/run_integration_tests_windows_x86_64.sh index 383306294..31a758d4e 100755 --- a/scripts/run_integration_tests_windows_x86_64.sh +++ b/scripts/run_integration_tests_windows_x86_64.sh @@ -72,9 +72,7 @@ cargo build --features mshv --all --release --target "$BUILD_TARGET" export RUST_BACKTRACE=1 export RUSTFLAGS="$RUSTFLAGS" -# Only run with 1 thread to avoid tests interfering with one another because -# Windows has a static IP configured -time cargo nextest run -p cloud-hypervisor --retries 3 --no-tests=pass $test_features "windows::$test_filter" --target "$BUILD_TARGET" -- ${test_binary_args[*]} +time cargo nextest run -p cloud-hypervisor --profile windows --no-tests=pass $test_features "windows::$test_filter" --target "$BUILD_TARGET" -- ${test_binary_args[*]} RES=$? # Tear down the base and any per-test snapshot devices left over from a crash,