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

RE: [Bug] Temp file use in t0018.6

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Aug 1, 2024, 18:51 UTC
Message-ID
<02e101dae443$d01575a0$704060e0$@nexbridge.com>
In-Reply-To
<xmqqbk2cum5o.fsf@gitster.g>
On Thursday, August 1, 2024 2:35 PM, Junio C Hamano wrote:
Show 17 quoted lines
><rsbecker@nexbridge.com> writes:
>
>> In the 2.46.0 test suite on NonStop I'm getting the following surprise
>> error:
>>
>> expecting success of 0018.6 'advice should be printed when GIT_ADVICE
>> is set to true':
>>         q_to_tab >expect <<-\EOF &&
>>         On branch trunk
>>
>>         No commits yet
>>
>>         Untracked files:
>>           (use "git add <file>..." to include in what will be committed)
>>         QREADME
>>
>>         nothing added to commit but untracked files present (use "git
add"
Show 16 quoted lines
>> to track)
>>         EOF
>>
>>         test_when_finished "rm -fr advice-test" &&
>>         git init advice-test &&
>>         (
>>                 cd advice-test &&
>>                 >README &&
>>                 GIT_ADVICE=true git status
>>         ) >actual &&
>>         cat actual > /tmp/actual &&
>>         test_cmp expect actual
>
>Sheesh.
>
>We should *not* be assuming what is in /tmp.  Our TMPDIR may not even be
set to
>point at /tmp.  Anybody can create directory 'actual'
>there and break this test.
>
>I thought this was a left-over debugging copy while reviewing the patch,
and I
>thought I had pointed it out to the author and/or I removed it while
queuing it.  The
>copy to /tmp/actual with cat should be removed.
>
>Thanks for noticing.  Are there other reference to /tmp in our test suite I
have to
>wonder...
Other than t0018...
* t0060 references /tmp but only for a synthetic repo path
* t1300 extensively uses /tmp with hard-coded file names for cookies.
* t7400 appears to work with submodules in /tmp but that may only be a
reference
* t9902 hard-codes a reference to the user home directory ~/tmp, which might
be fine
   but prevents parallel tests
The clar infrastructure assumes tests are done in /tmp (in find_tmp_path)
except
   for Windows, so that should be resolved also.

Regards, Randall

Previous: rsbecker@nexbridge.comNext: Jeff King
Message 5 of 6 in “[Bug] Temp file use in t0018.6”
  1. rsbecker@nexbridge.comAug 1, 2024
  2. Junio C HamanoAug 1, 2024
  3. t0018: remove leftover debugging cruftJunio C Hamano, Aug 1, 2024
  4. rsbecker@nexbridge.comAug 1, 2024
  5. rsbecker@nexbridge.comAug 1, 2024
  6. Jeff KingAug 2, 2024

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.