git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: Is t7006-pager.sh racy?
Date: Wed, 01 Dec 2021 15:03:23 +0100	[thread overview]
Message-ID: <211201.86czmgbetu.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <YZqSgu4XjPWnURju@coredump.intra.peff.net>


On Sun, Nov 21 2021, Jeff King wrote:

> On Sun, Oct 24, 2021 at 07:03:49PM +0200, SZEDER Gábor wrote:
>
>> > What makes us expect that the "git log" invocation should trigger a
>> > SIGPIPE in the first place?
>> 
>> A misunderstanding, perhaps, because those 'git log' commands with
>> their early-exiting pagers rarely trigger SIGPIPE.
>
> I happened to be looking in this area today[1], and I think it turns out
> not to be "rarely", but rather "never" for some of the tests.
>
> The test in question sets the pager to "does-not-exist". But in that
> case we will realize immediately via run-command.c that we could not run
> the pager, and will not even redirect our stdout to it.
>
> For example, doing this:
>
>   GIT_PAGER=does-not-exist git -c alias.foo='!yes' -p foo
>
> will never get SIGPIPE; it will just write infinitely to the original
> stdout, and return success.
>
> Whereas this:
>
>   GIT_PAGER=false git -c alias.foo='!yes' -p foo
>
> will reliably get SIGPIPE. But even if we used it (with a while loop to
> instead of "yes" address the portability concern), the tests in t7006
> would still be wrong, because they are sending test-terminal's output to
> a closed pipe (so we'd still see SIGPIPE regardless of Git's behavior).
> They should be sending test_terminal's output to a file or /dev/null.
>
> It seems like this thread stalled. Ævar, were you planning to fix these
> tests?

Not at this point I'm not! :)

Anyway, a belated thanks for tackling this issue & sorry about the
mess. I see jk/t7006-sigpipe-tests-fix is marked already & those fixes
LGTM. This fell through the cracks for me among other E-Mail traffic.

> [...]

      parent reply	other threads:[~2021-12-01 14:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24  0:04 Is t7006-pager.sh racy? Junio C Hamano
2021-10-24 17:03 ` SZEDER Gábor
2021-10-25 17:41   ` Jeff King
2021-10-28 19:55     ` SZEDER Gábor
2021-10-28 22:10       ` Jeff King
2021-11-21 18:40   ` Jeff King
2021-11-21 22:05     ` Jeff King
2021-11-21 22:54       ` [PATCH] t7006: clean up SIGPIPE handling in trace2 tests Jeff King
2021-11-21 23:10         ` Jeff King
2021-11-22  2:17         ` Junio C Hamano
2021-11-22  4:51           ` Jeff King
2021-11-22  4:54             ` Jeff King
2021-11-22  5:49               ` Junio C Hamano
2021-11-22  6:05                 ` Junio C Hamano
2021-11-22 19:11                 ` Jeff King
2021-11-22 21:28                   ` [PATCH] run-command: unify signal and regular logic for wait_or_whine() Jeff King
2021-12-01 14:03     ` Ævar Arnfjörð Bjarmason [this message]

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=211201.86czmgbetu.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=szeder.dev@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).