irq: make arch_timer validation robust under tickless idle - #462
Merged
Conversation
Add generic helpers to functestlib.sh for CPU list parsing, online CPU detection, /proc/interrupts parsing, per-CPU interrupt counter reads, CPU schedulability checks, and pinned CPU workload generation. These helpers provide a reusable active interrupt validation path for tests that need to verify per-CPU interrupt delivery without relying on passive idle sampling. The helpers also preserve existing irq-style API names such as get_interrupt_line_by_name(), extract_interrupt_cpu_counts(), and count_interrupt_cpu_counts() for compatibility with existing tests. This is needed because modern Linux systems can use tickless idle, CPU idle states, CPU isolation, affinity restrictions, or low system activity, where a CPU interrupt counter may not increment during a passive sleep window even though the interrupt path is healthy. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Rework the irq test to avoid false LAVA failures caused by passively sampling arch_timer counters during an idle sleep window. The previous logic expected every CPU's arch_timer counter to increment after a fixed sleep interval. That is not reliable on modern kernels where CPUs may remain idle, tickless, isolated, or unscheduled. Update the test to: - expose runtime knobs through irq.yaml - validate only online CPUs - skip isolated or non-schedulable CPUs - run controlled workload pinned to each testable CPU - compare arch_timer counters before and after workload - retry before declaring failure - keep the single irq.res result flow This validates the real requirement: an online schedulable CPU must observe arch_timer progress while actively executing workload. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Srikanth Muppandam (smuppand)
requested review from
Bhargav-qcom (bhargav0610),
knaveen-qc,
Shiraz Hashim (shashim-quic) and
vnarapar
May 28, 2026 18:14
This was referenced Aug 17, 2026
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.
This PR makes the
irqbaseport test robust against false LAVA failures caused by passivearch_timercounter sampling.The previous test logic sampled the
arch_timerinterrupt line, slept for a fixed window, and failed if every CPU counter did not increment. That assumption is weak on modern Linux systems because an online CPU may remain idle or tickless during the sampling window due to:This could produce false failures such as:
lava job for reference with these changes. https://lava.infra.foundries.io/scheduler/job/236802#L2423