git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t1050-large: replace dd by test-genrandom

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2015, 17:31 UTC
Message-ID
<xmqqbnm1b76t.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150114112659.GA23474@peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Tue, Jan 13, 2015 at 03:40:10PM -0800, Junio C Hamano wrote:
>
>> >> -	test-genrandom seed2 2500000 >huge &&
>> >> +	printf "\0%2500000s" Y >huge &&
>> [...]
>> Are we depending on the binary-ness of these test files by the way?
>> The leading NUL \0 looked a bit strange to me.
>
> I don't think so. We do not want to do a text diff, because that would
> overflow our GIT_ALLOC_LIMIT. But the core.bigfilethreshold check is
> what will make them binary, not the actual content. So a gigantic text
> file is arguably a better test of the feature in question.
Perhaps.

The original used "dd seek" primarily so that we can logically have large file without wasting diskspace, in addition to make sure that the result would compress well. The large printf will still waste the diskspace, but disks are cheap enough to tolerate a hanful of files of a few megabytes and you already made sure that the compressibility is what matters more to the test latency, so I think all is good.

Thanks.
Previous: Jeff KingNext: Johannes Sixt
Message 9 of 13 in “t1050-large: replace dd by test-genrandom”
  1. t1050-large: replace dd by test-genrandomJohannes Sixt, Jan 13, 2015
  2. Junio C HamanoJan 13, 2015
  3. Johannes SixtJan 13, 2015
  4. Jeff KingJan 13, 2015
  5. Johannes SixtJan 13, 2015
  6. Jeff KingJan 13, 2015
  7. Junio C HamanoJan 13, 2015
  8. Jeff KingJan 14, 2015
  9. Junio C HamanoJan 14, 2015
  10. t1050-large: generate large files without ddJohannes Sixt, Jan 14, 2015
  11. Jeff KingJan 14, 2015
  12. Johannes SixtJan 14, 2015
  13. Junio C HamanoJan 14, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.