Skip to content

tests/iface_options: add pp64 compatibility for command line test#6880

Open
aniket-sahu-ibmx wants to merge 1 commit into
autotest:masterfrom
aniket-sahu-ibmx:fix-platform-iface-options
Open

tests/iface_options: add pp64 compatibility for command line test#6880
aniket-sahu-ibmx wants to merge 1 commit into
autotest:masterfrom
aniket-sahu-ibmx:fix-platform-iface-options

Conversation

@aniket-sahu-ibmx

@aniket-sahu-ibmx aniket-sahu-ibmx commented Jun 5, 2026

Copy link
Copy Markdown

The command line used for the test explicitly states "qemu-kvm", which is not used for ppc64le systems. Hence, this patch adds qemu-system-ppc64 to the command line after checking host architecture.

Summary by CodeRabbit

  • Bug Fixes
    • Improved QEMU process detection in tests to correctly identify running processes across different processor architectures, including ppc64le systems.

The command line used for the test explicitly states "qemu-kvm",
which is not used for ppc64le systems. Hence, this patch adds
qemu-system-ppc64 to the command line after checking host
architecture.
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change makes the QEMU process detection in run_cmdline_test architecture-aware. On ppc64le hosts, the ps/grep command now searches for the qemu-system-ppc64 binary. On all other architectures, it continues to search for qemu-kvm. This ensures the correct process output is inspected when validating QEMU command-line options for the virtual machine.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title references 'pp64' but the PR description indicates this addresses 'ppc64le' architecture compatibility. Correct the title to use 'ppc64le' instead of 'pp64' for accuracy and clarity.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
libvirt/tests/src/virtual_network/iface_options.py (1)

287-287: 💤 Low value

Architecture detection works correctly for ppc64le; consider adding ppc64 (big-endian) support.

The change correctly handles ppc64le by using qemu-system-ppc64 instead of qemu-kvm. The condition and binary name align with how libvirt launches QEMU on ppc64 systems. Based on learnings from relevant code snippets showing qemu-system-ppc64 is the standard binary for ppc64 architecture.

However, the condition only checks for 'ppc64le' (little-endian). Big-endian ppc64 systems where platform.machine() returns 'ppc64' would still incorrectly search for qemu-kvm instead of qemu-system-ppc64.

♻️ Optional enhancement to support both ppc64 variants
-        cmd = ("ps -ef | grep %s | grep %s | grep -v grep " % (vm_name, "qemu-system-ppc64" if host_arch == 'ppc64le' else "qemu-kvm"))
+        cmd = ("ps -ef | grep %s | grep %s | grep -v grep " % (vm_name, "qemu-system-ppc64" if host_arch in ['ppc64le', 'ppc64'] else "qemu-kvm"))
🤖 Prompt for 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.

In `@libvirt/tests/src/virtual_network/iface_options.py` at line 287, The cmd
assembly in iface_options.py currently treats only host_arch == 'ppc64le' as
using qemu-system-ppc64; update the condition used when building cmd (the tuple
assigned to cmd that references vm_name and host_arch) to treat both 'ppc64' and
'ppc64le' as using "qemu-system-ppc64" (for example check host_arch in
('ppc64','ppc64le') or host_arch.startswith('ppc64')) so big-endian ppc64 hosts
also search for qemu-system-ppc64 instead of qemu-kvm.
🤖 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.

Nitpick comments:
In `@libvirt/tests/src/virtual_network/iface_options.py`:
- Line 287: The cmd assembly in iface_options.py currently treats only host_arch
== 'ppc64le' as using qemu-system-ppc64; update the condition used when building
cmd (the tuple assigned to cmd that references vm_name and host_arch) to treat
both 'ppc64' and 'ppc64le' as using "qemu-system-ppc64" (for example check
host_arch in ('ppc64','ppc64le') or host_arch.startswith('ppc64')) so big-endian
ppc64 hosts also search for qemu-system-ppc64 instead of qemu-kvm.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d20a7f0f-f03a-446c-ab01-315753ad865b

📥 Commits

Reviewing files that changed from the base of the PR and between c96ab65 and 9f9c76b.

📒 Files selected for processing (1)
  • libvirt/tests/src/virtual_network/iface_options.py

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