fix(network): exclude InfiniBand NICs from skip_if_pci_only_nics guard#4587
Merged
Conversation
`skip_if_pci_only_nics()` now ignores InfiniBand interfaces when deciding whether to skip SRIOV disable/enable tests. Only genuine PCI-only **Ethernet** data NICs (Accelerated Networking without synthetic pairing) trigger the skip. On ND/GPU SKUs that carry both a synthetic+VF Ethernet pair and InfiniBand NICs, `verify_sriov_disable_enable_pci` was being incorrectly skipped: > SkippedException: SRIOV disable/enable test not applicable for PCI-only NIC ib0 on node ... The `is_pci_only_nic` property returns `True` for any NIC with a PCI slot, no `lower` device, and a non-`hv_netvsc` module — which is exactly how IB NICs (`ib0`–`ib3`, mlx5) present. So the presence of unrelated IB interfaces caused the guard to skip VMs that actually had a fully testable SRIOV pair (e.g. `eth0` synthetic + `eth1` VF, same MAC). Skip NICs where `nic.is_infiniband` before the `is_pci_only_nic` check, consistent with the existing `exclude_ib` convention already used by `get_pci_nics(exclude_ib=True)` and `get_device_slots(exclude_ib=True)`. - IB-equipped Ethernet-SRIOV VMs now correctly run `verify_sriov_disable_enable_pci` instead of being skipped. - Pure PCI-only Ethernet configurations (no synthetic pairing) still skip as intended. - No change to non-IB SKUs.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an incorrect skip condition in the SR-IOV disable/enable network tests by ensuring InfiniBand interfaces don’t trigger the “PCI-only NIC” guard, allowing IB-equipped SKUs with valid synthetic+VF Ethernet pairs to run the intended test paths.
Changes:
- Exclude
nic.is_infinibandinterfaces from theskip_if_pci_only_nics()PCI-only NIC detection loop. - Add clarifying docstring/comment explaining why InfiniBand NICs are out of scope for the Ethernet SR-IOV disable/enable scenarios.
✅ AI Test Selection — PASSED51 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
LiliDeng
approved these changes
Jul 10, 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.
skip_if_pci_only_nics()now ignores InfiniBand interfaces when deciding whether to skip SRIOV disable/enable tests. Only genuine PCI-only Ethernet data NICs (Accelerated Networking without synthetic pairing) trigger the skip.On ND/GPU SKUs that carry both a synthetic+VF Ethernet pair and InfiniBand NICs,
verify_sriov_disable_enable_pciwas being incorrectly skipped:The
is_pci_only_nicproperty returnsTruefor any NIC with a PCI slot, nolowerdevice, and a non-hv_netvscmodule — which is exactly how IB NICs (ib0–ib3, mlx5) present. So the presence of unrelated IB interfaces caused the guard to skip VMs that actually had a fully testable SRIOV pair (e.g.eth0synthetic +eth1VF, same MAC).Skip NICs where
nic.is_infinibandbefore theis_pci_only_niccheck, consistent with the existingexclude_ibconvention already used byget_pci_nics(exclude_ib=True)andget_device_slots(exclude_ib=True).verify_sriov_disable_enable_pciinstead of being skipped.Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Sriov, Infiniband, NetworkInterface
Tested Azure Marketplace Images:
Test Results