test: make empty network selection independent of host devices #7342
Pipeline controller notification
This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.
Use /test ? to list jobs, /pipeline remaining to request missing second-stage tests, or /pipeline required to rerun the selected second-stage set.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
<!-- ccr-overview-v2 -->
Copilot review overview
🟢 Approval recommended
The focused test-only change correctly preserves coverage while eliminating host-dependent behavior.
Review effort: Balanced
Findings: None
<details>
<summary><strong>What changed in this PR</strong></summary>
Makes the empty-selection test deterministic across hosts with PCI-backed network interfaces.
Changes:
| File | Description |
| ---- | ----------- |
| swift-recorder/pkg/netwatch/netwatch_test.go | Removes host-device assumptions from the empty-state test. |
</details>
---
💡 <a href="/Azure/ARO-HCP/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a code-review agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>
Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-parallel
/approve
/lgtm
/retest-required
Remaining retests: 0 against base HEAD 52b81a55274d11896e2d2bdc9b48315c195d451d and 2 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total
/retest-required
Remaining retests: 0 against base HEAD 238c44f22107b8aaf7d14cb7520d3541f05c5731 and 1 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total
/retest-required
Remaining retests: 0 against base HEAD 4e398af3e08749a88da803ce7be602764869784b and 0 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total
/hold
Revision b81b319d980c248ae54fecdb7301a1f26eea05f7 was retested 3 times: holding
/lgtm
/approve
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/Azure/ARO-HCP/pull/7342#issuecomment-5989076945" title="LGTM">geoberle</a>, <a href="https://github.com/Azure/ARO-HCP/pull/7342#pullrequestreview-5427114482" title="Approved">raelga</a>, <a href="https://github.com/Azure/ARO-HCP/pull/7342#" title="Author self-approved">stevekuznetsov</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
/override ci/prow/e2e-parallel
/label lgtm
@stevekuznetsov: Overrode contexts on behalf of stevekuznetsov: ci/prow/e2e-parallel
<details>
In response to this:
>/override ci/prow/e2e-parallel
>/label lgtm
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
</details>
/hold cancel
Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-parallel
/retest-required
Remaining retests: 0 against base HEAD 56e655b05d089072840185c67940ec3f670c8773 and 2 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total
/retest-required
Remaining retests: 0 against base HEAD 459393efbcf7240b5e9d18e61b574886c95d61fe and 1 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total
raelga
stevekuznetsov
Why
The empty-selection test assumes the host has no PCI-backed interfaces.
SwiftDevicePairFilterdeliberately accepts PCI links, so ordinary Ethernet and Wi-Fi interfaces make the test fail on a developer machine without SWIFT hardware.This was discovered while running the full local unit suite for #7332. It is unrelated to that PR's version-catalog implementation or its CI HTTP-connection leak, and is extracted here for independent review. No separate tracking ticket exists for this host-dependent test issue.
Local Failure
The original test produced:
The two selected links were the host's
enp5s0Ethernet andwlp6s0Wi-Fi interfaces, both reportingParentBus:pci. The failure is reproducible with the existing default filter; it does not depend on a SWIFT virtual function being present.What
Inject a reject-all filter into the test of
Run's available-but-empty initial record, and rename it to describe that behavior. The separateTestSwiftDevicePairFiltertable continues to test PCI, vmbus, and ordinary-link selection. Production filtering and recorder behavior are unchanged.Testing
Passed
go test -race -count=20 ./swift-recorder/pkg/netwatchon the affected host.@geoberle: requesting your review as the author of the original root-link recorder test (
6b35b0e04).