Skip to content

tests: add pciback suite for port kept in host on name mismatch - #1215

Closed
eriknordmark wants to merge 1 commit into
lf-edge:masterfrom
eriknordmark:domainmgr-pciback-pci-identity
Closed

tests: add pciback suite for port kept in host on name mismatch#1215
eriknordmark wants to merge 1 commit into
lf-edge:masterfrom
eriknordmark:domainmgr-pciback-pci-identity

Conversation

@eriknordmark

Copy link
Copy Markdown
Contributor

Description

Adds an evetestkit suite (tests/pciback) that verifies domainmgr keeps a
network port in the host instead of reserving its PCI device to pciback when
the controller's device model gives the port an interface name that differs
from the kernel-assigned name (e.g. enpNsN vs ethN).

The test resolves a port's PCI address from the running IoBundle, rewrites the
device model through the controller so that the port's model interface name no
longer matches the kernel, restarts EVE, and asserts the affected NIC stays
KeepInHost and out of pciback while the device remains reachable.

It guards the EVE fix in lf-edge/eve#6169 (match device ports to their PCI
device, not just by interface name). Validated on the ZedVirtual-4G QEMU model:

  • passes against an EVE build with the fix;
  • fails against master without it (the in-use NIC is reserved to pciback,
    IsPCIBack=true).

How to run

make -C tests/pciback build
./eden test tests/pciback -v debug

Notes

  • Requires the ZedVirtual-4G (QEMU) model — it depends on the two virtio NICs.
    eth0 is left untouched so EVE stays reachable while eth1 is the subject of
    the mismatch.
  • Not yet wired into a tests/workflow CI scenario (the model mutation + node
    restart cycle takes several minutes). Can add it to networking.tests.txt if
    wanted.
  • Draft until domainmgr: match device ports by PCI, not just interface name eve#6169 merges, since the suite only passes with that fix.

Adds an evetestkit suite verifying that domainmgr keeps a network port
in the host instead of reserving its PCI device to pciback when the
controller's device model disagrees with the kernel about that port's
PCI device.

- TestPortKeptOnIfnameMismatch: the model's interface name for a port
  differs from the kernel-assigned name (e.g. enpNsN vs ethN); the NIC
  must be matched by PCI address and kept in the host. Passes on an EVE
  build with the domainmgr PCI-identity fix, fails against master
  without it.
- TestPortKeptOnPhantomAdapterSamePci: a non-network device (audio)
  declared at the same PCI as an in-use network port must not be
  reserved to pciback. Documents current behavior (EVE keeps devices
  sharing a PCI controller in the host); a baseline to extend once EVE
  reports such device-model inconsistencies back to the controller.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eriknordmark
eriknordmark force-pushed the domainmgr-pciback-pci-identity branch from 00b2cee to 54dcbf3 Compare July 16, 2026 15:45
@eriknordmark

Copy link
Copy Markdown
Contributor Author

Closing: this pciback coverage is superseded by the equivalent test now implemented in eve's evetest framework, so maintaining a parallel eden suite is redundant. The underlying EVE fix is tracked in lf-edge/eve#6169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant