RFR: 8230942: Support compressed cores in SA tests

Leonid Mesnik leonid.mesnik at oracle.com
Fri Sep 27 06:28:53 UTC 2019


Thanks for feedback.

I checked time execution. Tests takes several seconds longer on the hosts which compress cores. Also, tests TestJmapCore.java, TestJmapCoreMetaspace.java are slow and not included in tier1_serviceability anyway.

Updated version here. I fixed it accordingly with your comments:
http://cr.openjdk.java.net/~lmesnik/8230942/webrev.01/ <http://cr.openjdk.java.net/~lmesnik/8230942/webrev.01/>

Leonid

> On Sep 26, 2019, at 7:00 PM, David Holmes <david.holmes at oracle.com> wrote:
> 
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190926/3ba2f3d1/attachment-0001.html>


More information about the serviceability-dev mailing list