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

From: Michael Albinus <[email-masked]>
Date: Tue, 27 Apr 2021 21:25:56 +0200

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.

>   Andrea

Best regards, Michael.