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

Re: "./t0001-init.sh --valgrind" is broken

From
Jeff King <peff@peff.net>
Date
Mar 3, 2016, 18:05 UTC
Message-ID
<20160303180501.GA23116@sigill.intra.peff.net>
In-Reply-To
<CACsJy8CVfJdCmwWo50wHsc6DP6ft71d5bfBaFSJpv9XcNRwdSQ@mail.gmail.com>
On Thu, Mar 03, 2016 at 07:09:12PM +0700, Duy Nguyen wrote:
Show 19 quoted lines
> +the-other-Johannes who added valgrind support.
> 
> On Thu, Mar 3, 2016 at 1:55 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> > ---- 8< ----
> > Subject: [PATCH] t0001: fix GIT_* environment variable check under --valgrind
> >
> > When a test case is run without --valgrind, the wrap-for-bin.sh
> > helper script inserts the environment variable GIT_TEXTDOMAINDIR, but
> > when run with --valgrind, the variable is missing. A recently
> > introduced test case expects the presence of the variable, though, and
> > fails under --valgrind.
> 
> Yep.
> 
> It's interesting though that valgrind sets up some variables without
> going through bin-wrappers. That's understandable because valgrind
> support is added (in 4e1be63) 10 months before bin-wrappers (in
> ea92519).  But it's probably better that we inject valgrind command
> from inside bin-wrappers script, the same way we inject gdb, I think.

I had the same thought and even started on a patch, but it doesn't quite work. The bin-wrappers are all about intercepting what goes into the user's $PATH, and pointing our libexec dir at the main build.

So we have "git" and "git-upload-pack" in bin-wrappers, but not "git-log". Whereas the valgrind code wants to intercept _all_ of the test script's invocations of git, including ones spawned by scripts, other git commands, etc. So conceptually, it wants to intercept $GIT_EXEC_PATH.

-Peff
Previous: Junio C HamanoNext: Johannes Sixt
Message 8 of 9 in “"./t0001-init.sh --valgrind" is broken”
  1. Christian CouderMar 3, 2016
  2. Duy NguyenMar 3, 2016
  3. Junio C HamanoMar 3, 2016
  4. Johannes SixtMar 3, 2016
  5. Duy NguyenMar 3, 2016
  6. Duy NguyenMar 3, 2016
  7. Junio C HamanoMar 3, 2016
  8. Jeff KingMar 3, 2016
  9. Johannes SixtMar 3, 2016

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.