The use of the name tmpdir in the tests
Jan Beulich
jbeulich@suse.com
Fri Jun 16 06:11:49 GMT 2023
On 15.06.2023 23:53, Ruud van der Pas via Binutils wrote:
> Hi team,
>
> This is an absolute detail, but as I am working on the test suite
> for gprofng, I noticed the use of a directory called "tmpdir".
>
> I count about 155 .exp files across binutils that use it:
>
> $ grep -sw tmpdir `find . -name "*".exp -print` | awk 'BEGIN {FS=":"} {print $1}' | uniq | wc
> 155 155 6000
> $
>
> The thing is that in the case of gprofng at least, this is far from
> a temporary directory. It is going to contain the generated experiment
> data that is crucial for troubleshooting in case of a failure.
>
> Of course we could place those experiments elsewhere, but my idea
> was to give tmpdir a more meaningful name.
>
> Are there any objections against doing so? For example, will
> certain scripts fail?
>
> If not, any suggestion what would be a good name? I'm not that
> creative so don't get any further than "results" or "expresults"
> and am definitely open to suggestions.
But that would be misleading too, if applied tree-wide, since often
it's indeed just temporary data that is put there. Iirc some tests
leave stuff there (intentionally or not), while others remove things
after completion. So you keeping things in there would be within
what's done elsewhere. Plus still the test results are temporary
data; it's needed in case of problems, but not typically otherwise.
Jan
More information about the Binutils
mailing list