Re: [PATCH] t/perf: use 'test_file_size' in more places
- From
Jeff King <peff@peff.net>
- Date
- Nov 22, 2024, 08:28 UTC
- Message-ID
- <20241122082805.GC1179306@coredump.intra.peff.net>
- In-Reply-To
- <50c1368630684f235548d2e9a68d4de3745b5fe6.1732220875.git.me@ttaylorr.com>
On Thu, Nov 21, 2024 at 03:29:24PM -0500, Taylor Blau wrote:
> The perf test suite prefers to use test_file_size over 'wc -c' when > inside of a test_size block. One advantage is that accidentally writign > "wc -c file" (instead of "wc -c <file") does not inadvertently break the > tests (since the former will include the filename in the output of wc).
The use of "prefers" here confused me, because I did not think we used test_file_size at all yet. I am certainly OK with arguing that we should, but I was just confused on first read. Maybe you mean "s/perf//"?
Also, s/writign/writing/.
> I noticed while reviewing Stolee's --full-name-hash series that he added > new test_size tests that use the test_file_size helper instead of "wc > -c". I thought it would be good to clean up the existing uses of "wc -c" > in the perf suite as a result, which is what this patch does.
Perhaps we should also touch the one in t/perf/README, which points people using test_size to using "wc -c" in the first place?
-Peff