RFR: 8313638: Add test for dump of resolved references
Calvin Cheung
ccheung at openjdk.org
Tue Sep 12 17:46:38 UTC 2023
On Tue, 12 Sep 2023 16:37:04 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> The change in [JDK-8306582](https://bugs.openjdk.org/browse/JDK-8306582) revealed that the state of the resolved references array is not checked in the CDS archive. This patch adds a test to ensure that the resolved references array is correct whether the application is archived or not.
Nice test addition. I have one comment. Looks good otherwise.
test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/ResolvedReferencesWb.java line 32:
> 30: if (args.length < 2 && args[0].equals("--isArchived")) {
> 31: throw new RuntimeException("Test requires --isArchived flag");
> 32: }
What happens if `args.length` is 0?
Also, the message for the `RuntimeExeption` could be clearer as follows:
` throw new RuntimeException("Test requires two args: --isArchived [true|false]");`
I think the "--isArchived" may not be needed, just passing in "true" or "false" should be sufficient.
-------------
PR Review: https://git.openjdk.org/jdk/pull/15686#pullrequestreview-1622812395
PR Review Comment: https://git.openjdk.org/jdk/pull/15686#discussion_r1323370476
More information about the hotspot-dev
mailing list