qemu: a reboot tap may lose the control channel; expect_reboot looks back one step #8

Merged
noah merged 1 commits from qemu-reboot-tap-race into flare-edge-next 2026-09-28 21:23:10 -06:00
Owner

For blueflare/flare-edge#233.

  • A tap followed by expect_reboot that loses the control channel after its press went out is ok (the guest going down is the tap working).
  • expect_reboot reads the console from the start of the previous step, so a restart line printed during the tap counts; anything older still does not.
Check Result
test_qmp_drive.py 52/52 (3 new)
old driver vs new RebootTapRace fails the main case
rig: settings/system-reboot-restarts, 4 sequential runs 4/4 PASS, each via the channel-close path
rig: system-ab-slot-boot-restarts 2/2 PASS

Generated with Claude Code

https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg

For blueflare/flare-edge#233. - A tap followed by `expect_reboot` that loses the control channel after its press went out is `ok` (the guest going down is the tap working). - `expect_reboot` reads the console from the start of the previous step, so a restart line printed during the tap counts; anything older still does not. | Check | Result | |---|---| | test_qmp_drive.py | 52/52 (3 new) | | old driver vs new RebootTapRace | fails the main case | | rig: settings/system-reboot-restarts, 4 sequential runs | 4/4 PASS, each via the channel-close path | | rig: system-ab-slot-boot-restarts | 2/2 PASS | Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
noah added 1 commit 2026-09-28 20:30:58 -06:00
qemu: a reboot tap may lose the control channel; expect_reboot looks back one step
ci / test (pull_request) Successful in 13s
ci / mcdc (pull_request) Successful in 13s
ci / bench (pull_request) Successful in 6s
ci / qemu-tools (pull_request) Successful in 40s
ci / patches-apply (push) Successful in 15s
ci / qemu-tools (push) Successful in 42s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 15s
ci / test (push) Successful in 12s
ci / quality (pull_request) Successful in 28s
ci / badges (pull_request) Skipped
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 6s
ci / quality (push) Successful in 1m5s
ci / badges (push) Skipped
6576a4a506
A tap whose outcome is a reboot races init tearing warden-ui down: the
control channel can close while the tap's press/release counts are still
polled, which made the tap FATAL, and a fast guest can print its restart
line before expect_reboot starts, which expect_reboot then ignored.
flare-edge's Reboot flow passed about half its rig runs (flare-edge#233).

drive() now tells each step the next command and the console size when the
previous step began. A tap followed by expect_reboot that loses the channel
after its press went out is ok; expect_reboot reads the console from the
start of the step before it. Anything earlier still does not count.

Tests: RebootTapRace (3 cases) in test_qmp_drive.py; the old driver fails
the main one. Rig: settings/system-reboot-restarts 4/4 sequential passes,
each through the channel-close path (next: 2/4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
noah merged commit 85dc1ee04d into flare-edge-next 2026-09-28 21:23:10 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#8