If the first four decimal digits are zero, GNU dd elides them altogether.
Here's an execution on my PC:
```console
$ for i in $(seq 20000); do LC_ALL=C gnu_dd if=/dev/null of=/dev/null \
2>&1; done | grep copied | grep -E ' [0-9]e'
0 bytes copied, 1e-05 s, 0 B/s
0 bytes copied, 9e-06 s, 0.0 kB/s
```
Our implementation conforms to this, resulting in the following CI flake:
```
---- test_dd::test_final_stats_unspec stdout ----
run: D:\a\coreutils\coreutils\target\x86_64-pc-windows-gnu\debug\coreutils.exe dd
thread 'test_dd::test_final_stats_unspec' panicked at 'Stderr does not match regex:
0+0 records in
0+0 records out
0 bytes copied, 8e-05 s, 0.0 B/s
', tests\by-util\test_dd.rs:280:10
stack backtrace:
0: rust_begin_unwind
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src/panicking.rs:578:5
```
Of course, this is just an overly strict regex in the test. This was a
one-in-tenthousand flaky test.
The comment was introduced in commit 8320b1ec5f,
the test was introduced in commit c1f518e586
claiming to be about "failing GNU head tests".
However, a simple check reveals no such difference:
```console
$ echo -n a | hd
00000000 61 |a|
00000001
$ echo -n a | head | hd # GNU head
00000000 61 |a|
00000001
$ echo -n a | cargo run -- head | hd
00000000 61 |a|
00000001
$ echo -n a | busybox head | hd
00000000 61 |a|
00000001
$
```
Looking at the GNU tests directly, it seems that there is a similar, but different test.
* more handle errors with multiple files
* tests/more test refactor and new case
* tests/more new cases
* more: use show! and change exitstatus and adjust tests to new exitvalue
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
* stat: should fail without arguments #5928
* style and lint issue stat: should fail without arguments #5928
* style and lint issue stat: should fail without arguments #5928
* style and lint 2 issue stat: should fail without arguments #5928
---------
Co-authored-by: biplab5464 <biplab5464@outlook.com>
* unexpand: should allow multiple files #5852 and unexpand: show error message if a directory is specified #5845
* test file added for #5845#5852
* test case test_multiple_files improve
* cakebaker suggestion for a better code #5845#5852
---------
Co-authored-by: biplab5464 <biplab5464@outlook.com>