Skip to content

Fix QEMU test flakiness on ARM64 macOS#107

Merged
phil-opp merged 1 commit intomasterfrom
fix-macos-ci
Feb 27, 2026
Merged

Fix QEMU test flakiness on ARM64 macOS#107
phil-opp merged 1 commit intomasterfrom
fix-macos-ci

Conversation

@phil-opp
Copy link
Member

@phil-opp phil-opp commented Feb 27, 2026

On ARM64 macOS, qemu-system-x86_64 uses TCG (software emulation) instead of KVM. The isa-debug-exit shutdown request is processed asynchronously, so the guest vCPU can continue executing after the first port write. This lets the fallthrough exit_qemu(Failed) in _start overwrite the success exit code before QEMU actually shuts down, causing intermittent test failures with exit code 35 instead of 33.

Add loop {} after each exit_qemu(Success) in test runners so the vCPU spins harmlessly until the shutdown completes.

On ARM64 macOS, qemu-system-x86_64 uses TCG (software emulation)
instead of KVM. The isa-debug-exit shutdown request is processed
asynchronously, so the guest vCPU can continue executing after the
first port write. This lets the fallthrough `exit_qemu(Failed)` in
`_start` overwrite the success exit code before QEMU actually shuts
down, causing intermittent test failures with exit code 35 instead
of 33.

Add `loop {}` after each `exit_qemu(Success)` in test runners so
the vCPU spins harmlessly until the shutdown completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@phil-opp phil-opp marked this pull request as ready for review February 27, 2026 09:29
@phil-opp phil-opp merged commit 7bfdeb6 into master Feb 27, 2026
5 checks passed
@phil-opp phil-opp deleted the fix-macos-ci branch February 27, 2026 09:48
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