RFR: 8274838: runtime/cds/appcds/TestSerialGCWithCDS.java fails on Windows

Harold Seigel hseigel at openjdk.java.net
Wed Oct 6 20:48:10 UTC 2021


On Wed, 6 Oct 2021 12:52:12 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> runtime/cds/appcds/TestSerialGCWithCDS.java fails on our Windows hosts.
> 
> This is because the failure msgs are different with `-Xmx2m` and `-Xmx1m` on Windows.
> 
> # ./java -Xmx2m -XX:+UseSerialGC -XX:ObjectAlignmentInBytes=64 -version
> Error occurred during initialization of VM
> GC triggered before VM initialization completed. Try increasing NewSize, current value 640K.
> 
> #  ./java -Xmx1m -XX:+UseSerialGC -XX:ObjectAlignmentInBytes=64 -version
> Error occurred during initialization of VM
> Too small maximum heap
> 
> 
> The test only handles the `-Xmx1m` msg but fails with `-Xmx2m`.
> The fix takes both error msgs into consideration.
> 
> Thanks.
> Best regards,
> Jie

Looks good,  Just the one comment.
Thanks, Harold

test/hotspot/jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java line 122:

> 120:                     if (!output.contains(exp1) && !output.contains(exp2)) {
> 121:                         throw new RuntimeException("'" + exp1 + "' or '" + exp2 + "' missing from stdout/stderr \n");
> 122:                     }

Can you change the RuntimeException message to something like "Either " + exp1 + " or " + exp2 + "must be in stdout/stderr"

Otherwise, it sounds like both messages are needed.

-------------

Marked as reviewed by hseigel (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5839


More information about the hotspot-runtime-dev mailing list