Skip to content

dd: propagate truncate errors on regular files#12667

Open
sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:dd-propagate-truncate-errors
Open

dd: propagate truncate errors on regular files#12667
sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:dd-propagate-truncate-errors

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

BlockWriter::truncate discarded the result of set_len() with .ok() for every output, hiding truncation failures (ENOSPC, read-only fs) on regular files and masking data loss in backup/imaging scripts. Only suppress the error for special outputs such as /dev/null, as GNU dd does.

BlockWriter::truncate discarded the result of set_len() with .ok() for
every output, hiding truncation failures (ENOSPC, read-only fs) on regular
files and masking data loss in backup/imaging scripts. Only suppress the
error for special outputs such as /dev/null, as GNU dd does.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/pipe-f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/retry (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.

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.

1 participant