Subject: RE: [Patch v1 2/3] t5318: replace use of /dev/zero with generate_zero_bytes

From: "Randall S. Becker" <[email-masked]>
Date: Wed, 13 Feb 2019 16:03:30 -0500

On February 13, 2019 16:01, Junio C Hamano wrote:
> "Randall S. Becker" <[email-masked]> writes:
> 
> > My second attempt was to create the generate_zero_bytes function to
> > replace exactly what the second dd was doing but not user /dev/zero.
> 
> Yes, and I think the patch does that ;-)  It was just the original
> 
>     dd if=/dev/zero of=... bs=1 seek=$there count=$this_many
> 
> would have been impossible to rewrite with the new generate_zero_bytes
> helper unless $there weren't seeking to the end of the file.
> 
> But the other dd before the one the patch rewrites truncates the file to
make
> that seek=$there seeking to the end of the file, so simply appending
output
> from genereate_zero_bytes is sufficient and correct conversion.  I wanted
to
> explain that for future readers who may wonder if the patch is doing the
> exact conversion.

Sounds like we need a documentation patch in the actual test suite rather
than in the commit <ducking>.

Cheers,
Randall