public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: PRASHANT S BISHT <prashantjee2025@gmail.com>,  git@vger.kernel.org
Subject: Re: [PATCH] t0004: replace test -e with test_path_exists
Date: Mon, 09 Mar 2026 16:12:14 -0700	[thread overview]
Message-ID: <xmqqpl5c1ttd.fsf@gitster.g> (raw)
In-Reply-To: <20260309224739.GA5682@coredump.intra.peff.net> (Jeff King's message of "Mon, 9 Mar 2026 18:47:39 -0400")

Jeff King <peff@peff.net> writes:

> Without "-v" you would not see the output either way, like:
>
>   ok 1 # skip some test (missing FOO)
>
> But with it, it is the difference between:
>
>   checking prerequisite: FOO
>   
>   mkdir -p "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   (
>   	cd "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   	test -e foo
>   
>   )
>   prerequisite FOO not satisfied
>   ok 1 # skip some test (missing FOO)
>
> and:
>
>   checking prerequisite: FOO
>   
>   mkdir -p "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   (
>   	cd "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   	test_path_exists foo
>   
>   )
>   Path foo doesn't exist
>   prerequisite FOO not satisfied
>   ok 1 # skip some test (missing FOO)

Sorry, but I am not convinced.

It is as if satisfying FOO is the norm, and not satisifying FOO,
i.e., missing path "foo", is something worth reporting about.

If the test reported both success and failure loudly, it may be a
different story, though.

> Probably it's pretty obvious for a one-liner like this, but I think it
> would help for a longer block.
>
> -Peff

  reply	other threads:[~2026-03-09 23:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 17:36 [PATCH] t0004: replace test -e with test_path_exists PRASHANT S BISHT
2026-03-09 21:14 ` Junio C Hamano
2026-03-09 22:47   ` Jeff King
2026-03-09 23:12     ` Junio C Hamano [this message]
2026-03-16 17:24 ` [PATCH v2] t4200: convert test -[df] checks to test_path_* helpers PRASHANT S BISHT
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09 17:56 [PATCH] t0004: replace test -e with test_path_exists PRASHANT S BISHT
2026-03-09 19:30 ` Eric Sunshine

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=xmqqpl5c1ttd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=prashantjee2025@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox