Skip to content

find: address the intermittent issue - #844

Merged
sylvestre merged 3 commits into
uutils:mainfrom
sylvestre:fix-ok-prompt-stdin-hang
Aug 18, 2026
Merged

sylvestre merged 3 commits into
uutils:mainfrom
sylvestre:fix-ok-prompt-stdin-hang

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 18, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.15%. Comparing base (920f2f0) to head (e662d19).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/find/matchers/exec.rs 97.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #844      +/-   ##
==========================================
+ Coverage   92.01%   92.15%   +0.13%     
==========================================
  Files          35       35              
  Lines        7316     7377      +61     
  Branches      378      383       +5     
==========================================
+ Hits         6732     6798      +66     
+ Misses        442      438       -4     
+ Partials      142      141       -1     

☔ View full report in Codecov by Harness.
📢 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.

@sylvestre
sylvestre force-pushed the fix-ok-prompt-stdin-hang branch from a0298be to 1fd3e7c Compare August 18, 2026 16:19
Copilot AI review requested due to automatic review settings August 18, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Both actions run the command after changing into the directory being
scanned, so a relative $PATH entry -- including the empty string and ".",
which mean the current directory -- would be looked up inside a directory
somebody else may be able to write to. GNU find rejects this at parse
time; we ran the command anyway, and for -okdir we first prompted, which
meant reading the answer from whatever stdin happened to be. In the bfs
testsuite that is the harness's own stdin, so gnu/okdir_path_empty hung
and reported no result at all instead of failing (bfs gnu/okdir_path_*
and gnu/execdir_path_* now pass).

An unset $PATH is left alone: the command is then looked up in the
system default path.
The starting points and the answers to the prompts would both be read
from standard input, so they compete for the same bytes and the result
depends on buffering. GNU find rejects the combination up front; we
accepted it and prompted, consuming input meant for the caller. The bfs
tests gnu/files0_from_stdin_ok and gnu/ok_files0_from_stdin now pass, and
the former no longer hangs on the testsuite's stdin.

Reading the starting points from a file leaves stdin free for the
prompts, so that combination stays allowed.
improvements was "failing in the reference, not failing now", which is
also true of a test that produced no result because it hung. That is how
a hang in find got reported as "+ gnu/okdir_path_empty". List those
separately instead; they don't fail the job, since an upstream rename
looks the same.
@codspeed

codspeed Bot commented Aug 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing sylvestre:fix-ok-prompt-stdin-hang (1fd3e7c) with main (6e4a7fb)

Open in CodSpeed

Copilot AI review requested due to automatic review settings August 18, 2026 16:36
@sylvestre
sylvestre force-pushed the fix-ok-prompt-stdin-hang branch from 1fd3e7c to e662d19 Compare August 18, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Commit e662d19 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 317 / PASSED: 274 / FAILED: 37 / SKIPPED: 6
  Reference: TOTAL: 313 / PASSED: 267 / FAILED: 40 / SKIPPED: 6

Changes from main branch:
  TOTAL: +4
  PASSED: +7
  FAILED: -3

Test improvements (3):
  + gnu/execdir_path_dot
  + gnu/execdir_path_empty
  + gnu/execdir_path_relative

@sylvestre
sylvestre merged commit 2a3eac9 into uutils:main Aug 18, 2026
20 of 21 checks passed
@sylvestre
sylvestre deleted the fix-ok-prompt-stdin-hang branch August 18, 2026 19:14
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