Skip to content

Improve connectivity_check_bridge_interface to create guest xml via the framework#6796

Open
yanglei-rh wants to merge 1 commit intoautotest:masterfrom
yanglei-rh:LIBVIRTAT-22301
Open

Improve connectivity_check_bridge_interface to create guest xml via the framework#6796
yanglei-rh wants to merge 1 commit intoautotest:masterfrom
yanglei-rh:LIBVIRTAT-22301

Conversation

@yanglei-rh
Copy link
Contributor

@yanglei-rh yanglei-rh commented Feb 6, 2026

1.Add some parameters to allow the framework provide guest xml
2.Remove the ovs and linux_br variants, let them created by the test loop's environment setup part
3.Add some codes to support ovs bridge type

ID::LIBVIRTAT-22301
Signed-off-by: Lei Yang leiyang@redhat.com

Summary by CodeRabbit

  • New Features

    • Per-VM configurable serial login timeout (extended default)
    • Automatic detection and handling for OVS bridge setups
  • Improvements

    • Simplified single-bridge, attribute-driven test configuration
    • Expanded VM lifecycle controls (create, kill, no-reboot) and image management
    • Consolidated multiqueue and nwfilter attributes for more consistent behavior and fewer flakes

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Refactors the bridge-interface test config from multiple per-bridge variants to a single bridge-centric structure, consolidating multiqueue and nwfilter attributes and aligning s390-virtio settings. Adds explicit VM/libvirt lifecycle controls and image/login settings (create_vm_libvirt, use_no_reboot, kill_vm_libvirt with ovmf options, master_images_clone, remove_image_image1, login_timeout). Test code now derives bridge_name from netdst, invokes setup_ovs_bridge_attrs for OVS detection/cancellation, uses login_timeout for serial logins, and removes explicit Linux/OVS bridge creation and teardown logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (7 files):

⚔️ libvirt/tests/cfg/cpu/multi_vms_with_stress.cfg (content)
⚔️ libvirt/tests/cfg/virtual_network/connectivity/connectivity_check_bridge_interface.cfg (content)
⚔️ libvirt/tests/cfg/virtual_network/hotplug/attach_detach_interface/attach_interface_with_options_and_vm_status.cfg (content)
⚔️ libvirt/tests/src/migration/migration_uri/tcp_common.py (content)
⚔️ libvirt/tests/src/virtual_network/connectivity/connectivity_check_bridge_interface.py (content)
⚔️ libvirt/tests/src/virtual_network/connectivity/connectivity_check_bridge_interface_unprivileged.py (content)
⚔️ libvirt/tests/src/virtual_network/hotplug/attach_detach_interface/attach_interface_with_options_and_vm_status.py (content)

These conflicts must be resolved before merging into master.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: improving the connectivity_check_bridge_interface test to use the framework for guest XML creation, which is reflected in the config simplification and code refactoring.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@yanglei-rh
Copy link
Contributor Author

Test pass.

Linux_br:
 (1/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.default.q35: PASS (245.87 s)
 (2/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.multiqueue.default.q35: PASS (242.52 s)
 (3/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.multiqueue.nwfilter.q35: PASS (241.22 s)
ovs:
 (1/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.default.q35: PASS (245.04 s)
 (2/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.multiqueue.default.q35: PASS (243.07 s)
 (3/3) Host_RHEL.m9.u8.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.8.0.x86_64.io-github-autotest-libvirt.virtual_network.connectivity_check.bridge_interface.multiqueue.nwfilter.q35: CANCEL: Host does not use Linux Bridge (134.39 s)

@yanglei-rh yanglei-rh force-pushed the LIBVIRTAT-22301 branch 2 times, most recently from 41303b1 to cc3768a Compare February 13, 2026 07:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
libvirt/tests/src/virtual_network/connectivity/connectivity_check_bridge_interface.py (1)

169-170: ⚠️ Potential issue | 🟠 Major

Cleanup may fail if nwfilter was never defined.

The nwfilter is only defined when libvirt_version < 8.0.0 (line 69), but the cleanup unconditionally tries to undefine it when nwfilter_attrs is present. On libvirt >= 8.0.0, this will attempt to undefine a filter that was never created.

Proposed fix to match the define condition
     finally:
         [backup_xml.sync() for backup_xml in bkxmls]
-        if nwfilter_attrs:
+        if nwfilter_attrs and not libvirt_version.version_compare(8, 0, 0):
             virsh.nwfilter_undefine(nwfilter_attrs['filter_name'])
🤖 Fix all issues with AI agents
In
`@libvirt/tests/src/virtual_network/connectivity/connectivity_check_bridge_interface.py`:
- Line 46: Remove the unused local variable assignment "rand_id =
utils_misc.generate_random_string(3)" from the
connectivity_check_bridge_interface module; locate the statement where rand_id
is defined and delete that line (no other code changes are needed since rand_id
is not referenced elsewhere).

@yanglei-rh yanglei-rh changed the title Improve connectivity_check_bridge_interface to make it work under kar Improve connectivity_check_bridge_interface to create guest xml via the framework Feb 13, 2026
@yanglei-rh yanglei-rh force-pushed the LIBVIRTAT-22301 branch 2 times, most recently from 7563dad to 1599f98 Compare February 14, 2026 01:17
…he framework

1.Add some parameters to allow the framework provide guest xml
2.Remove the ovs and linux_br variants, let them created by the test
loop's environment setup part
3.Add some codes to support ovs bridge type

Signed-off-by: Lei Yang <leiyang@redhat.com>
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.

2 participants