Use passthrough context in guest validation#4478
Merged
Merged
Conversation
The device passthrough functional test was deriving expected guest devices from platform.platform_runbook.device_pools. That makes the test strongly depend on platform runbook configuration and fails in auto-discovery scenarios where the runtime has assigned devices but the platform runbook does not expose device_pools in the expected shape. Use the libvirt node context instead. The platform records the concrete devices assigned to the VM in node_context.passthrough_devices, so the test now resolves vendor/device IDs from those assigned host PCI addresses and validates that matching devices are visible in the guest. This keeps validation tied to runtime assignment state instead of the original pool definition and removes the extra runbook parsing paths for vendor/device IDs and BDF dictionaries.
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the device passthrough functional test to validate guest-visible devices based on the libvirt runtime node context (node_context.passthrough_devices) rather than deriving expectations from platform_runbook.device_pools, improving compatibility with auto-discovery/runtime assignment scenarios.
Changes:
- Resolve expected vendor/device IDs from the concrete host PCI devices recorded in
node_context.passthrough_devices. - Remove runbook-driven device pool parsing (including dict fallbacks and BDF normalization helpers) from the test.
- Validate guest visibility counts by aggregating assigned devices per
(pool_type, vendor_id, device_id).
pupacha
approved these changes
May 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.
The device passthrough functional test was deriving expected guest devices from platform.platform_runbook.device_pools. That makes the test strongly depend on platform runbook configuration and fails in auto-discovery scenarios where the runtime has assigned devices but the platform runbook does not expose device_pools in the expected shape.
Use the libvirt node context instead. The platform records the concrete devices assigned to the VM in node_context.passthrough_devices, so the test now resolves vendor/device IDs from those assigned host PCI addresses and validates that matching devices are visible in the guest.
This keeps validation tied to runtime assignment state instead of the original pool definition and removes the extra runbook parsing paths for vendor/device IDs and BDF dictionaries.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results