On 16/06/2020 18:44, Erik Joelsson wrote:
There are a lot of jtreg tests that use temporary files. These
temporary files add up over time and fill up the global temp
directories on our test systems. To tackle this, we should try to
redirect these temporary files into a directory controlled by the test
framework. Jtreg does not do this, but we can set -Djava.io.tmpdir
from RunTest.gmk. This will not prevent all temp files from being
created outside of the work dir, but at least most.
I have found one test where this becomes an issue,
java/nio/file/Path/Misc.java on Windows when running in elevated mode
with the workspace on a subst drive. This looks like an actual issue
in the product, so I have filed a separate bug for it [1]. Since we
currently use subst in our distributed test system to get around
Windows path length issues, we are hitting this problem. While the bug
is being evaluated, I have implemented a workaround in the test so
that it is able to handle the known situation. I would like to have
someone from core-libs look at the workaround.
Webrev: http://cr.openjdk.java.net/~erikj/8213214/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8213214
subst is a legacy mechanism. We know from previous attempts to reconcile
usage of subset with NTFS symbolic links creates surprises and
inconsistencies. I don't object to putting a workaround in the test but
I think more information is required, in particular the comment that
'file' is guaranteed to be subst free? Can you expand on this? Some
examples would be useful as it's not clear how subst is used in the
environment, is it solely that java.io.tmpdir is set to something like
S:\tmp and S: is mapped to some other location?
-Alan