Skip to content

Improve mtu to create guest xml via the framework#6807

Open
yiqianwei wants to merge 1 commit intoautotest:masterfrom
yiqianwei:LIBVIRTAT-22318
Open

Improve mtu to create guest xml via the framework#6807
yiqianwei wants to merge 1 commit intoautotest:masterfrom
yiqianwei:LIBVIRTAT-22318

Conversation

@yiqianwei
Copy link
Contributor

@yiqianwei yiqianwei commented Feb 14, 2026

1.Add some parameters to allow the framework provide guest xml
2.Call cancel_if_ovs_bridge to cancel test when host using linux bridge
3.Add "only Linux" to limit guest type

ID: LIBVIRTAT-22318

Summary by CodeRabbit

  • Tests
    • Enhanced MTU network test to support VM lifecycle controls (create, terminate, non-reboot behavior, OVMF-specific termination options).
    • Added pre-condition checks to skip MTU tests when Open vSwitch bridges are present or when certain tap/save actions are requested.

@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e1a95069-5690-4685-8ecd-8100b1d5162a

📥 Commits

Reviewing files that changed from the base of the PR and between c07432c and d137f7f.

📒 Files selected for processing (2)
  • libvirt/tests/cfg/virtual_network/mtu.cfg
  • libvirt/tests/src/virtual_network/mtu.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • libvirt/tests/cfg/virtual_network/mtu.cfg
  • libvirt/tests/src/virtual_network/mtu.py

Walkthrough

Adds Libvirt VM lifecycle settings to the MTU network test configuration: create_vm_libvirt = yes, use_no_reboot = yes, kill_vm_libvirt = yes, ovmf.kill_vm_libvirt_options = --nvram, and only Linux. In the test code, imports provider.virtual_network.network_base and adds early-run checks that call network_base.cancel_if_ovs_bridge(params, test) when the network type is network or bridge, and when no net_type is set but create_tap is true or check is one of save, managedsave, hotplug_save.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title refers to a real aspect of the change (framework-based guest XML creation) but does not clearly convey the main changes: adding VM lifecycle controls and OVS bridge cancellation logic. Consider a more specific title like 'Add VM lifecycle controls and OVS bridge checks to mtu test' that better reflects all key changes.
✅ Passed checks (2 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%.

✏️ 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

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.

@yiqianwei
Copy link
Contributor Author

Test results:
(01/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.vnet.iface.q35: PASS (70.21 s)
(02/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.vnet.network.with_iface.q35: PASS (72.25 s)
(03/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.vnet.network.no_iface.q35: PASS (68.41 s)
(04/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.br.iface.q35: PASS (127.21 s)
(05/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.br.network.with_iface.q35: PASS (127.92 s)
(06/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.ovswitch.iface.q35: PASS (128.34 s)
(07/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.normal.ovswitch.network.with_iface.q35: PASS (128.80 s)
(08/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.save.default.q35: PASS (83.63 s)
(09/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.save.hotplug.q35: PASS (96.24 s)
(10/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.managedsave.q35: PASS (88.34 s)
(11/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.tap.managed_no.smaller.q35: PASS (106.53 s)
(12/26) Host_RHEL.m10.u1.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.10.1.x86_64.io-github-autotest-libvirt.virtual_network.mtu.positive_test.tap.managed_no.larger.q35: PASS (104.81 s)

@yiqianwei
Copy link
Contributor Author

@yanglei-rh , Could you help to review this patch?

Copy link
Contributor

@nickzhq nickzhq left a comment

Choose a reason for hiding this comment

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

LGTM.

1.Add some parameters to allow the framework provide guest xml
2.Call cancel_if_ovs_bridge to cancel test when host using linux bridge
3.Add "only Linux" to limit guest type

ID: LIBVIRTAT-22318

Signed-off-by: Yiqian Wei <yiwei@redhat.com>
@yiqianwei
Copy link
Contributor Author

Hi @nickzhq, Add "only Linux" to limit guest type, Could you help review it again?thanks

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