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

Re: t7610-mergetool.sh test failure

From
David Aguilar <davvid@gmail.com>
Date
May 27, 2016, 04:40 UTC
Message-ID
<20160527044027.GA26143@gmail.com>
In-Reply-To
<20160526015114.GA12851@sigill.intra.peff.net>
On Wed, May 25, 2016 at 08:51:14PM -0500, Jeff King wrote:
Show 28 quoted lines
> On Wed, May 25, 2016 at 06:16:15PM -0500, Jeff King wrote:
> 
> > On Tue, May 24, 2016 at 09:45:25AM -0700, Junio C Hamano wrote:
> > 
> > > On Tue, May 24, 2016 at 9:44 AM, Armin Kunaschik
> > > <megabreit@googlemail.com> wrote:
> > > > t7610-mergetool.sh fails on systems without mktemp.
> > > >
> > > > mktemp is used in git-mergetool.sh and throws an error when it's not available.
> > > > error: mktemp is needed when 'mergetool.writeToTemp' is true
> > > >
> > > > I see 2 options:
> > > > 1. code around it, write an own mktemp, maybe use the test-mktemp as a basis.
> > > > 2. disable the test when mktemp is not available
> > > 
> > > 3. find and install mktemp?
> > 
> > I'd agree more with (3) if it was some critical part of git-mergetool.
> > But it seems to be a completely optional feature that we use in only one
> > place, and git-mergetool even detects this case and complains.
> > 
> > So another alternative would be for the test to detect either that
> > mergetool worked, or that we got the "mktemp is needed" error.
> 
> BTW, one thing I happened to note while looking at this: running the
> test script will write into /tmp (or wherever your $TMPDIR points).
> Probably not a big deal, but I wonder if we should be setting $TMPDIR in
> our test harness.

We already set $HOME and various other variables to carefully tune the testsuite's behavior, so this sounds like a good idea IMO.

Would there be any downsides to setting $TMPDIR equal to the trash directory?

FWIW I set $TMPDIR to the $TEST_OUTPUT_DIRECTORY in test-lib.sh and was able to run the test suite without any errors.

Is it worth patching?
-- 
David
Previous: Jeff KingNext: Jeff King
Message 6 of 13 in “t7610-mergetool.sh test failure”
  1. Armin KunaschikMay 24, 2016
  2. Junio C HamanoMay 24, 2016
  3. Armin KunaschikMay 24, 2016
  4. Jeff KingMay 25, 2016
  5. Jeff KingMay 26, 2016
  6. David AguilarMay 27, 2016
  7. Jeff KingMay 27, 2016
  8. Junio C HamanoMay 27, 2016
  9. Jeff KingMay 27, 2016
  10. Junio C HamanoMay 27, 2016
  11. Jeff KingMay 27, 2016
  12. Armin KunaschikJun 22, 2016
  13. Jeff KingJun 22, 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.