Skip to content

Update the method from system_reset to libvirt_reset for reboot#6823

Open
YongxueHong wants to merge 1 commit intoautotest:masterfrom
YongxueHong:LIBVIRTAT-22302
Open

Update the method from system_reset to libvirt_reset for reboot#6823
YongxueHong wants to merge 1 commit intoautotest:masterfrom
YongxueHong:LIBVIRTAT-22302

Conversation

@YongxueHong
Copy link
Contributor

@YongxueHong YongxueHong commented Mar 10, 2026

As it supported the method libvirt_reset for the reboot in the framework, this commit aims to update the related test cases with the libvirt_reset support.

Reference PR: avocado-framework/avocado-vt#4312

ID: LIBVIRTAT-22302

Summary by CodeRabbit

  • Tests
    • Updated VM reboot mechanism used in test suites.
    • Aligned test descriptions to reflect the new reboot option.
    • Adjusted restart behavior and timing in multi‑NIC and performance test scenarios.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 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: 3f8b14c7-240d-4541-9250-e83917f4905c

📥 Commits

Reviewing files that changed from the base of the PR and between 1bee77c and 2b7dfda.

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

Walkthrough

Two test files were updated to change the reboot method used from "system_reset" to "libvirt_reset". In multi_nics_reboot.py the pre-reset sleep condition now checks for reboot_method == "libvirt_reset" (and the test description was aligned). In netperf.py the reboot invoked after VM configuration changes when reboot_after_config == "yes" was switched to use "libvirt_reset" instead of "system_reset".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ 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 and specifically describes the main change: updating reboot method from system_reset to libvirt_reset across test files.
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
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can use your project's `ruff` configuration to improve the quality of Python code reviews.

Add a Ruff configuration file to your project to customize how CodeRabbit runs ruff.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libvirt/tests/src/virtual_network/qemu/multi_nics_reboot.py`:
- Around line 44-45: Update the module/class/function docstring that currently
mentions the deprecated "system_reset" monitor command to reflect the new
implementation: state that the reboot is triggered when params["reboot_method"]
== "libvirt_reset", document the "libvirt_reset" option and the
"sleep_before_reset" numeric parameter used before calling
time.sleep(params.get_numeric("sleep_before_reset", 10)), and remove or mark
"system_reset" as deprecated so the docstring matches the actual behavior in the
multi_nics_reboot logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0b9deaf2-7c6f-42a1-b0df-9c3e886ccc1d

📥 Commits

Reviewing files that changed from the base of the PR and between 230d80d and 1bee77c.

📒 Files selected for processing (2)
  • libvirt/tests/src/virtual_network/qemu/multi_nics_reboot.py
  • libvirt/tests/src/virtual_network/qemu/performance/netperf.py

As it supported the method libvirt_reset for the reboot in the
framework, this commit aims to update the related test cases with
the libivrt_reset support.

Signed-off-by: Yongxue Hong <yhong@redhat.com>
@YongxueHong
Copy link
Contributor Author

Hi @yanglei-rh @dzhengfy @quanwenli
Could you help review it? Thanks a lot.

Copy link
Contributor

@yanglei-rh yanglei-rh left a comment

Choose a reason for hiding this comment

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

LGTM and test pass.

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