Conversation
🤖 AI Test SelectionNo test cases were selected for this PR. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Cloud Hypervisor test harness to run live migration tests through the CLI path and to build a shell-safe nextest filter expression while preserving the base filter behavior.
Changes:
- Route live migration execution through the integration CLI test type and apply a nextest
--filterset-based filter. - Add helper logic to construct a combined nextest filterset (base substring + include + exclude).
- Adjust subtest listing and run orchestration to support
cli_test_type/cli_test_filteroverrides.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lisa/microsoft/testsuites/cloud_hypervisor/ch_tests.py | Switch live migration run to the CLI integration path and pass only/skip plus CLI filtering parameters. |
| lisa/microsoft/testsuites/cloud_hypervisor/ch_tests_tool.py | Add nextest filterset construction and CLI-path execution for filtered runs, plus supporting subtest prep parameters. |
Run Cloud Hypervisor live migration tests through the CLI path and construct the nextest filter as a shell-safe expression. Preserve the base test filter while excluding the serial-only live migration test from the parallel run.
🤖 AI Test SelectionNo test cases were selected for this PR. |
LiliDeng
previously approved these changes
Jun 29, 2026
anirudhrb
requested changes
Jun 29, 2026
Replace the custom bash argument quoting helper with shlex.quote and quote the generated bash script as a whole before passing it to bash -lc. Remove the redundant cli_test_type override by running live migration through the integration test type and selecting live migration cases with the nextest filter.
🤖 AI Test SelectionNo test cases were selected for this PR. |
Derive the expected subtest set when running Cloud Hypervisor tests with a nextest CLI filter instead of passing an empty set into result processing. Fail fast if the filter and include/exclude lists select no subtests so a zero-test run cannot pass silently.
🤖 AI Test SelectionNo test cases were selected for this PR. |
anirudhrb
requested changes
Jul 1, 2026
Drop the only_test_prefixes parameter from the Cloud Hypervisor test runner because no caller supplies it. Remove the corresponding private prefix-filter branches so the run_tests signature only exposes supported include, exclude, and CLI substring filters.
🤖 AI Test SelectionNo test cases were selected for this PR. |
CH integration tests run under cargo-nextest, which rejects the libtest '-- -- --list' flag ('failed to parse test binary arguments --list: arguments are unsupported', exit 96). _list_subtests therefore returned an empty list and _prepare_filtered_subtests failed with 'No Cloud Hypervisor integration subtests matched filter', even though the tests exist and the nextest run path works.
List subtests with 'cargo nextest list --message-format json' instead, run in the dev container via 'dev_cli.sh shell' and mirroring the integration build env (mshv feature, devcli_testenv cfg). The return value stays the same List[str] of '<module>::<test>' names, so the runbook-driven include/exclude (only/skip/cli_test_filter), the no-match validation, and per-subtest result tracking are unchanged.
🤖 AI Test SelectionNo test cases were selected for this PR. |
The previous fix listed subtests via 'dev_cli.sh shell -- RUSTFLAGS=..(--cfg devcli_testenv).. cargo nextest list'. dev_cli.sh's shell command runs its arguments as 'bash -c \$*', which re-joins them on spaces and drops quoting, so the space inside the RUSTFLAGS value was split: bash set RUSTFLAGS=--cfg and then tried to run 'devcli_testenv' as a command (exit 127, 'devcli_testenv: command not found'). cargo never ran, the subtest list came back empty, and _prepare_filtered_subtests still failed with 'No subtests matched filter'.
Use the space-free 'RUSTFLAGS=--cfg=devcli_testenv' form so it survives the bash -c hand-off, and make the JSON parser scan each '{' for the nextest object with a 'rust-suites' map, since dev_cli.sh interleaves docker pull and cargo build output on the same stream.
🤖 AI Test SelectionNo test cases were selected for this PR. |
… of failing Cloud Hypervisor gates every live migration integration test behind cfg(not(feature = "mshv")). The mshv integration build (cargo nextest ... --features mshv) compiles them out, so _list_subtests correctly returns no live_migration tests and the "live_migration" substring filter matches nothing. _prepare_filtered_subtests previously called fail() in that case, turning a legitimately-empty selection into a hard AssertionError. This made verify_cloud_hypervisor_live_migration_tests fail on mshv even though the tests do not exist in that build (they had been silently passing before the subtest-list assertion was added). Raise SkippedException instead so an unavailable test family (live migration on mshv, or an include/exclude filter that removes all matches) is reported as a clean skip per LISA conventions. KVM builds (no mshv feature) still compile these tests, so the filter matches and they run normally.
🤖 AI Test SelectionNo test cases were selected for this PR. |
anirudhrb
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run Cloud Hypervisor live migration tests through the CLI path and construct the nextest filter as a shell-safe expression. Preserve the base test filter while excluding the serial-only live migration test from the parallel run.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results