Skip to content

Use recreate_serial_console in network/interface tests#6895

Open
hholoubk wants to merge 1 commit into
autotest:masterfrom
hholoubk:refactor-serial-console-network
Open

Use recreate_serial_console in network/interface tests#6895
hholoubk wants to merge 1 commit into
autotest:masterfrom
hholoubk:refactor-serial-console-network

Conversation

@hholoubk

Copy link
Copy Markdown
Contributor

Refactor network and interface tests to use the recreate_serial_console
parameter instead of manually calling cleanup_serial_console() and
create_serial_console() before wait_for_serial_login().

This simplifies console management in scenarios where the console needs
to be recreated after state changes such as:

  • After libvirtd restart
  • After VM save/restore or suspend/resume operations
  • After VM start or device hotplug

Modified test files:

  • virtual_network/iface_bridge.py: Console recreation after libvirtd restart
  • virtual_network/passt/passt_lifecycle.py: Console after restore/resume
  • virtual_interface/interface_update_device_negative.py: Console after VM start
  • virsh_cmd/domain/virsh_domif_setlink_getlink.py: Console for link state check
  • virtio/virtio_page_per_vq.py: Console after device attach

All tests now use a cleaner single-line pattern for console recreation.

Note: iface_hotplug.py was not modified as it creates console without
immediately calling wait_for_serial_login(), which doesn't match the
refactoring pattern.
Depends on: avocado-framework/avocado-vt#4248 (Merged)
Depends on: #6890

Reopened from closed #6608 (rebased onto current master).

Refactor network and interface tests to use the recreate_serial_console
parameter instead of manually calling cleanup_serial_console() and
create_serial_console() before wait_for_serial_login().

This simplifies console management in scenarios where the console needs
to be recreated after state changes such as:
- After libvirtd restart
- After VM save/restore or suspend/resume operations
- After VM start or device hotplug

Modified test files:
- virtual_network/iface_bridge.py: Console recreation after libvirtd restart
- virtual_network/passt/passt_lifecycle.py: Console after restore/resume
- virtual_interface/interface_update_device_negative.py: Console after VM start
- virsh_cmd/domain/virsh_domif_setlink_getlink.py: Console for link state check
- virtio/virtio_page_per_vq.py: Console after device attach

All tests now use a cleaner single-line pattern for console recreation.

Note: iface_hotplug.py was not modified as it creates console without
immediately calling wait_for_serial_login(), which doesn't match the
refactoring pattern.

Total: 5 files modified with 9 fewer lines of console management code.

Depends on: avocado-framework/avocado-vt#4248
Depends on: autotest#6596

Signed-off-by: hholoubk <hholoubk@redhat.com>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@hholoubk, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 44 minutes and 23 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f915df76-d936-477d-85bb-56c01a72df7b

📥 Commits

Reviewing files that changed from the base of the PR and between c96ab65 and 70d2c09.

📒 Files selected for processing (5)
  • libvirt/tests/src/virsh_cmd/domain/virsh_domif_setlink_getlink.py
  • libvirt/tests/src/virtio/virtio_page_per_vq.py
  • libvirt/tests/src/virtual_interface/interface_update_device_negative.py
  • libvirt/tests/src/virtual_network/iface_bridge.py
  • libvirt/tests/src/virtual_network/passt/passt_lifecycle.py
✨ 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.

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