Add dual NIC passthrough validation - #4579
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the device passthrough test coverage by adding a functional validation for dual PCI NIC passthrough on a single guest, and adjusts requirement/merging behavior so runbook-provided platform defaults remain intact while test cases can narrow specific passthrough requirements (e.g., per-node device counts).
Changes:
- Adjust platform-vs-case extended schema merging so platform schemas act as defaults and case requirements can narrow/override specific fields.
- Add a functional test case that validates two
pci_netpassthrough devices are assigned and visible in-guest (via vendor/device ID checks withlspci). - Refactor two-guest passthrough perf cases to use an explicit “one PCI NIC per node” requirement (to avoid dual-NIC functional runbooks impacting two-node perf topology).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lisa/runners/lisa_runner.py | Changes extended schema merge order so platform schemas provide defaults and test requirements can override/narrow specific fields. |
| lisa/microsoft/testsuites/performance/networkperf_passthrough.py | Introduces a shared two-guest passthrough requirement with explicit per-node PCI NIC passthrough config. |
| lisa/microsoft/testsuites/device_passthrough/functional_tests.py | Adds a dual-NIC passthrough functional validation and refactors passthrough-context parsing into reusable helpers. |
|
| Count | |
|---|---|
| ✅ Passed | 12 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 3 |
| Total | 15 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ✅ PASSED | 5475.946 | |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 184.135 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 1992.615 | |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5343.001 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1626.208 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4416.958 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1053.806 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 4483.674 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4368.976 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 179.157 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 167.819 | |
| perf_tcp_max_pps_sriov (lisa_0_17) | ✅ PASSED | 132.472 |
d0f7c9b to
714f8b0
Compare
714f8b0 to
6c206a3
Compare
|
| Count | |
|---|---|
| ✅ Passed | 3 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 4 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 194.546 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2049.443 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1620.726 |
|
| Count | |
|---|---|
| ✅ Passed | 1 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 2 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 196.029 |
9ad3ee1 to
5957360
Compare
|
| Count | |
|---|---|
| ✅ Passed | 1 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 2 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 195.208 |
|
| Count | |
|---|---|
| ✅ Passed | 11 |
| ❌ Failed | 1 |
| ⏭️ Skipped | 3 |
| Total | 15 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_kvm_storage_singledisk (lisa_0_2) | ❌ FAILED | 904.072 | failed. LisaException: command '['sudo', 'sh', '-c', 'openssl passwd -6 #htOSL%7CU2pSY18']' timeout after 600 seconds. |
| perf_nested_hyperv_storage_multidisk (lisa_0_5) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1615.397 | |
| perf_ultra_datadisks_1024k (lisa_0_36) | ✅ PASSED | 1275.177 | |
| perf_storage_generic_fio_test (lisa_0_52) | ✅ PASSED | 3538.976 | |
| perf_resource_disk_4k (lisa_0_44) | ✅ PASSED | 4423.275 | |
| perf_ultra_datadisks_4k (lisa_0_35) | ✅ PASSED | 4379.816 | |
| perf_nvme_io_uring (lisa_0_1) | ✅ PASSED | 5346.926 | |
| perf_epoll (lisa_0_11) | ✅ PASSED | 194.933 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2082.345 | |
| perf_tcp_latency_sriov (lisa_0_13) | ✅ PASSED | 350.964 | |
| perf_tcp_single_pps_sriov (lisa_0_15) | ✅ PASSED | 205.895 | |
| perf_tcp_max_pps_sriov (lisa_0_17) | ✅ PASSED | 143.893 |
5957360 to
6e586e2
Compare
24f3454 to
62ae85b
Compare
|
| Count | |
|---|---|
| ✅ Passed | 3 |
| ❌ Failed | 0 |
| ⏭️ Skipped | 1 |
| Total | 4 |
Test case details
| Test Case | Status | Time (s) | Message |
|---|---|---|---|
| perf_nested_hyperv_storage_singledisk (lisa_0_4) | ⏭️ SKIPPED | 0.000 | check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper |
| perf_epoll (lisa_0_11) | ✅ PASSED | 194.380 | |
| perf_messaging (lisa_0_10) | ✅ PASSED | 2030.686 | |
| perf_resource_disk_1024k (lisa_0_43) | ✅ PASSED | 1616.670 |
✅ 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
|
62ae85b to
0bea911
Compare
✅ 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
|
Record each runbook-requested passthrough count in the Cloud Hypervisor, Hyper-V, and OpenVMM runtime device contexts. Fail the generic guest validation if a runtime assignment contains fewer devices than requested, aggregate identical PCI IDs globally so one guest device cannot satisfy multiple assignments, and continue allowing whole-IOMMU-group over-allocation. Report requested, assigned, and verified device totals per pool in the passed test result summary.
0bea911 to
c9fd28c
Compare
✅ 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
|
Validate every libvirt and Hyper-V passthrough request before allocating devices or enabling passthrough. Fail with an actionable error when a runbook count is nonpositive, preventing partial allocation and deferred functional-test failures.
✅ 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
|
Example:
Passthrough devices tested: pci_net: requested=2, assigned=2, verified=2Existing resource-exhaustion behavior is preserved, and this change does not modify two-guest performance tests or runner requirement precedence.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results