Skip to content

od: report actual file open errors - #13609

Open
wtcpython wants to merge 3 commits into
uutils:mainfrom
wtcpython:od-preserve-open-error
Open

od: report actual file open errors#13609
wtcpython wants to merge 3 commits into
uutils:mainfrom
wtcpython:od-preserve-open-error

Conversation

@wtcpython

Copy link
Copy Markdown
Contributor

Fixes #12980.

od reduced file-open failures to three hard-coded messages, so errors such as opening a Unix socket were reported as I/O error instead of the platform's actual diagnostic.

Format file-open failures with uucore::error::strip_errno, preserving GNU-compatible errors without including raw OS error numbers. Add a Unix regression test that creates a socket and verifies the propagated diagnostic.

@codspeed-hq

codspeed-hq Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 345 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing wtcpython:od-preserve-open-error (2e8a373) with main (1d5f752)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Comment thread src/uu/od/src/multifile_reader.rs Outdated
io::ErrorKind::PermissionDenied => "Permission denied",
_ => "I/O error",
io::ErrorKind::NotFound => "No such file or directory".to_owned(),
io::ErrorKind::PermissionDenied => "Permission denied".to_owned(),

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.

Please extract those error from e too.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/dd/no-allocate is now 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.

minorbug(od): when /var/run/snapd.socket it returns a vague error message

2 participants