Re: "./t0001-init.sh --valgrind" is broken
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Mar 3, 2016, 18:17 UTC
- Message-ID
- <56D87FBE.5050908@kdbg.org>
- In-Reply-To
- <CACsJy8CVfJdCmwWo50wHsc6DP6ft71d5bfBaFSJpv9XcNRwdSQ@mail.gmail.com>
Am 03.03.2016 um 13:09 schrieb Duy Nguyen:
Show 26 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. > >> Rewrite the test case to strip conditially defined environment variables >> from both expected and actual output. > > Or we could set GIT_TEXTDOMAINDIR in the "if test -n $valgrind" code > in test-lib.sh, which makes the two more consistent. Also simpler > patch.
My fix (or something along its lines) is needed nevertheless. Just s/--valgrind/--with-dashes/g in the commit message if you want to fix the --valgrind case differently ;-)
I run tests on Windows --with-dashes in the hopes that it saves a fork and exec or two on every git invocation.
-- Hannes