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 |
Add a device passthrough functional test that validates two pci_net devices assigned to a single guest. The test reads the runtime passthrough context, resolves the assigned host vendor and device IDs, and verifies the expected NICs are visible inside the guest. Keep Cloud Hypervisor two-guest passthrough performance tests compatible with dual-NIC runbooks by giving those cases an explicit one-PCI-NIC-per-node requirement. The override is scoped to Cloud Hypervisor so inactive platform schema keys are not passed to platform-specific schema loaders. Preserve platform extended schemas as defaults while allowing case requirements to narrow active fields such as device_passthrough.count. This lets the two-guest performance cases request one passthrough NIC per node while the dual-NIC functional case can still use the runbook default of two devices for one guest. Initialize the expected device map before populating assigned passthrough device counts so flake8 and runtime validation do not fail with an undefined variable.
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 |
Add a device passthrough functional test that validates two pci_net devices assigned to a single guest. The test reads the runtime passthrough context, resolves the assigned host vendor and device IDs, and verifies the expected NICs are visible inside the guest.
Keep two-guest passthrough performance tests compatible with dual-NIC runbooks by giving those cases an explicit one-PCI-NIC-per-node requirement. This prevents a dual-NIC functional runbook from applying count=2 to every guest in a two-node perf environment.
Preserve platform extended schemas as defaults while allowing case requirements to narrow specific platform fields. That keeps runbook-provided disk and kernel settings intact while letting tests override passthrough counts when their topology needs a different device split.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results