[PATCH v2 00/11] Hash-independent tests (part 3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is next in the series of improvements to make tests
hash-independent.

This round modifies the helpers to more closely follow the
lighter-weight design that Eric Sunshine suggested in v1, at the cost of
requiring lookup keys to be shell identifiers.  If that's judged to be
undesirable, I can always hash the key before use.

Since we've decided on SHA-256, I put in an extra commit to update t0000
and remove the use of the SHA1 prerequisite.  As described in the commit
message, I wrote a Ruby script to synthesize the SHA-1 and SHA-256 blobs
and then used a second one to generate the trees, using the same
methodology for both algorithms. I did this specifically to ensure that
the object IDs are exactly the ones we think they are.

Changes from v1:
* Adopt pure shell approach for helper.
* Add tests for the helpers.
* Explicitly refer to SHA-256 now that we know it will be NewHash.
* Updated t0000 to remove SHA1 prerequisite.
* Change name of helper from test_translate to test_oid.
* Add helper to cache information in the shell.
* Simplified lookup of HEAD in t0002.
* Switched to using existing helper function in t0027.
* Simplified handling of IDs in t0064.

brian m. carlson (11):
  t: add tool to translate hash-related values
  t0000: use hash translation table
  t0000: update tests for SHA-256
  t0002: abstract away SHA-1 specific constants
  t0027: make hash size independent
  t0064: make hash size independent
  t1006: make hash size independent
  t1400: switch hard-coded object ID to variable
  t1405: make hash size independent
  t1406: make hash-size independent
  t1407: make hash size independent

 t/oid-info/hash-info           |   8 ++
 t/oid-info/oid                 |  29 ++++++
 t/oid-info/t0000               |  38 ++++++++
 t/t0000-basic.sh               | 168 ++++++++++++++++++++-------------
 t/t0002-gitfile.sh             |  26 ++---
 t/t0027-auto-crlf.sh           |   3 +-
 t/t0064-sha1-array.sh          |  49 +++++-----
 t/t1006-cat-file.sh            |   6 +-
 t/t1400-update-ref.sh          |   2 +-
 t/t1405-main-ref-store.sh      |   4 +-
 t/t1406-submodule-ref-store.sh |   6 +-
 t/t1407-worktree-ref-store.sh  |   4 +-
 t/test-lib-functions.sh        |  36 +++++++
 13 files changed, 267 insertions(+), 112 deletions(-)
 create mode 100644 t/oid-info/hash-info
 create mode 100644 t/oid-info/oid
 create mode 100644 t/oid-info/t0000




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux