Skip to content

Add kexec reboot test suite - #4273

Merged
LiliDeng merged 2 commits into
mainfrom
vyadav_kexec_reboot
Feb 26, 2026
Merged

LiliDeng merged 2 commits into
mainfrom
vyadav_kexec_reboot

Conversation

@vyadavmsft

@vyadavmsft Vivek Yadav (vyadavmsft) commented Feb 8, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
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)
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
@vyadavmsft
Vivek Yadav (vyadavmsft) force-pushed the vyadav_kexec_reboot branch 3 times, most recently from 975d08d to 5112f02 Compare February 12, 2026 01:56
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated

Copy link
Copy Markdown
Collaborator

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.

Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
@vyadavmsft
Vivek Yadav (vyadavmsft) force-pushed the vyadav_kexec_reboot branch 3 times, most recently from 2d690f5 to eab6c58 Compare February 13, 2026 23:56
Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated

Copy link
Copy Markdown
Collaborator

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!

Comment thread lisa/microsoft/testsuites/kexec/kexec_suite.py Outdated
- 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