Skip to content

fix(dd): GNU statistics shape and conv= transformations (#1707 #1708) - #1735

Merged
caomengxuan666 merged 1 commit into
mainfrom
fix/dd-1707-1708
Nov 14, 2026
Merged

caomengxuan666 merged 1 commit into
mainfrom
fix/dd-1707-1708

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

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

…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>
@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 14, 2026 12:54
@caomengxuan666
caomengxuan666 merged commit cc0d66a into main Nov 14, 2026
7 of 10 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/dd-1707-1708 branch November 14, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant