-
Notifications
You must be signed in to change notification settings - Fork 8.3k
scripts: twister: Process KeyboardInterrupt Hardening #78319
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
scripts: twister: Process KeyboardInterrupt Hardening #78319
Conversation
|
|
This would be caused by the interrupt making the instance get incorrect status and then proceeding to the report. Were you able to find what code section, when interrupted, results in that? It seems to be breaking the assumption of using At the same time, I'd point out that normally, I do not expect much from a CLI programme that I interrupt via Ctrl-C, save for it quitting. |
that is the original behavior and it is correct when you interrupt execution. Lets just fix this new bug and deal with improvement, if needed, later. |
I have taken a look at it and it is slightly incorrect. It should report "No status", not "Unknown status", as per code. We ideally should never have a status that is not a |
If you interrupt process() operation, we want Twister to exit as gracefully as it can. This avoids the UnboundLocalError that could appear e.g. when interrupting the operation via SIGINT. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
6c2e0c7 to
bb26c51
Compare
golowanow
left a comment
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.
.. Lets just fix this new bug and deal with improvement, if needed, later.
I agree that better to fix this noisy bug, but I still suspect there might be other side effects from the recent design decision #77080 to put per-operation StatusAttributeError handlers with intent to continue execution there.
If you interrupt
process()operation, we want Twister to exit as gracefully as it can. This avoids theUnboundLocalErrorthat could appear e.g. when interrupting the operation via SIGINT.Currently, we can experience a situation like this: