git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Lars Schneider" <larsxschneider@gmail.com>
Subject: Re: [PATCH 06/28] t0000: annotate with SHA1 prerequisite
Date: Mon, 7 May 2018 23:40:58 +0000	[thread overview]
Message-ID: <20180507234058.GJ953644@genre.crustytoothpaste.net> (raw)
In-Reply-To: <CAN0heSqu9gwsrgV0rnPe8=vANhBA+Z7fZ3UNTeG9S1QiJBsksw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

On Mon, May 07, 2018 at 12:24:13PM +0200, Martin Ågren wrote:
> This could be more centralized at the top of the file, more likely to be
> noticed during a `make test` and easier to adapt in the future. Maybe
> something like this at the top of the file:
> 
> if hash for storage is SHA-1 then
>         knowntree=7bb943559a305bdd6bdee2cef6e5df2413c3d30a
>         path0=f87290f8eb2cbbea7857214459a0739927eab154
>         ....
> else
>         skip_all='unknown hash, but you really need to expand this test'
>         # or even error out!
> fi

As I mentioned in an earlier email, I plan to set an environment
variable for the algorithms in use and then do something like:

  test "$tree" = "$(test-tool hash-helper --output known-tree)"

where "known-tree" is some key we can use to look up the SHA-1 or
NewHash value, and we've specified we want the output format (as opposed
to input format or on-disk format).

> When we add NewHash, we get to add an "else if". Otherwise, we'd be
> plugging in NewHash without testing some very basic stuff.
> 
> Ok, so `skip_all` is quite hard, but skipping certain basic tests also
> feels really shaky. Adding a new hash algo without adapting this test
> should be a no-go, IMHO.

I agree that this test needs to be updated for NewHash, but since we
haven't decided what that's going to be, it makes sense during
development to still test the rest of the code if possible so that we
know what does and doesn't work.

This is a first step in making it obvious what doesn't work, and when we
know what the data is supposed to be, we can adjust it by fixing the
tests so that it works in all cases.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

  reply	other threads:[~2018-05-07 23:41 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06 23:17 [PATCH 00/28] Hash-independent tests (part 2) brian m. carlson
2018-05-06 23:17 ` [PATCH 01/28] t/test-lib: add an SHA1 prerequisite brian m. carlson
2018-05-07 10:10   ` Martin Ågren
2018-05-07 23:30     ` brian m. carlson
2018-05-08 18:26       ` Martin Ågren
2018-05-08 23:46         ` brian m. carlson
2018-05-06 23:17 ` [PATCH 02/28] t/test-lib: introduce ZERO_OID brian m. carlson
2018-05-06 23:17 ` [PATCH 03/28] t: switch $_z40 to $ZERO_OID brian m. carlson
2018-05-06 23:17 ` [PATCH 04/28] t/test-lib: introduce FULL_HEX brian m. carlson
2018-05-06 23:53   ` Eric Sunshine
2018-05-07  2:28     ` brian m. carlson
2018-05-06 23:17 ` [PATCH 05/28] t: switch $_x40 to $FULL_HEX brian m. carlson
2018-05-06 23:17 ` [PATCH 06/28] t0000: annotate with SHA1 prerequisite brian m. carlson
2018-05-07 10:24   ` Martin Ågren
2018-05-07 23:40     ` brian m. carlson [this message]
2018-05-08 18:28       ` Martin Ågren
2018-05-09  0:13         ` brian m. carlson
2018-05-06 23:17 ` [PATCH 07/28] t1007: " brian m. carlson
2018-05-06 23:17 ` [PATCH 08/28] t1512: skip test if not using SHA-1 brian m. carlson
2018-05-06 23:17 ` [PATCH 09/28] t4044: " brian m. carlson
2018-05-06 23:17 ` [PATCH 10/28] t: skip pack tests " brian m. carlson
2018-05-07 10:30   ` Martin Ågren
2018-05-06 23:17 ` [PATCH 11/28] t2203: abstract away SHA-1-specific constants brian m. carlson
2018-05-06 23:17 ` [PATCH 12/28] t3103: " brian m. carlson
2018-05-06 23:17 ` [PATCH 13/28] t3702: " brian m. carlson
2018-05-06 23:17 ` [PATCH 14/28] t3905: " brian m. carlson
2018-05-07  0:03   ` Eric Sunshine
2018-05-07  2:30     ` brian m. carlson
2018-05-06 23:17 ` [PATCH 15/28] t4007: " brian m. carlson
2018-05-06 23:17 ` [PATCH 16/28] t4008: " brian m. carlson
2018-05-07  0:07   ` Eric Sunshine
2018-05-07  2:32     ` brian m. carlson
2018-05-06 23:17 ` [PATCH 17/28] t4014: " brian m. carlson
2018-05-06 23:17 ` [PATCH 18/28] t4020: " brian m. carlson
2018-05-06 23:17 ` [PATCH 19/28] t4022: " brian m. carlson
2018-05-06 23:17 ` [PATCH 20/28] t4029: fix test indentation brian m. carlson
2018-05-06 23:17 ` [PATCH 21/28] t4029: abstract away SHA-1-specific constants brian m. carlson
2018-05-06 23:17 ` [PATCH 22/28] t4030: " brian m. carlson
2018-05-06 23:17 ` [PATCH 23/28] t/lib-diff-alternative: " brian m. carlson
2018-05-06 23:17 ` [PATCH 24/28] t4205: sort log output in a hash-independent way brian m. carlson
2018-05-06 23:17 ` [PATCH 25/28] t4042: abstract away SHA-1-specific constants brian m. carlson
2018-05-06 23:17 ` [PATCH 26/28] t4045: " brian m. carlson
2018-05-06 23:17 ` [PATCH 27/28] t4208: " brian m. carlson
2018-05-06 23:17 ` [PATCH 28/28] t5300: " brian m. carlson
2018-05-07  1:49 ` [PATCH 00/28] Hash-independent tests (part 2) Eric Sunshine
2018-05-07  2:40   ` brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180507234058.GJ953644@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.com \
    --cc=martin.agren@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).