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

From: Andrea Corallo <[email-masked]>
Date: Tue, 27 Apr 2021 16:53:33 +0000

Stefan Kangas <[email-masked]> writes:

> After some iterations of running of "make -j8 bootstrap && make -j8
> check", my ~/src/emacs is filled with a lot of temporary directories:
>
>   drwx------  2 skangas skangas 4.0K 2021-04-27 03:50 emacs-testsuite-0B1nPY
>   drwx------  2 skangas skangas 4.0K 2021-04-26 12:01 emacs-testsuite-0Ei8cf
>   drwx------  2 skangas skangas 4.0K 2021-04-27 03:50 emacs-testsuite-0G40w3
>   drwx------  2 skangas skangas 4.0K 2021-04-27 02:59 emacs-testsuite-0GcjNo
>   drwx------  2 skangas skangas 4.0K 2021-04-27 02:43 emacs-testsuite-0Gwmf7
>   drwx------  2 skangas skangas 4.0K 2021-04-26 20:24 emacs-testsuite-0HYLcF
>   drwx------  2 skangas skangas 4.0K 2021-04-27 03:49 emacs-testsuite-0Iy0yX
>   drwx------  2 skangas skangas 4.0K 2021-04-26 12:01 emacs-testsuite-0JpgU6
>
> I actually have 2922 of these directories.
>
> 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.

The last option would be to convince `make-temp-file' we call at
startup.el:553 to create the directory in "/tmp/" or equivalent (not
sure that's possible).

  Andrea