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

Re: [PATCH v2] t1050-large: generate large files without dd

From
Jeff King <peff@peff.net>
Date
Jan 14, 2015, 21:00 UTC
Message-ID
<20150114210016.GC1155@peff.net>
In-Reply-To
<54B6D188.7010500@kdbg.org>
On Wed, Jan 14, 2015 at 09:28:56PM +0100, Johannes Sixt wrote:
Show 12 quoted lines
> For some unknown reason, the dd on my Windows box segfaults randomly,
> but since recently, it does so much more often than it used to, which
> makes running the test suite burdensome.
> 
> Use printf to write large files instead of dd. To emphasize that three
> of the large blobs are exact copies, use cp to allocate them.
> 
> The new code makes the files a bit smaller, and they are not sparse
> anymore, but the tests do not depend on these properties. We do not want
> to use test-genrandom here (which is used to generate large files
> elsewhere in t1050), so that the files can be compressed well (which
> keeps the run-time short).
Thanks, this version looks good to me.
> The files are now large text files, not binary files. But since they
> are larger than core.bigfilethreshold they are diagnosed as binary
> by Git. For this reason, the 'git diff' tests that check the output
> for "Binary files differ" still pass.

I was less concerned with tests not passing, as much as tests ending up testing nothing (which is very hard to test automatically, as you would have to recreate the original bug!). But I think it is fine, as text is more likely to get malloc'd than a binary (and these tests are really about making sure we avoid huge mallocs).

> @@ -162,7 +162,7 @@ test_expect_success 'pack-objects with large loose
> object' '

Funny wrapping here. I imagine Junio can manage to apply it anyway, but you may want to check your MUA settings.

-Peff
Previous: Johannes SixtNext: Johannes Sixt
Message 11 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.