Subject: Re: bug#48060: "make check" leaves temporary files after native-comp merge

From: Andrea Corallo <[email-masked]>
Date: Tue, 27 Apr 2021 20:34:23 +0000

Michael Albinus <[email-masked]> writes:

> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <[email-masked]> writes:
>
> Hi Andrea,
>
>>> The content of one of these directories is:
>>>
>>>   emacs-testsuite-xdgMCK
>>>   └── 28.0.50-d25e21f7
>>>       └── subr--trampoline-63616c6c2d70726f63657373_call_process_0.eln
>>>
>>>   1 directory, 1 file
>>>
>>> Others are empty:
>>>
>>>   emacs-testsuite-1HQfjD
>>>
>>>   0 directories, 0 files
>>>
>>> Every time I run "make -j8 check", I get another 584 of these directories.
>>>
>>> Could we do something to ensure these directories are always deleted?
>>
>> I guess the correct way to do it would be in the Makefile when tests are
>> done, am I correct?
>>
>> The other option would be to have Emacs to clean-up this directory
>> before exiting, but in case of a crash it wouldn't work.
>
> Not an Emacs cleanup. Usually, test functions are responsible for their
> own cleanup. You could put the whole test body in an unwind-protect
> bodyform, and perform the cleanup in one of the unwindforms.

Hi Michael,

the issue is that here is not really the test function that is creating
this folder, but Emacs it-self that to operate needs a folder to store
and retrieve eln files.

For the test-suite we moved to a different folder than the one we use
for normal runs to have a clean environment to run the test-suite on.

Regards

  Andrea