Re: How do I run tests under Valgrind?
- From
Jeff King <peff@peff.net>
- Date
- Sep 17, 2012, 17:44 UTC
- Message-ID
- <20120917174439.GD1179@sigill.intra.peff.net>
- In-Reply-To
- <CALkWK0kDPGY_3v5SLPtyf+azUwA7msvQOvA+MaCgueZ71i2yGw@mail.gmail.com>
On Mon, Sep 17, 2012 at 11:09:27PM +0530, Ramkumar Ramachandra wrote:
Show 18 quoted lines
> Hi again, > > Jeff King wrote: > > That's certainly odd. It sounds like the valgrind setup is broken for > > you. Can you run: > > > > sh -x t0000-basic.sh --valgrind > > > > and see what's happening near those weird errors? > > Not helpful: > > + . ./test-lib.sh > + mkdir -p test-results > + basename t0000-basic.sh .sh > + BASE=test-results/t0000-basic > + GIT_TEST_TEE_STARTED=done /usr/bin/zsh t0000-basic.sh --valgrind > + tee test-results/t0000-basic.out
Oh, bleh. Stupid automatic --tee for valgrind. Try this:
SHELL="/usr/bin/zsh -x" ./t0000-basic.sh --valgrind
I am also doing my tests with "dash" as my shell. You might try setting your SHELL to /bin/sh to see if it makes a difference.
Show 6 quoted lines
> >> test_cmp:1: command not found: diff -u > > > > Lack of diff is going to be a problem. What OS is this? Do you really > > not have diff? Or is there something funny going on with your PATH? > > It's plain Ubuntu. Ofcourse I have `diff`- I don't know what's going on.
Maybe the PATH-munging in test-lib.sh is screwing up your PATH somehow. But it all looks pretty simple. The "sh -x" output can maybe tell us more.
-Peff