RFR: 8274718: runtime/cds/appcds/LambdaEagerInit.java fails with -XX:-CompactStrings
Ioi Lam
iklam at openjdk.java.net
Tue Oct 12 19:42:55 UTC 2021
On Tue, 12 Oct 2021 09:41:23 GMT, Fairoz Matte <fmatte at openjdk.org> wrote:
> This test uses the default CDS archive with -Xshare:on. However, the default CDS archive may fail to load when a few VM flags are mismatched.
> Using -Xshare:auto instead of -Xshare:on for testDefaultArchiveWithEagerInitializationEnabled() and testDefaultArchiveWithEagerInitializationDisabled() method calls
Changes requested by iklam (Reviewer).
test/hotspot/jtreg/runtime/cds/appcds/LambdaEagerInit.java line 132:
> 130: .addSuffix(mainClass);
> 131: OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
> 132: output.shouldHaveExitValue(0);
I think you can do this to keep the checks on lines 130 .. 131:
.addSuffix("-showversion", mainClass);
OutputAnalyzer output = CDSTestUtils.runWithArchive(runOpts);
if (output.getStderr().contains("sharing")) {
output.shouldMatch(lambdaLoadedFromArchive)
.shouldMatch(cdsLoadedLambdaProxy);
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/5906
More information about the hotspot-runtime-dev
mailing list