od: say the skip ran past the end of the combined input - #14399
Open
Socialpranker wants to merge 1 commit into
Open
od: say the skip ran past the end of the combined input#14399Socialpranker wants to merge 1 commit into
Socialpranker wants to merge 1 commit into
Conversation
-j is measured over all the inputs joined together, so naming a single
'input' misleads when several files were given:
$ od -j6 a b
od: tried to skip past end of input # was
od: cannot skip past end of combined input # GNU, and now
|
GNU testsuite comparison: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-j/--skip-bytesis measured over all the inputs joined together, so themessage naming a single "input" is misleading once more than one file is
given:
GNU prints that one wording for every shape of the failure — one file,
several files, stdin, with or without
-N— so this is a straight stringchange in
src/uu/od/locales/en-US.ftl, with the French translationupdated to match.
How the GNU behavior was established
By running the installed GNU coreutils 9.11 binary (Homebrew,
god) as ablack box:
-jpast the end of one file, of two files, of piped stdin,combined with
-N, and the boundary case-j5 a bthat must stillsucceed. Exit status and stderr diffed against uutils. I did not read GNU
coreutils source.
Testing
test_skip_bytes_past_end_messageintests/by-util/test_od.rspins the exact stderr and exit status 1 for the two-file case.
Mutation-checked: reverting the
.ftlline alone makes it fail.cargo test --features od --test tests test_od: 78 passed, 0 failed.cargo clippy -p uu_od --all-targets -- -D warnings: clean.cargo fmt --check: clean.odinvocationsin my harness: mismatches 2 -> 0.
Not in scope
Two neighbouring differences left alone:
od -j 1x freportsinvalid -j argument '1x'where GNU reportsinvalid suffix in -j argument '1x', and when a named file is missinguutils prints this skip error after the
No such file or directorylinewhile GNU stops at the first.
Disclosure
Prepared with AI assistance (Claude Opus 5, via Claude Code), per the AI
policy in CONTRIBUTING.md. Every GNU behavior quoted above came from
running the installed binary, not from reading GPL source. All testing was
run locally.