git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: larsxschneider@gmail.com
Cc: git@vger.kernel.org, luke@diamand.org, sunshine@sunshineco.com
Subject: Re: [PATCH v1 2/2] git-p4: suppress non test relevant output
Date: Mon, 21 Dec 2015 12:38:37 -0800	[thread overview]
Message-ID: <xmqqd1tzfsfm.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1450629869-49522-3-git-send-email-larsxschneider@gmail.com> (larsxschneider@gmail.com's message of "Sun, 20 Dec 2015 17:44:29 +0100")

larsxschneider@gmail.com writes:

> From: Lars Schneider <larsxschneider@gmail.com>
>
> If tests are executed in verbose mode then the retry logic clutters the
> test output. Suppress that clutter.
>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
> ---
>  t/lib-git-p4.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
> index 30bf7ae..03f29c1 100644
> --- a/t/lib-git-p4.sh
> +++ b/t/lib-git-p4.sh
> @@ -174,7 +174,7 @@ retry_until_fail() {
>  	until ! "$@" 2>/dev/null || test $(time_in_seconds) -gt $timeout
>  	do
>  		sleep 1
> -	done
> +	done >/dev/null 2>&1

Eh, what does this squelch?  The sleep in the body of the loop is
silent, "test A -gt B" on the loop condition would be silent too, so
you are squelching the invocation of "$@" whose standard error
stream is already sent to 2>/dev/null?

If so, why not do it there instead?  You seem to run only "kill" to
send some signal to a process using this helper function, and it
would be silent on its standard output stream (even though it may
say "no such process" etc. on its standard error), so it is not
clear to me what you are doing with this change here...

  reply	other threads:[~2015-12-21 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20 16:44 [PATCH v1 0/2] git-p4: kill watchdog and suppress irrelevant output larsxschneider
2015-12-20 16:44 ` [PATCH v1 1/2] git-p4: kill p4d watchdog on cleanup larsxschneider
2015-12-20 16:44 ` [PATCH v1 2/2] git-p4: suppress non test relevant output larsxschneider
2015-12-21 20:38   ` Junio C Hamano [this message]
2015-12-22  8:47     ` Lars Schneider
2015-12-24 11:09       ` Luke Diamand
2015-12-21 20:31 ` [PATCH v1 0/2] git-p4: kill watchdog and suppress irrelevant output Junio C Hamano
2015-12-22  9:12   ` Lars Schneider

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=xmqqd1tzfsfm.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=luke@diamand.org \
    --cc=sunshine@sunshineco.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).