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

Re: [PATCH] tests: create an interactive gdb session with the 'debug' helper

From
Jeff King <peff@peff.net>
Date
Mar 20, 2017, 04:29 UTC
Message-ID
<20170320042908.2vwrqnqu2qvlywaf@sigill.intra.peff.net>
In-Reply-To
<CAM0VKj=k8kygEPpfX+-n0ODd70A8PEYAviKosvc0D34jT02N5w@mail.gmail.com>
On Sat, Mar 18, 2017 at 05:10:18PM +0100, SZEDER Gábor wrote:
Show 18 quoted lines
> > but perhaps this should add:
> >
> >   >&3 2>&4
> >
> > to be on the safe side. That covers running without "-v", as well as
> > cases where the test script is redirecting output
> 
> That wouldn't buy us much.  First, file descriptors 3 and 4 are the
> test's stdout and stderr, i.e. any process started within the test
> would be connected to those fds anyway without those explicit
> redirections.  Second, fds 3 and 4 are redirected to /dev/null in
> non-verbose mode, so it would still not work without '-v'.
> 
> Perhaps you meant '>&5 2>&7' here (and in the bash example in the
> commit message of 781f76b15 (test-lib: redirect stdin of tests,
> 2011-12-15), for that matter)?  Those redirections do in fact make
> 'debug' work even without '-v'.  Furthermore, those redirections do
> make 'test_pause' work without '-v', too.

Yeah, sorry, I got my descriptors mixed up. ">&5 2>&1" is the right invocation (unless you add a new "7" to save the original stderr).

-Peff
Previous: Johannes Schindelin
Message 9 of 9 in “tests: create an interactive gdb session with the 'debug' helper”
  1. tests: create an interactive gdb session with the 'debug' helperSZEDER Gábor, Mar 17, 2017
  2. Jeff KingMar 17, 2017
  3. SZEDER GáborMar 18, 2017
  4. 1/2 tests: create an interactive gdb session with the 'debug' helperSZEDER Gábor, Mar 18, 2017
  5. 2/2 tests: make the 'test_pause' helper work in non-verbose modeSZEDER Gábor, Mar 18, 2017
  6. Jeff KingMar 20, 2017
  7. Jeff KingMar 20, 2017
  8. Johannes SchindelinMar 21, 2017
  9. Jeff KingMar 20, 2017

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.