All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff King <peff@peff.net>
Cc: "Son Luong Ngoc" <sluongng@gmail.com>, git <git@vger.kernel.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: t5607 fail with GIT_TEST_FAIL_PREREQS enabled
Date: Wed, 11 Aug 2021 23:14:52 +0000	[thread overview]
Message-ID: <YRRZ7E6W+xV2f/CG@camp.crustytoothpaste.net> (raw)
In-Reply-To: <YRPYrXYwmwVnligD@coredump.intra.peff.net>

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

On 2021-08-11 at 14:03:25, Jeff King wrote:
> On Wed, Aug 11, 2021 at 03:02:52PM +0200, Son Luong Ngoc wrote:
> 
> >     git/t% GIT_TEST_FAIL_PREREQS=1 ./t5607-clone-bundle.sh
> > [...]
> >     #               if ! test_have_prereq SHA1
> >     #               then
> >     #                       echo "@object-format=sha256"
> >     #               fi >expect &&
> 
> The problem is presumably here. If test_have_prereq lies and say "no, we
> are using sha256" then we cannot expect what the built binary does to
> match that lie.
> 
> Perhaps that is a sign that test_have_prereq is not the right tool to
> check "which hash format are we using", but I don't think we have
> another convenient mechanism to do so currently.

We can use something like this:

  if "$(test_oid algo)" != sha1

> I also think that the FAIL_PREREQS system may be mis-designed a bit. We
> had a similar problem a few months ago, and I think Junio's response
> here points in a good direction:
> 
>   https://lore.kernel.org/git/xmqqblbgrwkg.fsf@gitster.g/

I take no position on this, but I'll send a patch to do something
similar to the above in a few minutes in case someone feels like picking
it up.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

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

  reply	other threads:[~2021-08-11 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 13:02 t5607 fail with GIT_TEST_FAIL_PREREQS enabled Son Luong Ngoc
2021-08-11 14:03 ` Jeff King
2021-08-11 23:14   ` brian m. carlson [this message]
2021-08-11 23:16     ` [PATCH v2] t5607: avoid using prerequisites to select algorithm brian m. carlson
2021-08-11 23:30       ` Jeff King

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

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

  git send-email \
    --in-reply-to=YRRZ7E6W+xV2f/CG@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sluongng@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.