Re: [PATCH 3/9] t4141: fix inefficient use of dd(1)
On Fri, Jul 03, 2026 at 07:42:00AM +0200, Patrick Steinhardt wrote:
Show 11 quoted lines
> > It feels like test_copy_bytes should be able to do much better in
> > general. The obvious thing to reach for is "head -c", but the function
> > was originally added because that wasn't portable. The "-c" option is
> > not in POSIX, though the original comment claims IRIX was the problem,
> > so I wonder if "head -c" is de facto portable these days.
>
> An alternative could be to implement a simple helper as part of our
> test-tool. But I doubt it's really worth it: almost all callers only
> want to copy a small number of bytes. The only exception seems to be
> t0021, where we copy up to 65kB. But that whole test suite still only
> takes ~3 seconds, so optimizing that feels like wasted time to me.
Yeah, you're probably right that it's not worth worrying too much about.
-Peff