RFR: 8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms [v3]

Mandy Chung mchung at openjdk.java.net
Thu Sep 16 17:24:45 UTC 2021


On Thu, 16 Sep 2021 03:44:24 GMT, Remilia Scarlet <github.com+22913521+1996scarlet at openjdk.org> wrote:

>> The test assumes that it always runs on 64-bit platform and classes_nocoops.jsa is always created.
>> It's a test bug. The test should only expect classes_nocoops.jsa exists if it's running on a supported 64-bit platform.
>> However, for unknown target platform, it's unknown if it's 64-bit or not.
>> 
>> This patch fix the test to check if classes_nocoops.jsa exists only on one of the JDK supported platforms (x64 or aarch64) via the sun.arch.data.model system property.
>> 
>> Please review this change. Thanks!
>
> Remilia Scarlet has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

Thanks for making the change, Remilia.   @calvinccheung is the author of CDSPlugin and this test, who should review this fix.

My suggestion checking on x64 or aarch64 works for the issue you run into but it would fail again when running on a JDK where CDSPlugin does not support for example `lib/classlist` is not present.

There is a method `jdk.test.lib.Platform::isDefaultCDSArchiveSupported` to test if CDS default archive is supported.    It may a better fix for CDSPluginTest to simply skip running if default CDS archive is not supported.   `isDefaultCDSArchiveSupported` needs to be fixed to include aarch64 but it should be fixed as a separate issue (@calvinccheung can take care of it?)

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

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


More information about the core-libs-dev mailing list