Skip to content

head: fix skipping other files when getting errors from reading#13372

Open
lauchimoon wants to merge 3 commits into
uutils:mainfrom
lauchimoon:head-skip-fix
Open

head: fix skipping other files when getting errors from reading#13372
lauchimoon wants to merge 3 commits into
uutils:mainfrom
lauchimoon:head-skip-fix

Conversation

@lauchimoon

Copy link
Copy Markdown
Contributor

Fixes #13127.

The issue was that head_file was returning early in case of an error, making uu_head exit early and ignore the rest of files to be processed.

The fix catches the error given by head_file, prints it, and keeps iterating over each file.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/misc/tty-eof (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.
Note: The gnu test tests/env/env-signal-handler was skipped on 'main' but is now failing.

@cakebaker

Copy link
Copy Markdown
Contributor

Can you please add a test to tests/by_util/test_head.rs to ensure we don't regress in the future? Thanks.

@lauchimoon

Copy link
Copy Markdown
Contributor Author

Hello @cakebaker, I added the test checking against /dev/video0. Let me know if it's good.

@codspeed-hq

codspeed-hq Bot commented Jul 20, 2026

Copy link
Copy Markdown

Unable to generate the performance report

There was an internal error while processing the run's data. We're working on fixing the issue. Feel free to contact us on Discord or at support@codspeed.io if the issue persists.

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.

bug(head): when the filename is /dev/drm_dp_aux2 it skips all other arguments

3 participants