git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Windows: Fix intermittent failures of t7701

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 28, 2009, 12:43 UTC
Message-ID
<alpine.DEB.1.00.0901281341330.3586@pacific.mpi-cbg.de>
In-Reply-To
<20090128042814.GA18216@coredump.intra.peff.net>
Hi,
On Tue, 27 Jan 2009, Jeff King wrote:
Show 25 quoted lines
> On Tue, Jan 27, 2009 at 05:42:03PM +0100, Johannes Schindelin wrote:
> 
> > > We want to catch failures of test-chmtime; but since it appears in a 
> > > pipe, we cannot access its exit code. Therefore, we at least make sure 
> > > that it prints time stamps of all files that are passed on its command 
> > > line.
> > 
> > I use this trick in my valgrind series:
> > 
> > 	($PROGRAM; echo $? > exit.code) | $OTHER_PROGRAM &&
> > 	test 0 = "$(cat exit.code)"
> 
> Oh, that's far too readable. How about:
> 
>   exec 3>&1
>   status=$( ( ($PROGRAM ; echo $? >&4) | $OTHER_PROGRAM >&3) 4>&1 )
>   exec 3>&-
> 
> But seriously, I think if we are talking about tests, then
> 
>   $PROGRAM >output &&
>   $OTHER_PROGRAM <output
> 
> is very clear to read, and as a bonus makes "output" accessible for
> viewing when the test breaks.
The real problem is that in my case, OTHER_PROGRAM=tee.

But you're right, Hannes was talking about tests, where it might even make sense to have a record of what was passed between the two programs.

Ciao, Dscho

Previous: Jeff KingNext: Johannes Sixt
Message 4 of 7 in “Windows: Fix intermittent failures of t7701”
  1. Windows: Fix intermittent failures of t7701Johannes Sixt, Jan 27, 2009
  2. Johannes SchindelinJan 27, 2009
  3. Jeff KingJan 28, 2009
  4. Johannes SchindelinJan 28, 2009
  5. Johannes SixtJan 28, 2009
  6. Junio C HamanoJan 28, 2009
  7. Windows: Fix intermittent failures of t7701Johannes Sixt, Jan 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.