RFR: 8274718: runtime/cds/appcds/LambdaEagerInit.java fails with -XX:-CompactStrings
Fairoz Matte
fmatte at openjdk.java.net
Wed Oct 13 03:42:49 UTC 2021
On Tue, 12 Oct 2021 19:39:16 GMT, Ioi Lam <iklam 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
>
> 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);
> }
Thanks, Ioi for the review.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5906
More information about the hotspot-runtime-dev
mailing list