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

Re: [PATCH 00/10] Hash-independent tests (part 1)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 29, 2018, 14:01 UTC
Message-ID
<nycvar.QRO.7.76.6.1803291600240.5026@qfpub.tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqh8p087ck.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Wed, 28 Mar 2018, Junio C Hamano wrote:
Show 24 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> Ideally, the existing one be annotated with prereq SHA1, and also
> >> duplicated with a tweak to cause the same kind of (half-)collision
> >> under the NewHash and be annotated with prereq NewHash.
> >
> > That's a good idea. I wonder whether we want to be a bit more specific,
> > though, so that we have something grep'able for the future? Something like
> > SHA1_SHORT_COLLISION or some such?
> 
> Sorry, you lost me.  
> 
> What I meant was that a test, for example, that expects the object
> name for an empty blob begins with e69de29 is valid ONLY when Git is
> using SHA-1 to name objects, so such a test should be run only when
> Git is using SHA-1 and no other hash.  All tests in t1512 that
> expects the sequence of events in it would yield blobs and trees
> whose names have many leading "0"s are the same way.
> 
> I think it would do to have a single prerequisite to cover all such
> tests: "Run this piece of test only when Git is using SHA-1 hash".
> I do not think you need a set of prerequisites to say "Run this with
> SHA-1 because we are testing X" where X may be "disambiguation",
> "unique-abbrev", "loose-refs", or whatever.

I meant for the test case to be annotated such that one could find easily which test cases rely on specially-crafted objects to cause identical hash prefixes.

But I guess it is not worth the effort (because you'll only find out which tests miss that annotation when you try to port the test suite to a new hash).

Ciao, Dscho

Previous: Junio C HamanoNext: brian m. carlson
Message 18 of 20 in “Hash-independent tests (part 1)”
  1. 00/10 Hash-independent tests (part 1)brian m. carlson, Mar 25, 2018
  2. 01/10 t1011: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  3. 02/10 t1304: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  4. 03/10 t1300: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  5. 05/10 t1411: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  6. 04/10 t1405: sort reflog entries in a hash-independent waybrian m. carlson, Mar 25, 2018
  7. Junio C HamanoMar 26, 2018
  8. brian m. carlsonMar 26, 2018
  9. 07/10 t2020: abstract away SHA-1 specific constantsbrian m. carlson, Mar 25, 2018
  10. 06/10 t1507: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  11. 08/10 t2101: modernize test stylebrian m. carlson, Mar 25, 2018
  12. 09/10 t2101: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  13. 10/10 t2107: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  14. Eric SunshineMar 26, 2018
  15. Junio C HamanoMar 26, 2018
  16. Johannes SchindelinMar 27, 2018
  17. Junio C HamanoMar 28, 2018
  18. Johannes SchindelinMar 29, 2018
  19. brian m. carlsonMar 26, 2018
  20. Johannes SchindelinMar 27, 2018

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.