[4.22, net] Multi-arch tests with VMs with primary UDN interfaces#5610
[4.22, net] Multi-arch tests with VMs with primary UDN interfaces#5610yossisegev wants to merge 2 commits into
Conversation
Test that a VM with ARM64 archirecture can successfuly connect with an AMD64 VM over primary UDN interface. Signed-off-by: Yossi Segev <ysegev@redhat.com> Assisted-by: Claude Code <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (5)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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. |
|
/hold This PR is not usable and cannot be merged until #5565 is merged. |
|
yossisegev is not part of the approver, only approvers can mark pull request with hold |
|
Clean rebase detected — no code changes compared to previous head ( |
|
/verified Verified (after rebasing) by running the new tests, which both passed. |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
gh pr view 5610 --json files,baseRefName,headRefName,title,body -q '.files[].path'
echo "---DIFF STAT---"
gh pr diff 5610 --name-only
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br>
</br
</br>
</br
</br
</br>
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br
</br>Length of output: 2553 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== vm_factory.py diff ==="
gh pr diff 5610 -- tests/network/libs/vm_factory.py
echo "=== conftest.py diff ==="
gh pr diff 5610 -- tests/network/user_defined_network/conftest.py
echo "=== test file diff ==="
gh pr diff 5610 -- tests/network/user_defined_network/test_user_defined_network_multiarch.pyLength of output: 760 🏁 Script executed: #!/bin/bash
set -euo pipefail
gh pr diff 5610 > /tmp/pr5610.diff
wc -l /tmp/pr5610.diff
cat /tmp/pr5610.diffLength of output: 6651 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== callers of udn_vm ==="
rg -n 'udn_vm\(' tests/ --type py -C2 | head -100
echo "=== markers in test file ==="
rg -n '`@pytest.mark`' tests/network/user_defined_network/test_user_defined_network_multiarch.py
echo "=== smoke/gating in user_defined_network dir ==="
rg -n '`@pytest.mark.smoke`|`@pytest.mark.gating`' tests/network/user_defined_network/
echo "=== conftest hierarchy ==="
fd conftest.py tests/network
echo "=== check run_vms ==="
rg -n 'def run_vms' -A 20 libs/vm/oper.pyLength of output: 10526 🏁 Script executed: #!/bin/bash
set -euo pipefail
cat -n tests/network/libs/vm_factory.py | sed -n '1,60p'Length of output: 2705 🏁 Script executed: #!/bin/bash
set -euo pipefail
BODY=$(cat <<'EOF'
**Test Execution Plan**
- **Run smoke tests: False** — No `@pytest.mark.smoke` tests found under `tests/network/user_defined_network/`, and the change to `udn_vm()` in `tests/network/libs/vm_factory.py` is purely additive (new `architecture: str | None = None` param, gated by `if architecture is not None`). All pre-existing callers (`test_user_defined_network.py`, `provider_migration/conftest.py`, `bgp/conftest.py`, `bgp/evpn/conftest.py`, `test_user_defined_network_passt.py`, `ip_specification/conftest.py`) omit the new arg and are behaviorally unchanged.
- **Run gating tests: False** — `test_user_defined_network.py::TestUdn` (Line 110, `@pytest.mark.gating`) uses `vma_udn`/`vmb_udn` fixtures which call `udn_vm()` without `architecture`, so behavior is unchanged. No traced path where the new param affects gating flow.
- **Affected tests to run**
- `tests/network/user_defined_network/test_user_defined_network_multiarch.py` (new/changed logic, `multiarch` marker) — both `test_udn_connectivity_amd_client_to_arm_server` and `test_udn_connectivity_arm_client_to_amd_server` now run as active checks (previously `__test__ = False`) via new `running_amd_and_arm_vms` fixture → `arm64_udn_vm`/`amd64_udn_vm` → `udn_vm(architecture=...)`.
- `tests/network/user_defined_network/test_user_defined_network.py` (regression sanity for `udn_vm()` default-arg path, since it shares the modified factory function) — optional, low risk given additive change.
Real tests already verified per PR author (`yossisegev`): both `test_udn_connectivity_amd_client_to_arm_server` and `test_udn_connectivity_arm_client_to_amd_server` passed via
`uv run pytest ... -m 'multiarch and single_nic' --cpu-arch=amd64,arm64 tests/network/user_defined_network/test_user_defined_network_multiarch.py`.
EOF
)
gh pr diff 5610 --patch | head -20 > /tmp/first_hunk.txt
cat /tmp/first_hunk.txt
FIRST_FILE="tests/network/libs/vm_factory.py"
COMMIT_SHA=$(gh pr view 5610 --json commits -q '.commits[-1].oid')
echo "commit: $COMMIT_SHA"
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5610/comments \
-f body="$BODY" \
-f commit_id="$COMMIT_SHA" \
-f path="$FIRST_FILE" \
-F line=18 \
-f side="RIGHT"Length of output: 2612 🏁 Script executed: #!/bin/bash
set -eu
BODY=$(cat <<'EOF'
**Test Execution Plan**
- **Run smoke tests: False** — No `@pytest.mark.smoke` tests found under `tests/network/user_defined_network/`, and the change to `udn_vm()` in `tests/network/libs/vm_factory.py` is purely additive (new `architecture: str | None = None` param, gated by `if architecture is not None`). All pre-existing callers (`test_user_defined_network.py`, `provider_migration/conftest.py`, `bgp/conftest.py`, `bgp/evpn/conftest.py`, `test_user_defined_network_passt.py`, `ip_specification/conftest.py`) omit the new arg and are behaviorally unchanged.
- **Run gating tests: False** — `test_user_defined_network.py::TestUdn` (Line 110, `@pytest.mark.gating`) uses `vma_udn`/`vmb_udn` fixtures which call `udn_vm()` without `architecture`, so behavior is unchanged. No traced path where the new param affects gating flow.
- **Affected tests to run**
- `tests/network/user_defined_network/test_user_defined_network_multiarch.py` (new/changed logic, `multiarch` marker) — both `test_udn_connectivity_amd_client_to_arm_server` and `test_udn_connectivity_arm_client_to_amd_server` now run as active checks (previously `__test__ = False`) via new `running_amd_and_arm_vms` fixture → `arm64_udn_vm`/`amd64_udn_vm` → `udn_vm(architecture=...)`.
- `tests/network/user_defined_network/test_user_defined_network.py` (regression sanity for `udn_vm()` default-arg path, since it shares the modified factory function) — optional, low risk given additive change.
Real tests already verified per PR author (`yossisegev`): both `test_udn_connectivity_amd_client_to_arm_server` and `test_udn_connectivity_arm_client_to_amd_server` passed via
`uv run pytest ... -m 'multiarch and single_nic' --cpu-arch=amd64,arm64 tests/network/user_defined_network/test_user_defined_network_multiarch.py`.
EOF
)
FIRST_FILE="tests/network/libs/vm_factory.py"
COMMIT_SHA=$(gh pr view 5610 --json commits -q '.commits[-1].oid')
echo "commit: $COMMIT_SHA"
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5610/comments \
-f body="$BODY" \
-f commit_id="$COMMIT_SHA" \
-f path="$FIRST_FILE" \
-F line=18 \
-f side="RIGHT"
echo "EXIT_CODE=$?"Length of output: 6913 The inline test execution plan comment has been posted successfully on |
Cherry-pick from main to 4.22: Test that a VM with ARM64 archirecture can successfuly connect with an AMD64 VM over primary UDN interface.
Original PR in main #5417
Assisted-by: Claude Code noreply@anthropic.com
What this PR does / why we need it:
Multi-architecture cluster are now supported by Openshift Virtualization, and these tests verify the successful connectivity of VMs of 2 different architectures over primary UDN interfaces.
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:
https://redhat.atlassian.net/browse/CNV-89417
Summary by CodeRabbit