git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Johannes Sixt <j6t@kdbg.org>,
	Christian Couder <christian.couder@gmail.com>,
	git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: "./t0001-init.sh --valgrind" is broken
Date: Thu, 3 Mar 2016 13:05:01 -0500	[thread overview]
Message-ID: <20160303180501.GA23116@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8CVfJdCmwWo50wHsc6DP6ft71d5bfBaFSJpv9XcNRwdSQ@mail.gmail.com>

On Thu, Mar 03, 2016 at 07:09:12PM +0700, Duy Nguyen wrote:

> +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

  parent reply	other threads:[~2016-03-03 18:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  0:07 "./t0001-init.sh --valgrind" is broken Christian Couder
2016-03-03  1:04 ` Duy Nguyen
2016-03-03  2:57   ` Junio C Hamano
2016-03-03  6:55   ` Johannes Sixt
2016-03-03 12:09     ` Duy Nguyen
2016-03-03 12:16       ` Duy Nguyen
2016-03-03 15:56         ` Junio C Hamano
2016-03-03 18:05       ` Jeff King [this message]
2016-03-03 18:17       ` Johannes Sixt

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=20160303180501.GA23116@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=pclouds@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).