Repository navigation
iommu: apple-dart: Drain runtime PM before injecting test errors - #333
Merged
Merged
Conversation
The gated-IRQ test injects a runtime-PM error after a successful IRQ, whose pm_runtime_put() queues asynchronous idle work. A pending PM callback can overwrite runtime_error after the injection, allowing the next IRQ to run its handler and making the test fail intermittently. Holding power.lock during injection does not wait for that callback. Drain runtime-PM work before injecting the error so that the failed-resume case reliably exercises the error path. Keep the IRQ, register and usage count assertions. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced Nov 22, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
apple_dart_test_gated_irqfailed intermittently: 4 of 32 isolated runs on 2 CPUs. The failure is a race in the test, not in the driver.Cause
pm_runtime_put()queues asynchronous idle work.runtime_errorafter the injection, so the next IRQ runs its handler and the test's final expectation fails.power.lockduring the injection does not drain a callback that has already dropped the lock.Fix
Call
pm_runtime_barrier(dart->dev)before injecting the error, so the failed-resume case reliably exercises the error path. The IRQ, register and usage-count assertions are unchanged.This is test-only, with no runtime change:
drivers/iommu/apple-dart-test.c, +3 lines.Testing
🤖 Generated with Claude Code