Skip to content

Fixed bug with timeout (BugFix)#1840

Merged
Hook25 merged 1 commit intomainfrom
fix-timeout-early-exit
Apr 3, 2025
Merged

Fixed bug with timeout (BugFix)#1840
Hook25 merged 1 commit intomainfrom
fix-timeout-early-exit

Conversation

@fernando79513
Copy link
Copy Markdown
Collaborator

Description

There was a weir issue with the timeout decorator in which if the main program launched a subprocess and it was exited with a keyboard exception, it was not propagated and the subprocess continued to run despite the program being closed. This was detected with the USB tests:

$ fernando@IdeaPad-Pro-5 ~/checkbox (fix-journal-issue-xenial) $
python checkbox-support/checkbox_support/scripts/run_watcher.py insertion usb3

--------- Testing insertion ---------
PID: 3263961

INSERT NOW

Timeout: 30 seconds
...
KeyboardInterrupt
...

$ fernando@IdeaPad-Pro-5 ~/checkbox (fix-journal-issue-xenial) $
ps -p 3263961
    PID TTY          TIME CMD
3263961 ?        00:00:00 journalctl
$ fernando@IdeaPad-Pro-5 ~/checkbox (fix-journal-issue-xenial) $
INFO:super_speed_usb was inserted. Controller: xhci_hcd, Number: 62
INFO:usable partition: sdd
INFO:USB3 insertion test passed.

------- Insertion test passed -------

Resolved issues

Documentation

Tests

Tested on the same device that was experiencing the USB issue

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.01%. Comparing base (7259fc9) to head (dd99146).
Report is 106 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1840   +/-   ##
=======================================
  Coverage   50.00%   50.01%           
=======================================
  Files         378      378           
  Lines       40775    40779    +4     
  Branches     6847     6847           
=======================================
+ Hits        20390    20394    +4     
  Misses      19658    19658           
  Partials      727      727           
Flag Coverage Δ
checkbox-support 62.20% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hook25
Copy link
Copy Markdown
Collaborator

Hook25 commented Apr 3, 2025

impressive fix, well done, +1

@Hook25 Hook25 merged commit 620fb13 into main Apr 3, 2025
19 checks passed
@Hook25 Hook25 deleted the fix-timeout-early-exit branch April 3, 2025 13:27
LiaoU3 pushed a commit that referenced this pull request Apr 14, 2025
mreed8855 pushed a commit that referenced this pull request Jul 30, 2025
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants