Repository navigation
fix(dd): GNU statistics shape and conv= transformations (#1707 #1708) - #1735
Merged
Merged
Conversation
…1708) #1707: print GNU's "F+P records in/out" counters and the transfer line "<n> bytes[(SI,IEC)] copied, <secs> s, <rate>"; status=noxfer drops only the transfer line, status=none suppresses all statistics (dd.c:739-847). Adds full/partial input and output record counting plus truncated-record reporting, with elapsed time from a monotonic clock. #1708: implement the eight conv= symbols the audit flagged as rejected: ascii/ebcdic/ibm (POSIX 1003.1 charset tables, dd.c:385-498), lcase/ucase, swab (with odd-byte carry across blocks), block/unblock on cbs records. Conversion order matches GNU: translate, swab, then record conversion (dd.c:2104-2334). conv=ascii implies unblock; ebcdic/ibm imply block. Invalid and mutually-exclusive conversions fail with GNU wording (dd.c:1665-1676, 1512). cbs=0 silently disables block/unblock. Tests: 60 dd unit tests pass; 16 new differential corpus cases plus the read-error regression all PASS against GNU coreutils 9.4 (WSL) - 19/19. normalize.sed now masks only the run-varying elapsed/rate tail since the record shape is compared exactly, and covers singular "1 byte copied". Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Closes #1707 #1708. dd status now emits GNU's FULL/PARTIAL record shape with time/rate suffix; conv=ascii/ebcdic/ibm/block/unblock/ucase/lcase/swab implemented. Shape comparisons pin the masked timing fields. Refs #1707 #1708