Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
- Date: Mon, 10 Apr 2017 15:43:56 +0200
- From: SZEDER Gábor <szeder.dev@xxxxxxxxx>
- Subject: Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
On Mon, Apr 10, 2017 at 1:40 PM, Ævar Arnfjörð Bjarmason
> On Mon, Apr 10, 2017 at 1:19 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote:
>> A few other failures are triggered by the ':' in the trash directory's
>> name, breaking the following commonly used pattern:
>> export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" &&
>> cd subdir &&
> Does GIT_CEILING_DIRECTORIES support escaping somehow? E.g.
> "foo\:bar". If so maybe we could use a wrapper to set it, if not
> that's a bug in the ceiling dir feature, surely.
It doesn't, these $PATH-style variables in git, in the shell or
elsewhere tend not to.
>>> b) I think any sort of magic like using it with 'make test', but not
>>> when the *.sh is manually run, will just lead to frustrating seemingly
>>> heisenbugs from people trying to debug the test suite when things do
>>> fail, i.e. you run 'make test' on some obscure platform we haven't
>>> fixed path bugs on, 10 fail, you manually inspect them and every one
>>> of them succeeds, because some --use-garbage-dirs option wasn't
>> That's not really an issue. When a test fails during 'make test' with
>> garbage in trash dir names, the dev comes and attempts to cd into the
>> trash dir, and will be instantly reminded that non-printable
>> characters might play a role in the failure when he can't do so with
>> ordinary means.
> When a test fails for me I cd to t/ and re-run the test *.sh manually.
> I don't go straight to inspecting the existing trash.
> If those manual invocations were running in some different mode &
> succeeded that would be very confusing.
On the contrary, that's a clue to where you might want to look.
Besides, this is already the case when someone sets some options in
GIT_TEST_OPTS in his config.mak.