Skip to content

Multishell support and add assertion on min. timeout (bugfix)#1654

Merged
Hook25 merged 3 commits intomainfrom
timeout_fix_v23
Dec 12, 2024
Merged

Multishell support and add assertion on min. timeout (bugfix)#1654
Hook25 merged 3 commits intomainfrom
timeout_fix_v23

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Dec 12, 2024

Description

In the launchpad builder for Noble, the shell selected is sh. This is how I discovered that sh's kill doesn't actually support the tree kill (-PID semantic). This adds a fallback mechanism (that tries to use known working shells instead of the default one), then tries the default one and if it fails tries one last time to at least kill the direct child.

This also fixes a race condition, when join timeout is 0, in very unlucky circumstances the subprocess may not be up after the join, leading to the kill failing and the subprocess leaking free. Also, a timeout of 0 doesn't make sense.

Resolved issues

Fixes: CHECKBOX-1701

Documentation

N/A

Tests

Update tests

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 48.97%. Comparing base (aac167f) to head (c3972d9).
Report is 89 commits behind head on main.

Files with missing lines Patch % Lines
...eckbox-support/checkbox_support/helpers/timeout.py 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1654   +/-   ##
=======================================
  Coverage   48.96%   48.97%           
=======================================
  Files         371      371           
  Lines       40296    40306   +10     
  Branches     6808     6811    +3     
=======================================
+ Hits        19730    19738    +8     
- Misses      19846    19847    +1     
- Partials      720      721    +1     
Flag Coverage Δ
checkbox-support 61.10% <81.81%> (+0.03%) ⬆️

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.

fernando79513
fernando79513 previously approved these changes Dec 12, 2024
Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite interesting discovery.
LGTM+1!

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>
@Hook25 Hook25 merged commit 65da1f9 into main Dec 12, 2024
@Hook25 Hook25 deleted the timeout_fix_v23 branch December 12, 2024 16:22
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