Re: [PATCH] dd: don't place a hole when seeking N bytes when N is less t
From:
Pádraig Brady
Subject:
Re: [PATCH] dd: don't place a hole when seeking N bytes when N is less than obs
Date:
Thu, 29 Oct 2026 15:46:02 +0000
User-agent:
Mozilla Thunderbird Beta
On 29/10/2026 04:17, Collin Funk wrote:
* src/dd.c (main): Also account for seeking bytes in a few conditions.
* tests/dd/bytes.sh: Add a test case.
* tests/dd/fail-ftruncate-fstat.sh (fail_ftruncate_fstat): New function.
Use it to test seeking on bytes, and make sure fstat and ftruncate are
called.
* NEWS: Mention the bug fix.
The code changes look good.
I'd adjust the test as per the attached.
That fixes an obvious typo where $seek_arg wasn't referenced.
Also it checks the first invocation actually does inject or skips,
which is a stonger verification than just checking strace supports the args.
cheers,
Padraig