From: Luke Diamand <luke@diamand.org>
To: Lars Schneider <larsxschneider@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, sunshine@sunshineco.com
Subject: Re: [PATCH v1 2/2] git-p4: suppress non test relevant output
Date: Thu, 24 Dec 2015 11:09:35 +0000 [thread overview]
Message-ID: <567BD26F.3020006@diamand.org> (raw)
In-Reply-To: <0185CA76-DDEE-4E7F-8EFF-65E80720E0AF@gmail.com>
On 22/12/15 08:47, Lars Schneider wrote:
>
> On 21 Dec 2015, at 21:38, Junio C Hamano <gitster@pobox.com> wrote:
>
>>
>> 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...
>
> If I run git-p4 tests in verbose mode (e.g. "./t9823-git-p4-mock-lfs.sh -v") without this patch then the last lines of the output look like this:
>
>>>> Output Start >>>
> expecting success:
> kill_p4d
>
> ./lib-git-p4.sh: line 172: 26289 Killed: 9 while true; do
> if test $(time_in_seconds) -gt $timeout; then
> kill -9 $pid; exit 1;
> fi; sleep 1;
> done
> ok 8 - kill p4d
>
> # passed all 8 test(s)
> 1..8
> <<< Output end <<<
>
> However, I want them to look like this:
>
>>>> Output Start >>>
> expecting success:
> kill_p4d
>
> ok 8 - kill p4d
>
> # passed all 8 test(s)
> 1..8
> <<< Output end <<<
>
> This is achieved with the patch. I am no shell expert ... is there a nicer way to achieve the same?
I get your desired output with the unmodified code from origin/next:
$ ./t9823-git-p4-mock-lfs.sh -v
expecting success:
kill_p4d
ok 8 - kill p4d
# passed all 8 test(s)
1..8
But that's because my shell is symlinked to /bin/dash. I suspect you are
using bash - when I run this with bash I get your command output.
Possibly a bash bug?
As Junio says, it seems a bit weird that we have to redirect the stderr
of that entire expression.
Luke
next prev parent reply other threads:[~2015-12-24 11:09 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
2015-12-22 8:47 ` Lars Schneider
2015-12-24 11:09 ` Luke Diamand [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=567BD26F.3020006@diamand.org \
--to=luke@diamand.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
--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.
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.