From: Junio C Hamano <gitster@pobox.com>
To: Mark Mentovai <mark@chromium.org>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Git Development <git@vger.kernel.org>,
Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH] t7900: use pwd -P in macOS maintenance test
Date: Tue, 27 May 2025 10:19:53 -0700 [thread overview]
Message-ID: <xmqqy0uiug1y.fsf@gitster.g> (raw)
In-Reply-To: <9e9ed1ce-76dc-536d-56a6-e85e1dfe58c6@chromium.org> (Mark Mentovai's message of "Sat, 24 May 2025 00:39:20 -0400 (EDT)")
Mark Mentovai <mark@chromium.org> writes:
> Forcing the entire test suite to run from a realpath-canonicalized
> path seems like a blunt instrument, though.
I view it differently.
It is a very effective way to make sure that the tests work for one
person does not mysteriously break for another, only due to where
they kept the git repository and where in their filesystem they
arranged the tests to run. That is not the kind of breakage we want
our developers to be scratching their heads about.
The part of the test-lib I showed already was trying to make sure
that our idea of $PWD matches the physical world. It did so only
for PWD, by doing 'cd -P "$TRASH_DIRECTORY"' early in the test setup
sequence, but it did so after setting HOME, leaving it inconsistent
between physical and logical world.
Which is the bug that my suggested fix addresses.
Besides the problem we saw in this discussion thread is *not* a bug
in Git and its normalization of its working directory, is it? It
was a bug in the test script that assumed that $HOME already was
normalized, right?
If we want to make sure Git (not its tests, but Git itself) works
when (pwd) and (pwd -P) are different, we should have a dedicated
test to arrange that for everybody, regardless of where the tester
checks out their git repository. We can only do so on symlink
capable filesystems, but we do have enough support in the test
framework to do so if you want to write such a test.
next prev parent reply other threads:[~2025-05-27 17:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 19:37 [PATCH] t7900: use pwd -P in macOS maintenance test Mark Mentovai
2025-05-23 20:08 ` Eric Sunshine
2025-05-23 20:42 ` Junio C Hamano
2025-05-23 21:24 ` Eric Sunshine
2025-05-23 21:51 ` Junio C Hamano
2025-05-24 4:39 ` Mark Mentovai
2025-05-27 17:19 ` Junio C Hamano [this message]
2025-05-23 20:43 ` Mark Mentovai
2025-05-23 21:36 ` Eric Sunshine
2025-05-28 20:17 ` [PATCH v2] t: run tests from a normalized working directory Mark Mentovai
2025-05-28 23:08 ` Torsten Bögershausen
2025-05-30 5:04 ` Junio C Hamano
2025-05-31 5:46 ` Torsten Bögershausen
2025-06-01 16:38 ` Junio C Hamano
2025-06-02 16:08 ` Mark Mentovai
2025-06-02 21:32 ` Junio C Hamano
2025-06-03 5:02 ` Torsten Bögershausen
2025-06-03 13:15 ` Mark Mentovai
2025-06-03 18:22 ` Junio C Hamano
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=xmqqy0uiug1y.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mark@chromium.org \
--cc=stolee@gmail.com \
--cc=sunshine@sunshineco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).