coreutils
coreutils copied to clipboard
`dd` fails on `tests/dd/not-rewound.sh`
With the test case, it show b - with gnu, it shows bde:
export C=./target/debug/coreutils
echo abcde > in
echo "bde" > ref
($C dd skip=1 count=1 bs=1; $C dd skip=1 bs=1) < in > out 2> /dev/null
diff -u ref out
comment the first line to come back on GNU
To run it:
bash util/run-gnu-test.sh tests/dd/not-rewound.sh
@jfinkels rings a bell ?
Yes! see https://github.com/uutils/coreutils/issues/3008#issuecomment-1028437526
oh, thanks, it is a dup then :)
Reopening as this seems to be broken still:
On GNU v8.30:
$ (dd skip=1 count=1 bs=1; dd skip=1 bs=1) < in > out 2> /dev/null && cat out
bde
On uutils dd (main branch, commit 0a385ee7a5297707045ad2f9c83f0b11df290e41)
$ (./target/release/dd skip=1 count=1 bs=1; ./target/release/dd skip=1 bs=1) < in > out 2> /dev/null && cat out
de
Another clue here is that this works as expected if stdout is not redirected to a file:
$ (./target/release/dd skip=1 count=1 bs=1; ./target/release/dd skip=1 bs=1) < in 2> /dev/null
bde
I think #4542 is getting at this issue.