RFR: 8271419: Refactor test code for modifying CDS archive contents [v2]

Ioi Lam iklam at openjdk.java.net
Mon Aug 2 06:52:31 UTC 2021

On Sat, 31 Jul 2021 20:42:57 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> The code for modifying CDS archive content could be used by other tests so the common code is refactored into a util class CDSArchiveUtils.
>> Tests: tier1,tier4
>> Thanks
>> Yumin
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>   Move more function to CDSArchiveUtils, fixed review comments

Changes requested by iklam (Reviewer).

test/hotspot/jtreg/runtime/cds/appcds/SharedArchiveConsistency.java line 66:

> 64:         "Unable to use shared archive",
> 65:         "The shared archive file has a bad magic number",
> 66:         "Unable to map shared spaces",

Why are these new errors needed? Did you change any behavior of the tests?

test/lib/jdk/test/lib/cds/CDSArchiveUtils.java line 73:

> 71: 
> 72:     public static void initialize() throws Exception {
> 73:         WhiteBox wb = WhiteBox.getWhiteBox();

This method can be changed to a `static { ....}` block, so that you don't need to explicitly call `CDSArchiveUtils.initialize()`.


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

More information about the hotspot-runtime-dev mailing list