Add device passthrough tests for Cloud Hypervisor platform#4250
Merged
Add device passthrough tests for Cloud Hypervisor platform#4250
Conversation
4efc1d3 to
97e0658
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Cloud Hypervisor–specific device passthrough validation and NIC passthrough performance testing, plus small network tool enhancements to support interface-bound benchmarking.
Changes:
- Extend
netperfandiperf3tool wrappers with optional interface/IP binding parameters. - Add a new Cloud Hypervisor NIC passthrough performance test suite covering iperf3/netperf/ntttcp scenarios.
- Add a functional test suite to validate passthrough devices are visible inside the guest.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lisa/tools/netperf.py | Adds optional local interface IP binding support for netserver/netperf client. |
| lisa/tools/iperf3.py | Adds optional server bind address support (-B) for interface-specific testing. |
| lisa/microsoft/testsuites/performance/networkperf_passthrough.py | Introduces new NIC passthrough performance suite for Cloud Hypervisor (host-guest and guest-guest). |
| lisa/microsoft/testsuites/performance/common.py | Enhances perf helpers to optionally bind to internal addresses for interface-specific runs. |
| lisa/microsoft/testsuites/device_passthrough/functional_tests.py | Adds functional validation that passthrough devices appear in-guest via lspci. |
| lisa/microsoft/testsuites/device_passthrough/init.py | New package init for the passthrough functional suite. |
**Key Test Cases:**
verify_device_passthrough_on_guest|perf_tcp_iperf_passthrough_host_guest|perf_tcp_single_pps_passthrough_host_guest|perf_tcp_iperf_passthrough_two_guest
**Impacted LISA Features:**
NetworkInterface
**Tested Azure Marketplace Images:**
- canonical 0001-com-ubuntu-server-jammy 22_04-lts latest
lisa/microsoft/testsuites/performance/networkperf_passthrough.py
Outdated
Show resolved
Hide resolved
lisa/microsoft/testsuites/performance/networkperf_passthrough.py
Outdated
Show resolved
Hide resolved
lisa/microsoft/testsuites/device_passthrough/functional_tests.py
Outdated
Show resolved
Hide resolved
lisa/microsoft/testsuites/device_passthrough/functional_tests.py
Outdated
Show resolved
Hide resolved
lisa/microsoft/testsuites/device_passthrough/functional_tests.py
Outdated
Show resolved
Hide resolved
baf8803 to
9b52fa0
Compare
LiliDeng
reviewed
Jan 25, 2026
9b52fa0 to
8063de9
Compare
LiliDeng
reviewed
Jan 28, 2026
lisa/microsoft/testsuites/performance/networkperf_passthrough.py
Outdated
Show resolved
Hide resolved
09b7199 to
8063de9
Compare
f3a8325 to
bee6d40
Compare
LiliDeng
reviewed
Feb 3, 2026
lisa/microsoft/testsuites/performance/networkperf_passthrough.py
Outdated
Show resolved
Hide resolved
bee6d40 to
940aad7
Compare
Add test case to verify if passthrough-devices are visible to guest for CH platform Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
Add testcases for nttcp/iperf3/netperf for NIC device passthrough cases for host-guest and guest-guest scenarios. Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
- Add missing __init__.py for device_passthrough package - Fix unsafe pool.devices[0] access with validation - Fix class name typo: NetworkPerformace -> NetworkPerformance - Add validation for device_addr to prevent None usage - Fix logic bug: validate only the node parameter, not all node spaces - Remove unused parameters (log, log_path, variables) from functional test - Update descriptions: replace 'sriov' with 'passthrough' for accuracy - Improve error messages with more context - Add timeout documentation comments - Clarify server_ip vs interface_ip usage in common.py - Add pool_type validation before dictionary access - Move device_passthrough tests to correct location for test discovery 1. Identifies interface by PCI address first (before dhclient) 2. Brings interface UP with 'ip link set up' 3. Waits for carrier detection (30s timeout) 4. Then runs dhclient to get IP address This ensures the physical link is established before DHCP configuration.
940aad7 to
07862dd
Compare
LiliDeng
approved these changes
Feb 4, 2026
LiliDeng
reviewed
Feb 4, 2026
|
|
||
| client_node = cast(RemoteNode, environment.nodes[0]) | ||
| client, client_nic_name = self._configure_passthrough_nic_for_node(client_node) | ||
| server_node = cast(RemoteNode, environment.nodes[1]) |
Collaborator
There was a problem hiding this comment.
@copilot for any test case in this file which has TestCaseMetadata, if it uses _configure_passthrough_nic_for_node, please set supported_platform_type=[CLOUD_HYPERVISOR], in case node_requirement
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.
This PR adds comprehensive device passthrough testing support for the Cloud Hypervisor platform.
Changes included:
Device Passthrough Functional Tests
NIC Passthrough Performance Tests
Tool Enhancements
interface_ipparameter tonetperf.run_as_server()andnetperf.run_as_client_async()interface_ipparameter toiperf3.run_as_server_async()Signed-off-by: Smit Gardhariya sgardhariya@microsoft.com
Co-authored-by: Vivek Yadav vyadav@microsoft.com