From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: <git@vger.kernel.org>
Subject: Re: [Bug] Temp file use in t0018.6
Date: Thu, 01 Aug 2024 11:34:59 -0700 [thread overview]
Message-ID: <xmqqbk2cum5o.fsf@gitster.g> (raw)
In-Reply-To: <02d401dae43e$c076b000$41641000$@nexbridge.com> (rsbecker@nexbridge.com's message of "Thu, 1 Aug 2024 14:15:07 -0400")
<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"
> 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...
next prev parent reply other threads:[~2024-08-01 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 18:15 [Bug] Temp file use in t0018.6 rsbecker
2024-08-01 18:34 ` Junio C Hamano [this message]
2024-08-01 18:51 ` [PATCH] t0018: remove leftover debugging cruft Junio C Hamano
2024-08-01 18:53 ` rsbecker
2024-08-01 18:51 ` [Bug] Temp file use in t0018.6 rsbecker
2024-08-02 3:39 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbk2cum5o.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.