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

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

 



Hi brian,

On Tue, May 15, 2018 at 6:56 PM, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx>
> ---
>  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



[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