git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 00/10] Hash-independent tests (part 1)
@ 2018-03-25 19:20 brian m. carlson
  2018-03-25 19:20 ` [PATCH 01/10] t1011: abstract away SHA-1-specific constants brian m. carlson
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: brian m. carlson @ 2018-03-25 19:20 UTC (permalink / raw)
  To: git
  Cc: Nguyễn Thái Ngọc Duy, Junio C Hamano,
	Johannes Schindelin, Lars Schneider

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.

Many of our tests use heredocs for defining expected values.  My
approach has been to interpolate values into the heredocs, as that
produces the best readability in my view.

These tests have been tested using my "short BLAKE2b" series (branch
blake2b-test-hash) and have also been tested based off master.

Comments on any aspect of this series are welcome, but opinions on the
approach or style are especially so.

brian m. carlson (10):
  t1011: abstract away SHA-1-specific constants
  t1304: abstract away SHA-1-specific constants
  t1300: abstract away SHA-1-specific constants
  t1405: sort reflog entries in a hash-independent way
  t1411: abstract away SHA-1-specific constants
  t1507: abstract away SHA-1-specific constants
  t2020: abstract away SHA-1 specific constants
  t2101: modernize test style
  t2101: abstract away SHA-1-specific constants
  t2107: abstract away SHA-1-specific constants

 t/t1011-read-tree-sparse-checkout.sh |  7 ++-
 t/t1300-repo-config.sh               |  6 +-
 t/t1304-default-acl.sh               |  2 +-
 t/t1405-main-ref-store.sh            |  4 +-
 t/t1411-reflog-show.sh               | 21 ++++---
 t/t1507-rev-parse-upstream.sh        |  5 +-
 t/t2020-checkout-detach.sh           | 40 +++++++-----
 t/t2101-update-index-reupdate.sh     | 91 +++++++++++++++-------------
 t/t2107-update-index-basic.sh        |  6 +-
 9 files changed, 100 insertions(+), 82 deletions(-)


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-03-29 14:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-25 19:20 [PATCH 00/10] Hash-independent tests (part 1) brian m. carlson
2018-03-25 19:20 ` [PATCH 01/10] t1011: abstract away SHA-1-specific constants brian m. carlson
2018-03-25 19:20 ` [PATCH 02/10] t1304: " brian m. carlson
2018-03-25 19:20 ` [PATCH 03/10] t1300: " brian m. carlson
2018-03-25 19:20 ` [PATCH 04/10] t1405: sort reflog entries in a hash-independent way brian m. carlson
2018-03-26 22:18   ` Junio C Hamano
2018-03-26 23:02     ` brian m. carlson
2018-03-25 19:20 ` [PATCH 05/10] t1411: abstract away SHA-1-specific constants brian m. carlson
2018-03-25 19:20 ` [PATCH 06/10] t1507: " brian m. carlson
2018-03-25 19:20 ` [PATCH 07/10] t2020: abstract away SHA-1 specific constants brian m. carlson
2018-03-25 19:20 ` [PATCH 08/10] t2101: modernize test style brian m. carlson
2018-03-25 19:20 ` [PATCH 09/10] t2101: abstract away SHA-1-specific constants brian m. carlson
2018-03-25 19:20 ` [PATCH 10/10] t2107: " brian m. carlson
2018-03-26  2:10 ` [PATCH 00/10] Hash-independent tests (part 1) Eric Sunshine
2018-03-26  4:48   ` Junio C Hamano
2018-03-27 14:40     ` Johannes Schindelin
2018-03-28 16:58       ` Junio C Hamano
2018-03-29 14:01         ` Johannes Schindelin
2018-03-26 22:27   ` brian m. carlson
2018-03-27 14:30 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).