Skip to content

Conversation

@hholoubk
Copy link
Contributor

Refactor snapshot 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 after snapshot revert operations,
which require console recreation since the VM state may have changed.

Modified test files:

  • snapshot/revert_snapshot_after_xml_updated.py: Console after VM start/revert
  • snapshot/revert_disk_external_snap.py: Console after snapshot revert

Both tests handle console recreation after reverting to snapshots, where
the VM state is restored and the old console session is no longer valid.

Refactor provider infrastructure to use the new recreate_serial_console
parameter instead of manually calling cleanup_serial_console() and
create_serial_console() before wait_for_serial_login().

Modified files:
- provider/save/save_base.py: pre_save_setup() and post_save_check()
- provider/migration/base_steps.py: PrepareVMTest and VerifyTest classes
- provider/migration/migration_base.py: poweroff_vm_on_dest() and do_io_error_on_dest()
- provider/interface/check_points.py: check_vm_network_accessed()

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

Signed-off-by: hholoubk <[email protected]>
Refactor snapshot 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 after snapshot revert operations,
which require console recreation since the VM state may have changed.

Modified test files:
- snapshot/revert_snapshot_after_xml_updated.py: Console after VM start/revert
- snapshot/revert_disk_external_snap.py: Console after snapshot revert

Both tests handle console recreation after reverting to snapshots, where
the VM state is restored and the old console session is no longer valid.

Total: 2 files modified with 4 fewer lines of console management code.

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

Signed-off-by: hholoubk <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Oct 13, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ 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.

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