[VIRT] Add PCI topology stability tests - #5721
Conversation
📝 WalkthroughWalkthroughAdds an SSH-based PCI address utility and validates PCI address stability across VM restart, migration, snapshot restore, and virtualization upgrades. ChangesPCI topology validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
📌 Additional InformationCustom Commands:
For more information, please refer to the project documentation or contact the maintainers. |
|
D/S test |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/virt/node/general/test_pci_topology_stability.py`:
- Line 76: The new tests lack required STP/RFE/Jira traceability documentation.
Add a docstring containing the appropriate traceability URL to
TestPCITopologyStability or the module docstring in
tests/virt/node/general/test_pci_topology_stability.py:76-76, and add one to
test_pci_topology_after_upgrade in
tests/virt/upgrade/test_upgrade_virt.py:313-319 unless TestUpgradeVirt already
provides it.
- Line 27: Update the module-level pytestmark declaration to include
pytest.mark.special_infra alongside rwx_default_storage and
data_collector_scope, preserving the existing markers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: c4a4cefe-031c-4db8-b954-cd1dd80df5cf
📒 Files selected for processing (4)
tests/virt/node/general/test_pci_topology_stability.pytests/virt/upgrade/conftest.pytests/virt/upgrade/test_upgrade_virt.pytests/virt/utils.py
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
RedHatQE/openshift-virtualization-tests-design-docs(manual) → reviewed against open PR#138stp-pci-topology-stabilityinstead of the default branch
48e1a1d to
c9bc543
Compare
|
D/S test |
c9bc543 to
3227e55
Compare
abd135f to
7304c89
Compare
7304c89 to
a4a8561
Compare
|
D/S test |
|
D/S test |
Verify that PCI device addresses remain unchanged across VM restart, migration, snapshot/restore, and CNV upgrade. - Add get_pci_fingerprint() to tests/virt/utils.py (md5 of sorted lspci) - Add tests/virt/node/general/test_pci_topology_stability.py with restart, migration, and snapshot/restore tests - Add PCI topology check to upgrade tests (before/after fingerprint comparison on all upgrade VMs) Signed-off-by: Samuel Albershtein <salbersh@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
|
D/S test |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5823. Overlapping filestests/virt/upgrade/test_upgrade_virt.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5777. Overlapping filestests/virt/upgrade/conftest.py |
|
D/S test |
Add the arm64 marker to enable collection on aarch64 platforms.
|
D/S test |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5893. Overlapping filestests/virt/utils.py |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/virt/utils.py`:
- Around line 418-420: Update the helper returning lspci results to sort the
split PCI address lines before logging and returning them; preserve the existing
VM context in LOGGER.info and return the deterministically sorted list.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: aaf2bd4d-2b9f-44db-a936-20043ae7d3a7
📒 Files selected for processing (4)
tests/virt/node/general/test_pci_topology_stability.pytests/virt/upgrade/conftest.pytests/virt/upgrade/test_upgrade_virt.pytests/virt/utils.py
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
RedHatQE/openshift-virtualization-tests-design-docs(manual) → reviewed against open PR#138stp-pci-topology-stabilityinstead of the default branch
|
D/S test |
Replace get_pci_fingerprint (MD5 hash of BDF addresses) with get_pci_addresses (lspci output) so assertion failures show which device addresses actually changed instead of two opaque hashes. Update PCI topology stability tests and upgrade fixtures accordingly. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Samuel Albershtein <salbersh@redhat.com>
|
Clean rebase detected — no code changes compared to previous head ( |
|
D/S test |
What this PR does / why we need it:
Adds test automation for PCI topology stability (CNV-81270). Verifies that
PCI device addresses remain unchanged across VM restart, migration,
snapshot/restore, and CNV upgrade by comparing sorted lspci output before
and after each operation, so failures show exactly which addresses changed.
Which issue(s) this PR fixes:
Special notes for reviewer:
STP: RedHatQE/openshift-virtualization-tests-design-docs#138
jira-ticket:
https://redhat.atlassian.net/browse/CNV-81270
Summary by CodeRabbit
Summary by CodeRabbit