-
Notifications
You must be signed in to change notification settings - Fork 68
Rewrite button test to python to fix the issue of fail detect the IRQ if it not effect CPU0 (BugFix) #2047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Modify the checkbox config var parser. Since the name of interrupts button could be include space or : Therefore, we use | to split the different button name. And also include fall back logic for the previous checkbox config var of the interrupts_button
873b8fd
to
5596abc
Compare
5596abc
to
910f7e3
Compare
This reverts commit b1f85cb. Since the GPIO related test not been affect, and also the GPIO test might be able to leverage from the gpio_control_test.py in PPC.
Since we split the gpio and interrupts button test
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/interrupts_button_test.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per internal discussion, I would suggest we split this whole scripts into two seperate scripts, one for interrupts_button_test and another one for gpio_button_test scripts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2047 +/- ##
=======================================
Coverage 51.66% 51.66%
=======================================
Files 386 386
Lines 41492 41492
Branches 7711 7711
=======================================
Hits 21435 21435
Misses 19294 19294
Partials 763 763 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
#!/usr/bin/env python3 | ||
""" | ||
A script to monitor interrupts, verify IRQ CPU affinity, and test | ||
interrupt triggers via GPIO or manual sysfs interaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the interrupt should be triggers by sysfs only, not GPIO?
return False | ||
return True | ||
|
||
def _get_interrupt_counts(self, irq_number: int) -> Optional[List[int]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest we could merge _get_irq_numbers
and _get_interrupt_counts
as it's pretty much the same.
Description
Rewrite button test to python to fix the issue of fail detect the IRQ if it not effect CPU0.
Our original design to check only the interrupt trigger for CPU0. However, that is not correct logic for the IRQ. The IRQ could be trigger for sepcific CPU, and it been defined in
/proc/irq/{irq_number}/smp_affinity
.The new design will do following logic.
Resolved issues
https://bugs.launchpad.net/shiner/+bug/2098460
Documentation
Tests
button that support only one IRQ.
Trial run for the interrupt that support multiple IRQs
GPIO button