Skip to content

Use recreate_serial_console in migration tests#6897

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

Use recreate_serial_console in migration tests#6897
hholoubk wants to merge 1 commit into
autotest:masterfrom
hholoubk:refactor-serial-console-migration

Conversation

@hholoubk

Copy link
Copy Markdown
Contributor

Refactor migration 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 when connecting to the migrated VM on the
destination host after switching the connection URI.

Modified test files across standard migration, vTPM, and virtiofs scenarios.
Depends on: avocado-framework/avocado-vt#4248 (Merged)
Depends on: #6890

Part of recreate_serial_console series (avocado-vt#4248). Rebased onto current master.

Refactor all migration 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 serial console management when switching connection URIs
during migration operations. The pattern is especially useful after
migrating VMs to remote hosts where the serial console needs to be
recreated to match the new connection context.

Modified test categories:
- Memory migration tests: migrate_mem.py
- Network migration tests: migrate_network.py (3 occurrences)
- Migration with panic device: migrate_with_panic_device.py
- Migration with virtiofs: internally/externally launched virtiofs devices (2 files)
- Migration with vTPM: shared_tpm, vtpm_dev, external_tpm (3 files)

All tests now use a cleaner pattern:
  vm.connect_uri = dest_uri
  vm_session = vm.wait_for_serial_login(timeout=240, recreate_serial_console=True)

Total: 8 files modified with 31 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 17 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: bb463c79-2b12-4118-8f9c-7a322d5e182d

📥 Commits

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

📒 Files selected for processing (8)
  • libvirt/tests/src/migration/migrate_mem.py
  • libvirt/tests/src/migration/migrate_network.py
  • libvirt/tests/src/migration/migrate_with_panic_device.py
  • libvirt/tests/src/migration/migration_with_virtiofs/migration_with_externally_launched_virtiofs_dev.py
  • libvirt/tests/src/migration/migration_with_virtiofs/migration_with_internally_launched_virtiofs_dev.py
  • libvirt/tests/src/migration/migration_with_vtpm/migration_with_external_tpm.py
  • libvirt/tests/src/migration/migration_with_vtpm/migration_with_shared_tpm.py
  • libvirt/tests/src/migration/migration_with_vtpm/migration_with_vtpm_dev.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