git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file
Date: Fri, 09 Feb 2018 10:36:19 -0800	[thread overview]
Message-ID: <xmqqd11exb6k.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180209142131.GA18701@sigill.intra.peff.net> (Jeff King's message of "Fri, 9 Feb 2018 09:21:31 -0500")

Jeff King <peff@peff.net> writes:

>   2. The "-x" problems aren't specific to test_must_fail at all. They're
>      a general issue with shell functions.
>
> I'm not entirely happy with saying "if you want to use -x, please use
> bash". But given that it actually solves the problems everywhere with no
> further effort, is it really that bad a solution?
>
> For the error messages from test_must_fail, could we go in the same
> direction, and send them to descriptor 4 rather than 2? We've already
> staked out descriptor 4 as something magical that must be left alone
> (see 9be795fb). If we can rely on that, then it becomes a convenient way
> for functions to make sure their output is going to the script's stderr.

That sounds clever and rather attractive.  It isn't that much of an
layering violation for test-lib-functions.sh::test_must_fail to have
such an intimate knowledge on how test_-lib.sh::test_eval_ sets up
the file descriptors, either.


  reply	other threads:[~2018-02-09 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09  2:42 [PATCH 0/3] Teach 'test_must_fail' to save the command's stderr to a file SZEDER Gábor
2018-02-09  2:42 ` [PATCH 1/3] t: document 'test_must_fail ok=<signal-name>' SZEDER Gábor
2018-02-09  2:42 ` [PATCH 2/3] t: teach 'test_must_fail' to save the command's stderr to a file SZEDER Gábor
2018-02-09  3:11   ` Eric Sunshine
2018-02-09 14:21   ` Jeff King
2018-02-09 18:36     ` Junio C Hamano [this message]
2018-02-09 18:57       ` Jeff King
2018-02-09 19:03         ` Jeff King
2018-02-23 23:26     ` SZEDER Gábor
2018-02-09  2:42 ` [PATCH 3/3] t1404: use 'test_must_fail stderr=<file>' SZEDER Gábor
2018-02-09  3:16   ` Eric Sunshine
2018-02-09  3:33     ` SZEDER Gábor
2018-02-09 18:22       ` Junio C Hamano

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=xmqqd11exb6k.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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).