Skip to content

Add kexec reboot test suite#4273

Merged
LiliDeng merged 2 commits intomainfrom
vyadav_kexec_reboot
Feb 26, 2026
Merged

Add kexec reboot test suite#4273
LiliDeng merged 2 commits intomainfrom
vyadav_kexec_reboot

Conversation

@vyadavmsft
Copy link
Copy Markdown
Collaborator

@vyadavmsft vyadavmsft commented Feb 8, 2026

Implements end-to-end kexec functionality test and validates end-to-end kexec reboot functionality and post-reboot system health.

  • Loads current kernel via kexec -l with matching initrd
  • Validates boot_id change and uptime reset after reboot
  • Auto-installs kexec-tools if missing.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Microsoft LISA test suite to validate end-to-end kexec reboot behavior on Linux remote nodes, aiming to ensure a kernel-to-kernel reboot flow is working in deployed environments.

Changes:

  • Introduces KexecSuite with an end-to-end verify_kexec_reboot test case.
  • Implements kexec tooling install checks, kernel/initrd discovery, kexec load/execute, reconnect logic, and post-reboot validation via a persisted marker file.

Implements end-to-end kexec functionality test that validates
kernel-to-kernel reboot without firmware involvement.

- Loads current kernel via kexec -l with matching initrd
- Validates boot_id change and uptime reset after reboot
- Auto-installs kexec-tools if missing
- Multi-distro support (Ubuntu, RHEL, Debian, Azure Linux)
@vyadavmsft vyadavmsft force-pushed the vyadav_kexec_reboot branch 2 times, most recently from ed71f28 to b6e5cb6 Compare February 10, 2026 00:48
@vyadavmsft vyadavmsft requested a review from anirudhrb February 10, 2026 01:37
@vyadavmsft vyadavmsft force-pushed the vyadav_kexec_reboot branch 3 times, most recently from 975d08d to 5112f02 Compare February 12, 2026 01:56
Copy link
Copy Markdown
Collaborator

@anirudhrb anirudhrb left a comment

Choose a reason for hiding this comment

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

Mostly LGTM now! Just a few more comments and the serial console log collection implementation is pending.

@vyadavmsft vyadavmsft force-pushed the vyadav_kexec_reboot branch 3 times, most recently from 2d690f5 to eab6c58 Compare February 13, 2026 23:56
@vyadavmsft vyadavmsft requested a review from anirudhrb February 17, 2026 21:48
Copy link
Copy Markdown
Collaborator

@anirudhrb anirudhrb left a comment

Choose a reason for hiding this comment

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

Just one comment. Everything else is good to go!

- verify_kexec_reboot_systemd: Tests systemd integration path (systemctl kexec)
- verify_kexec_reboot_direct: Tests raw kernel execution path (kexec -e)
- Refactored _trigger_kexec_reboot to accept use_systemctl parameter
- Removed fallback logic - each test case uses its own method exclusively
- Removed unreliable dmesg check, kept journalctl for evidence (best effort)
- Added SkippedException when systemctl not available for systemd test

This addresses review feedback that kexec -e deserves its own test case
and shouldn't be a fallback, allowing us to identify which integration
path breaks when tests fail.
@LiliDeng LiliDeng merged commit f345675 into main Feb 26, 2026
58 checks passed
@LiliDeng LiliDeng deleted the vyadav_kexec_reboot branch February 26, 2026 12:26
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.

4 participants