Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dd: use seek for stdin skip when possible#9821

Merged
sylvestre merged 4 commits intouutils:mainfrom
ChrisDryden:fix-dd-skip-seek-stdin
Jan 13, 2026
Merged

dd: use seek for stdin skip when possible#9821
sylvestre merged 4 commits intouutils:mainfrom
ChrisDryden:fix-dd-skip-seek-stdin

Conversation

@ChrisDryden
Copy link
Collaborator

@ChrisDryden ChrisDryden commented Dec 24, 2025

The dd/skip-seek-past-file test is checking that the default implementation uses skip as the reader by putting a set of inputs that would cause an out of bounds read if skip was not used, but for things like pipe inputs using copy is the right approach to use and we have other GNU tests that rely on that behaviour. This PR uses skip as the default then falls back to copy.

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@ChrisDryden ChrisDryden marked this pull request as ready for review December 24, 2025 16:38
@sylvestre
Copy link
Contributor

can we have a test in rust too? thanks

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@ChrisDryden ChrisDryden force-pushed the fix-dd-skip-seek-stdin branch from 2eab198 to 55355dc Compare December 26, 2025 19:38
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@ChrisDryden ChrisDryden force-pushed the fix-dd-skip-seek-stdin branch from 55355dc to 0209293 Compare December 26, 2025 20:30
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@ChrisDryden ChrisDryden force-pushed the fix-dd-skip-seek-stdin branch from 8e24e25 to ddf7a41 Compare January 5, 2026 17:16
@ChrisDryden ChrisDryden requested a review from sylvestre January 5, 2026 17:21
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@ChrisDryden ChrisDryden force-pushed the fix-dd-skip-seek-stdin branch from ddf7a41 to 27d05cb Compare January 13, 2026 16:16
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/dd/skip-seek-past-file is no longer failing!

@sylvestre sylvestre merged commit 5fc9f8e into uutils:main Jan 13, 2026
132 checks passed
mattsu2020 pushed a commit to mattsu2020/coreutils that referenced this pull request Jan 23, 2026
* dd: use seek for stdin skip when possible

* Add Rust tests for skip with seekable stdin

* Address review comments: fix return value, add comment, refactor tests

* dd: use ibs-sized buffer for ESPIPE fallback in skip
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.

3 participants