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

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 26, 2018, 02:10 UTC
Message-ID
<CAPig+cR==SNfGdhwqPdvW75fUxXg-VSQ5Tz_OR7Sy_c0L94axQ@mail.gmail.com>
In-Reply-To
<20180325192055.841459-1-sandals@crustytoothpaste.net>

On Sun, Mar 25, 2018 at 3:20 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 13 quoted lines
> This is a series to make our tests hash-independent.  Many tests have
> hard-coded SHA-1 values in them, and it would be valuable to express
> these items in a hash-independent way for our hash transitions.
>
> The approach in this series relies on only three components for hash
> independence: git rev-parse, git hash-object, and EMPTY_BLOB and
> EMPTY_TREE.  Because many of our shell scripts and test components
> already rely on the first two, this seems like a safe assumption.
>
> For the same reason, this series avoids modifying tests that test these
> components or their expected SHA-1 values.  I expect that when we add
> another hash function, we'll copy these tests to expose both SHA-1 and
> NewHash versions.

What's the plan for oddball cases such as 66ae9a57b8 (t3404: rebase -i: demonstrate short SHA-1 collision, 2013-08-23) which depend implicitly upon SHA-1 without actually hardcoding any hashes? The test added by 66ae9a57b8, for instance, won't start failing in the face of NewHash, but it also won't be testing anything meaningful.

Should such tests be dropped altogether? Should they be marked with a 'SHA1' predicate or be annotated with a comment as being SHA-1-specific? Something else?

Previous: brian m. carlsonNext: Junio C Hamano
Message 14 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.