Subject: Re: bug#47138: 28.0.50; comp-tests suite creates a /nonexistent directory

From: Andrea Corallo <[email-masked]>
Date: Sun, 21 Mar 2021 16:28:12 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 21 Mar 2021 08:43:36 +0000
>>
>> >   $ cd test
>> >   $ make src/comp-tests SELECTOR='(not comp-tests-bootstrap)'
>>
>> Is /nonexistent... really created in the root?
>
> Yes.  (Well, no, because MinGW maps "/" to some place else, but that's
> an internal detail of how MinGW and MSYS work with Posix file names.)
>
>> AFAICS on my system the usual 'native-lisp' directory is used for
>> these compilations.
>
> Really? that's peculiar, because test/Makefile says:
>
>   # Set HOME to a nonexistent directory to prevent tests from accessing
>   # it accidentally (e.g., popping up a gnupg dialog if ~/.authinfo.gpg
>   # exists, or writing to ~/.bzr.log when running bzr commands).
>   TEST_HOME = /nonexistent
>   ...
>   %.log: %.elc
> 	$(AM_V_at)${MKDIR_P} $(dir $@)
> 	$(AM_V_GEN)HOME=$(TEST_HOME) $(emacs) \
> 	  -l ert ${ert_opts} -l $(testloadfile) \
> 	  $(TEST_RUN_ERT)
>
> Does Emacs on GNU/Linux ignore a nonexistent home directory, and uses
> the original one instead?  That'd mean the above trick isn't working.
>
>> Might be this Windows specific?
>
> I hope not.

I see, the target directory for a newly compiled .eln is the first entry
in `comp-eln-load-path', so HOME is not accounted and the trick didn't
applied.

Okay af739863b0 when running the testsuite is adding in front of
`comp-eln-load-path' a temporary directory such that now all native
compilations tests are deposed and loaded there.  Does is look like a
good solution?

Thanks

  Andrea