git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Martin Ågren" <martin.agren@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Johannes Sixt" <j6t@kdbg.org>
Subject: Re: [PATCH v3 07/28] t1007: annotate with SHA1 prerequisite
Date: Wed, 16 May 2018 09:56:33 -0700	[thread overview]
Message-ID: <CAGZ79kZ3UVYgu6xO9OCT9ZZfarhmZ+iG+J0nMNzfnZ_jrnu8ag@mail.gmail.com> (raw)
In-Reply-To: <20180516015630.661349-8-sandals@crustytoothpaste.net>

Hi brian,

On Tue, May 15, 2018 at 6:56 PM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> Since this is a core test that tests basic functionality, annotate the
> assertions that have dependencies on SHA-1 with the appropriate
> prerequisite.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
>  t/t1007-hash-object.sh | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
> index 532682f51c..a37753047e 100755
> --- a/t/t1007-hash-object.sh
> +++ b/t/t1007-hash-object.sh
> @@ -9,13 +9,13 @@ echo_without_newline() {
>  }
>
>  test_blob_does_not_exist() {
> -       test_expect_success 'blob does not exist in database' "
> +       test_expect_success SHA1 'blob does not exist in database' "
>                 test_must_fail git cat-file blob $1
>         "
>  }
>
>  test_blob_exists() {
> -       test_expect_success 'blob exists in database' "
> +       test_expect_success SHA1 'blob exists in database' "
>                 git cat-file blob $1
>         "
>  }

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...


> @@ -73,19 +73,19 @@ test_expect_success "Can't use --path with --no-filters" '
>
>  push_repo
>
> -test_expect_success 'hash a file' '
> +test_expect_success SHA1 'hash a file' '
>         test $hello_sha1 = $(git hash-object hello)

... 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?

Stefan

  reply	other threads:[~2018-05-16 16:56 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  1:56 [PATCH v3 00/28] Hash-independent tests brian m. carlson
2018-05-16  1:56 ` [PATCH v3 01/28] t/test-lib: add an SHA1 prerequisite brian m. carlson
2018-05-16  1:56 ` [PATCH v3 02/28] t/test-lib: introduce ZERO_OID brian m. carlson
2018-05-16  1:56 ` [PATCH v3 03/28] t: switch $_z40 to $ZERO_OID brian m. carlson
2018-05-16  1:56 ` [PATCH v3 04/28] t/test-lib: introduce OID_REGEX brian m. carlson
2018-05-16  1:56 ` [PATCH v3 05/28] t: switch $_x40 to $OID_REGEX brian m. carlson
2018-05-16  1:56 ` [PATCH v3 06/28] t0000: annotate with SHA1 prerequisite brian m. carlson
2018-05-16  1:56 ` [PATCH v3 07/28] t1007: " brian m. carlson
2018-05-16 16:56   ` Stefan Beller [this message]
2018-05-16 23:10     ` brian m. carlson
2018-05-16  1:56 ` [PATCH v3 08/28] t1512: skip test if not using SHA-1 brian m. carlson
2018-05-16  1:56 ` [PATCH v3 09/28] t4044: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 10/28] t: skip pack tests " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 11/28] t2203: abstract away SHA-1-specific constants brian m. carlson
2018-05-16  1:56 ` [PATCH v3 12/28] t3103: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 13/28] t3702: " brian m. carlson
2018-05-16 17:18   ` Stefan Beller
2018-05-16 23:46     ` brian m. carlson
2018-05-16  1:56 ` [PATCH v3 14/28] t3905: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 15/28] t4007: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 16/28] t4008: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 17/28] t4014: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 18/28] t4020: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 19/28] t4022: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 20/28] t4029: fix test indentation brian m. carlson
2018-05-16  1:56 ` [PATCH v3 21/28] t4029: abstract away SHA-1-specific constants brian m. carlson
2018-05-16  1:56 ` [PATCH v3 22/28] t4030: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 23/28] t/lib-diff-alternative: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 24/28] t4205: sort log output in a hash-independent way brian m. carlson
2018-05-16  1:56 ` [PATCH v3 25/28] t4042: abstract away SHA-1-specific constants brian m. carlson
2018-05-16  1:56 ` [PATCH v3 26/28] t4045: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 27/28] t4208: " brian m. carlson
2018-05-16  1:56 ` [PATCH v3 28/28] t5300: " brian m. carlson
2018-05-21  2:01 ` [PATCH v4 00/28] Hash-independent tests brian m. carlson
2018-05-21  2:01   ` [PATCH v4 01/28] t/test-lib: add an SHA1 prerequisite brian m. carlson
2018-05-21  2:01   ` [PATCH v4 02/28] t/test-lib: introduce ZERO_OID brian m. carlson
2018-05-21  2:01   ` [PATCH v4 03/28] t: switch $_z40 to $ZERO_OID brian m. carlson
2018-05-21  2:01   ` [PATCH v4 04/28] t/test-lib: introduce OID_REGEX brian m. carlson
2018-05-21  2:01   ` [PATCH v4 05/28] t: switch $_x40 to $OID_REGEX brian m. carlson
2018-05-21  2:01   ` [PATCH v4 06/28] t0000: annotate with SHA1 prerequisite brian m. carlson
2018-05-21  2:01   ` [PATCH v4 07/28] t1007: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 08/28] t1512: skip test if not using SHA-1 brian m. carlson
2018-05-21  2:01   ` [PATCH v4 09/28] t4044: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 10/28] t: skip pack tests " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 11/28] t2203: abstract away SHA-1-specific constants brian m. carlson
2018-05-21  2:01   ` [PATCH v4 12/28] t3103: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 13/28] t3702: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 14/28] t3905: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 15/28] t4007: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 16/28] t4008: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 17/28] t4014: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 18/28] t4020: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 19/28] t4022: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 20/28] t4029: fix test indentation brian m. carlson
2018-05-21  2:01   ` [PATCH v4 21/28] t4029: abstract away SHA-1-specific constants brian m. carlson
2018-05-21  2:01   ` [PATCH v4 22/28] t4030: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 23/28] t/lib-diff-alternative: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 24/28] t4205: sort log output in a hash-independent way brian m. carlson
2018-05-21  2:01   ` [PATCH v4 25/28] t4042: abstract away SHA-1-specific constants brian m. carlson
2018-05-21  2:01   ` [PATCH v4 26/28] t4045: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 27/28] t4208: " brian m. carlson
2018-05-21  2:01   ` [PATCH v4 28/28] t5300: " brian m. carlson
2018-05-21 13:17   ` [PATCH v4 00/28] Hash-independent tests Ben Peart
2018-05-21 23:08     ` 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=CAGZ79kZ3UVYgu6xO9OCT9ZZfarhmZ+iG+J0nMNzfnZ_jrnu8ag@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=martin.agren@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.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).