Skip to content

fold: ignore the stdin write error when -w - is rejected - #15025

Merged
cakebaker merged 1 commit into
uutils:mainfrom
TanbirRamim:fix-fold-dash-test
Oct 2, 2026
Merged

cakebaker merged 1 commit into
uutils:mainfrom
TanbirRamim:fix-fold-dash-test

Conversation

@TanbirRamim

Copy link
Copy Markdown
Contributor

Fixes #15004.

The last case in test_dash_operand_reads_stdin expects fold -w - to fail on the width, so fold exits before it reads stdin. The test still pipes input, and on slower targets (the i686 musl job) the write happens after the process has exited, so the harness panics with Broken pipe (os error 32).

This adds .ignore_stdin_write_error() to that case, as other tests do for commands that exit before reading (test_cksum, test_cut, test_head). The input stays, so the case still catches a regression where - would be read as the stdin operand instead of the width.

fold rejects '-' as a width before it reads stdin, so feeding input
races with its exit. On slower targets (i686 musl in CI) the write
lands after the exit and the harness fails with a broken pipe.

Fixes uutils#15004
Copilot AI balanced review requested due to automatic review settings October 2, 2026 04:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/id/setgid is no longer failing!

@cakebaker
cakebaker merged commit ed9ea21 into uutils:main Oct 2, 2026
81 of 87 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks for your PR!

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.

test_fold::test_dash_operand_reads_stdin is failing

3 participants