kernel: make irq and Interrupts timer parsing CPU-count agnostic#375
Merged
bhargav0610 merged 3 commits intoqualcomm-linux:mainfrom Mar 31, 2026
Merged
kernel: make irq and Interrupts timer parsing CPU-count agnostic#375bhargav0610 merged 3 commits intoqualcomm-linux:mainfrom
bhargav0610 merged 3 commits intoqualcomm-linux:mainfrom
Conversation
Add reusable helpers in Runner/utils/functestlib.sh for interrupt-based tests: - get_interrupt_line_by_name() - extract_interrupt_cpu_counts() - count_interrupt_cpu_counts() These helpers parse only numeric per-CPU interrupt counters from /proc/interrupts and avoid hardcoded assumptions about CPU count. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update the irq test to use shared interrupt parsing helpers from functestlib.sh instead of assuming a fixed number of CPU interrupt columns. The test now: - locates the arch_timer line through a shared helper - extracts only numeric per-CPU interrupt counters - validates the detected counter count before comparison Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update the Interrupts test to use shared interrupt parsing helpers from functestlib.sh instead of assuming a fixed number of CPU interrupt columns. The test now: - locates the arch_timer line through a shared helper - extracts only numeric per-CPU interrupt counters - validates the detected counter count before comparison Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
bhargav0610
approved these changes
Mar 31, 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 fixes the irq and Interrupts tests reported #374 so they no longer assume a fixed
number of CPU interrupt columns in /proc/interrupts.
What changed
Why this is needed
The previous implementation assumed fixed fields for per-CPU timer counters.
On targets with fewer CPU columns, the scripts started parsing trailing tokens
such as GICv3, Level, and arch_timer as if they were interrupt counters,
causing integer parsing errors and incorrect PASS/FAIL behavior.
RB1 validation results: https://lava.infra.foundries.io/scheduler/job/167608