public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* question about test suite regarding stderr/stdout
@ 2014-05-11 22:38 Ruediger Meier
  2014-05-11 23:22 ` Sami Kerola
  0 siblings, 1 reply; 3+ messages in thread
From: Ruediger Meier @ 2014-05-11 22:38 UTC (permalink / raw)
  To: util-linux

Hi,

if you do this grep in util-linux
  git grep '2>&1 >> $TS_OUTPUT' tests/ts

then you find 45 lines like this
$TS_CMD_MKCRAMFS -n $LABEL $IMAGE_SRC $IMAGE_PATH 2>&1 >> $TS_OUTPUT

which means that these warnings go to make's output but not to 
$TS_OUTPUT.

I'm not sure whether this is really always wanted. For me it often looks 
like a typo which should be ">> $TS_OUTPUT 2>&1" instead. Of course 
could also be that it's really wanted as is to ignore stderr of too 
verbose commands.

Could somebody please check this too?
I'v had some cases where I would have liked to see that stderr in test 
diff instead of build log. Moreover because of parallel tests it can be 
difficult to find out which warning belongs to which particular test.

cu,
Rudi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about test suite regarding stderr/stdout
  2014-05-11 22:38 question about test suite regarding stderr/stdout Ruediger Meier
@ 2014-05-11 23:22 ` Sami Kerola
  2014-05-12 10:53   ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Sami Kerola @ 2014-05-11 23:22 UTC (permalink / raw)
  To: Ruediger Meier; +Cc: util-linux

On 11 May 2014 23:38, Ruediger Meier <sweet_f_a@gmx.de> wrote:
> if you do this grep in util-linux
>   git grep '2>&1 >> $TS_OUTPUT' tests/ts
>
> then you find 45 lines like this
> $TS_CMD_MKCRAMFS -n $LABEL $IMAGE_SRC $IMAGE_PATH 2>&1 >> $TS_OUTPUT
>
> which means that these warnings go to make's output but not to
> $TS_OUTPUT.
>
> I'm not sure whether this is really always wanted. For me it often looks
> like a typo which should be ">> $TS_OUTPUT 2>&1" instead. Of course
> could also be that it's really wanted as is to ignore stderr of too
> verbose commands.
>
> Could somebody please check this too?
> I'v had some cases where I would have liked to see that stderr in test
> diff instead of build log. Moreover because of parallel tests it can be
> difficult to find out which warning belongs to which particular test.

Hi Rudi,

Before parallel tests sending messages to stdout was OK, but now
things has changed and I think directing all messages to $TS_OUTPUT is
better option.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about test suite regarding stderr/stdout
  2014-05-11 23:22 ` Sami Kerola
@ 2014-05-12 10:53   ` Karel Zak
  0 siblings, 0 replies; 3+ messages in thread
From: Karel Zak @ 2014-05-12 10:53 UTC (permalink / raw)
  To: kerolasa; +Cc: Ruediger Meier, util-linux

On Mon, May 12, 2014 at 12:22:46AM +0100, Sami Kerola wrote:
> On 11 May 2014 23:38, Ruediger Meier <sweet_f_a@gmx.de> wrote:
> > if you do this grep in util-linux
> >   git grep '2>&1 >> $TS_OUTPUT' tests/ts
> >
> > then you find 45 lines like this
> > $TS_CMD_MKCRAMFS -n $LABEL $IMAGE_SRC $IMAGE_PATH 2>&1 >> $TS_OUTPUT
> >
> >
> > which means that these warnings go to make's output but not to
> > $TS_OUTPUT.
> >
> > I'm not sure whether this is really always wanted. For me it often looks
> > like a typo which should be ">> $TS_OUTPUT 2>&1" instead. Of course
> > could also be that it's really wanted as is to ignore stderr of too
> > verbose commands.
> >
> > Could somebody please check this too?
> > I'v had some cases where I would have liked to see that stderr in test
> > diff instead of build log. Moreover because of parallel tests it can be
> > difficult to find out which warning belongs to which particular test.
> 
> Hi Rudi,
> 
> Before parallel tests sending messages to stdout was OK, but now
> things has changed and I think directing all messages to $TS_OUTPUT is
> better option.

 That's usually correct and wanted, but note that some utils generate
 non-generic and irrelevant messages on stdout (for example messages 
 with device names). You cannot log such stuff to $TS_OUTPUT, so
 sometimes it's better to rely on stderr only and ignore stdout.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-12 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11 22:38 question about test suite regarding stderr/stdout Ruediger Meier
2014-05-11 23:22 ` Sami Kerola
2014-05-12 10:53   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox