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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, August 1, 2024 2:35 PM, Junio C Hamano wrote:
><rsbecker@xxxxxxxxxxxxx> 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"
>> 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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux