RFR: 8230942: Support compressed cores in SA tests

David Holmes david.holmes at oracle.com
Fri Sep 27 02:00:45 UTC 2019


Hi Leonid,

On 27/09/2019 7:18 am, Leonid Mesnik wrote:
> Hi
> 
> Some hosts used for JDK testing have customized core dump settings. They 
> compress core files saved in current directory on-the-fly to reduce 
> required disk space.
> This fix adopt several SA tests, trying to unpack core.pid.gz before 
> test process it with jhsdb. It affects only execution in the case if 
> core.pid.gz files are actually generated.
> 
> Verified that tests are passed and not skipped anymore on default and 
> new configurations.
> 
> webrev: http://cr.openjdk.java.net/~lmesnik/8230942/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8230942

Overall seems fine. I hope it doesn't take too long to do the unzipping. :)

A few minor items

test/lib/jdk/test/lib/SA/SATestUtils.java

+         for(File gzCore : gzCores) {

Nit: add space after for

+             } catch (IOException e) {
+                 throw new SkippedException("Not able to unzip core 
file.");
+             }

Please add the IOException as a cause for the SkippedException so that 
we have some diagnostics on why it couldn't be unzipped.

---

test/hotspot/jtreg/serviceability/sa/TestJmapCore.java

32 import java.io.File;

File is already imported at line 46.

+         SATestUtils.unzipCores(new File("."));
...
           File[] cores = new File(".").listFiles((dir, name) -> 
name.matches(pattern));

Suggest:

File pwd = new File(".");
SATestUtils.unzipCores(pwd);
...
File[] cores = pwd.listFiles((dir, name) -> name.matches(pattern));

and also at line 117:
                      + ": " + String.join(",", pwd.list()) + ".");

Thanks,
David
-----

> Leonid


More information about the serviceability-dev mailing list