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

Re: [PATCH v3 07/28] t1007: annotate with SHA1 prerequisite

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 16, 2018, 23:10 UTC
Message-ID
<20180516231026.GB652292@genre.crustytoothpaste.net>
In-Reply-To
<CAGZ79kZ3UVYgu6xO9OCT9ZZfarhmZ+iG+J0nMNzfnZ_jrnu8ag@mail.gmail.com>
On Wed, May 16, 2018 at 09:56:33AM -0700, Stefan Beller wrote:
Show 18 quoted lines
> Hi brian,
> 
> On Tue, May 15, 2018 at 6:56 PM, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> For the 2 occurrences above I think the SHA1 requirement is not
> needed as the check if a blob exists (and the id is given as $1)
> is independent of the hash function, it is just important that
> the same hash function is used in the git-cat-file as well as...
> 
> ... here, where we create the blob to test without
> writing it into the object database. In a way we test that
> the absence of -w works correctly.
> 
> Oh, the $hello_sha1 is hard coded, which is why we
> think this test is SHA1 dependent.
> 
> But that would fit in line with the test_blob[_does_not]_exist
> being independent of the hashes?

These functions are technically independent of the hash, but the way we call them is not. Since we only look up certain fixed values in those functions, they're going to fail if we use a different hash.

There really isn't a great way to annotate the tests independent of the functions without duplicating a lot of the logic that occurs in the test library, and I didn't really want to do that.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Stefan BellerNext: brian m. carlson
Message 9 of 64 in “Hash-independent tests”
  1. 00/28 Hash-independent testsbrian m. carlson, May 16, 2018
  2. 01/28 t/test-lib: add an SHA1 prerequisitebrian m. carlson, May 16, 2018
  3. 02/28 t/test-lib: introduce ZERO_OIDbrian m. carlson, May 16, 2018
  4. 04/28 t/test-lib: introduce OID_REGEXbrian m. carlson, May 16, 2018
  5. 03/28 t: switch $_z40 to $ZERO_OIDbrian m. carlson, May 16, 2018
  6. 05/28 t: switch $_x40 to $OID_REGEXbrian m. carlson, May 16, 2018
  7. 07/28 t1007: annotate with SHA1 prerequisitebrian m. carlson, May 16, 2018
  8. Stefan BellerMay 16, 2018
  9. brian m. carlsonMay 16, 2018
  10. 09/28 t4044: skip test if not using SHA-1brian m. carlson, May 16, 2018
  11. 10/28 t: skip pack tests if not using SHA-1brian m. carlson, May 16, 2018
  12. 11/28 t2203: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  13. 14/28 t3905: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  14. 17/28 t4014: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  15. 21/28 t4029: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  16. 23/28 t/lib-diff-alternative: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  17. 24/28 t4205: sort log output in a hash-independent waybrian m. carlson, May 16, 2018
  18. 26/28 t4045: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  19. 27/28 t4208: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  20. 28/28 t5300: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  21. 22/28 t4030: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  22. 25/28 t4042: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  23. 18/28 t4020: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  24. 20/28 t4029: fix test indentationbrian m. carlson, May 16, 2018
  25. 15/28 t4007: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  26. 12/28 t3103: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  27. 19/28 t4022: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  28. 13/28 t3702: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  29. Stefan BellerMay 16, 2018
  30. brian m. carlsonMay 16, 2018
  31. 16/28 t4008: abstract away SHA-1-specific constantsbrian m. carlson, May 16, 2018
  32. 06/28 t0000: annotate with SHA1 prerequisitebrian m. carlson, May 16, 2018
  33. 08/28 t1512: skip test if not using SHA-1brian m. carlson, May 16, 2018
  34. 00/28 Hash-independent testsbrian m. carlson, May 21, 2018
  35. 01/28 t/test-lib: add an SHA1 prerequisitebrian m. carlson, May 21, 2018
  36. 02/28 t/test-lib: introduce ZERO_OIDbrian m. carlson, May 21, 2018
  37. 03/28 t: switch $_z40 to $ZERO_OIDbrian m. carlson, May 21, 2018
  38. 04/28 t/test-lib: introduce OID_REGEXbrian m. carlson, May 21, 2018
  39. 05/28 t: switch $_x40 to $OID_REGEXbrian m. carlson, May 21, 2018
  40. 06/28 t0000: annotate with SHA1 prerequisitebrian m. carlson, May 21, 2018
  41. 07/28 t1007: annotate with SHA1 prerequisitebrian m. carlson, May 21, 2018
  42. 08/28 t1512: skip test if not using SHA-1brian m. carlson, May 21, 2018
  43. 09/28 t4044: skip test if not using SHA-1brian m. carlson, May 21, 2018
  44. 10/28 t: skip pack tests if not using SHA-1brian m. carlson, May 21, 2018
  45. 11/28 t2203: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  46. 13/28 t3702: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  47. 14/28 t3905: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  48. 15/28 t4007: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  49. 17/28 t4014: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  50. 18/28 t4020: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  51. 19/28 t4022: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  52. 20/28 t4029: fix test indentationbrian m. carlson, May 21, 2018
  53. 21/28 t4029: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  54. 16/28 t4008: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  55. 23/28 t/lib-diff-alternative: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  56. 25/28 t4042: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  57. 24/28 t4205: sort log output in a hash-independent waybrian m. carlson, May 21, 2018
  58. 27/28 t4208: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  59. 28/28 t5300: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  60. 26/28 t4045: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  61. 22/28 t4030: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  62. 12/28 t3103: abstract away SHA-1-specific constantsbrian m. carlson, May 21, 2018
  63. Ben PeartMay 21, 2018
  64. brian m. carlsonMay 21, 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.