RFR JDK-8251213 [TESTBUG] CDS tests shouldn't write output files into test.classes directory

calvin.cheung at oracle.com calvin.cheung at oracle.com
Thu Aug 6 18:38:09 UTC 2020


Hi Ioi,

Thanks for fixing this.

Couple of minor comments:

1) MultiReleaseJars.java

   37 import jdk.test.lib.process.OutputAnalyzer;
   38 import jdk.test.lib.cds.CDSTestUtils;

Please swap the order of the above.

2) You've made changes to the tests under dynamicArchive/methodHandles. 
Can you apply the same change to the CDSMHTest_generate.sh since those 
tests are being generated by the script?

No need for another webrev for the above changes.

One suggestion (I think it should be done in another RFE):

Several tests are doing the following:

     File dir = new File(System.getProperty("user.dir"));

I'm thinking add another method in CDSTestUtils to return the 
outputDirAsFile so that the above could be:

     File dir = CDSTestUtils.getOutputDirAsFile();

thanks,

Calvin

On 8/5/20 11:21 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8251213
> http://cr.openjdk.java.net/~iklam/jdk16/8251213-cds-shouldnt-write-test-classes-dir.v01/ 
>
>
> Many of the CDS tests would write output files to the directory
> given by System.getProperty("test.classes").
>
> I changed them to write to the scratch directory, i.e.,
> System.getProperty("user.dir", "."). This way, it's easier to examine the
> output of the tests.
>
> Please start the review with CDSTestUtils.java.
>
> I validated the change by going to the jtreg work directory and:
>
>     $ find $(find . -name classes) -type f | grep -v '[.]class$' | wc -l
>     0
>
> (There used to be a lot of .jsa, .classlist, .stdout, etc).
>
> Executed all the tests locally on Linux. Running mach5 tiers1-4.
>
> Thanks
> - Ioi


More information about the hotspot-runtime-dev mailing list