Skip to content

vmm_tests_run: cleanup and multi suite support#3420

Merged
tjones60 merged 7 commits intomicrosoft:mainfrom
tjones60:fix_vmm_tests_run
May 6, 2026
Merged

vmm_tests_run: cleanup and multi suite support#3420
tjones60 merged 7 commits intomicrosoft:mainfrom
tjones60:fix_vmm_tests_run

Conversation

@tjones60
Copy link
Copy Markdown
Contributor

@tjones60 tjones60 commented May 4, 2026

This change refactors vmm-tests-run to improve readability and maintainability, while also fixing an issue where requirements for tests outside of the vmm_tests crate where lot detected. (This was causing tmk tests to fail).
Some highlights:

  • Iterate through all rust-suites objects in the cargo nextest list JSON output to fix mentioned bug.
  • Avoid using JSON as an intermediate data format between two Rust functions. Use Rust structs instead.
  • Avoid passing around unnecessary values and performing unnecessary checks in general.
  • Return error on error instead of constructing "null" results and then erroring out in the caller.
  • Use the same Rust struct with serde derive on both sides when collecting the artifacts with --list-required-artifacts instead of manually parsing the data. Use the GLOBAL_UNIQUE_ID constant when serializing ErasedArtifactHandle and for comparison when parsing the output on the other side so that the compiler enforces their existence rather than having arbitrary strings the must match.
  • Allow test-wide and artifact definition blob disk restrictions (in addition to artifact instance and environment variable restrictions).

@tjones60 tjones60 requested a review from a team as a code owner May 4, 2026 18:04
Copilot AI review requested due to automatic review settings May 4, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Refactors vmm_tests_run to discover and resolve required artifacts across multiple nextest rust suites, while also centralizing shared artifact metadata and adding options around nextest profile selection and prepped-VHD reuse.

Changes:

  • Reworked artifact discovery to parse all cargo nextest list rust suites and resolve artifact IDs from shared Rust types/constants instead of ad-hoc JSON/string mapping.
  • Moved shared artifact serialization and Azure blob metadata into common crates, updating download/resolver code to consume the shared definitions.
  • Added pipeline/runtime controls for nextest CI profile selection and optional reuse of prepped VHDs, plus matching nextest profile configuration.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
xtask/src/tasks/guest_test/download_image.rs Switches image download code to shared storage-account/container constants.
vmm_tests/vmm_test_images/src/lib.rs Re-exports shared blob-storage constants for test-image consumers.
vmm_tests/prep_steps/src/main.rs Adds optional reuse of already-prepped VHDs via environment variable.
vmm_tests/petri_artifacts_vmm_test/src/lib.rs Defines shared Azure blob storage constants in artifact metadata crate.
vmm_tests/petri_artifact_resolver_openvmm_known_paths/src/lib.rs Refactors known-artifact resolution to use KnownTestArtifacts directly.
petri/src/test.rs Switches artifact list output to shared struct/string serialization.
petri/petri_artifacts_core/src/lib.rs Adds shared ArtifactListOutput and string serialization for erased artifact handles.
petri/petri_artifacts_core/Cargo.toml Adds serde dependency needed for shared artifact-list structs.
flowey/flowey_lib_hvlite/src/lib.rs Removes the old artifact-to-build mapping module export.
flowey/flowey_lib_hvlite/src/init_vmm_tests_env.rs Threads prepped-VHD reuse into the VMM test environment setup.
flowey/flowey_lib_hvlite/src/download_openvmm_vmm_tests_artifacts.rs Reuses shared blob-storage constants during artifact downloads.
flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs Deletes the old artifact-mapping implementation and its tests.
flowey/flowey_lib_hvlite/src/_jobs/local_build_and_run_nextest_vmm_tests.rs Adds nextest-profile and prepped-VHD reuse parameters to the local VMM test job.
flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs Updates archive-consumption job to pass the new prepped-VHD reuse parameter.
flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Rewrites the pipeline to support multi-suite discovery, inline artifact resolution, and new CLI options.
flowey/flowey_hvlite/Cargo.toml Adds artifact crates needed by the inlined resolver logic.
.config/nextest.toml Adds default-profile timeout overrides for VMM test packages.
Comments suppressed due to low confidence (1)

flowey/flowey_lib_hvlite/src/lib.rs:1

  • Removing this public module changes the exported API of flowey_lib_hvlite. If downstream code imports flowey_lib_hvlite::artifact_to_build_mapping, this becomes a hard breaking change with no deprecation shim or migration path in the crate surface.
// Copyright (c) Microsoft Corporation.

Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Copilot AI review requested due to automatic review settings May 4, 2026 19:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated 7 comments.

Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread vmm_tests/prep_steps/src/main.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread petri/petri_artifacts_core/src/lib.rs Outdated
Comment thread .config/nextest.toml Outdated
Comment thread flowey/flowey_lib_hvlite/src/lib.rs Outdated
Comment thread vmm_tests/vmm_test_images/src/lib.rs
Copilot AI review requested due to automatic review settings May 5, 2026 00:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 8 comments.

Comment thread petri/petri_artifacts_core/src/lib.rs Outdated
Comment thread vmm_tests/petri_artifacts_vmm_test/src/lib.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread vmm_tests/vmm_test_macros/src/lib.rs Outdated
Comment thread flowey/flowey_hvlite/src/pipelines/vmm_tests_run.rs
Comment thread .config/nextest.toml
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Comment thread flowey/flowey_lib_hvlite/Cargo.toml
@tjones60 tjones60 merged commit 0a192e2 into microsoft:main May 6, 2026
115 of 121 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants