https://github.com/openjdk/jdk/blob/2bc4f64c56ebc844d494a4ce8ba72a25643d4075/test/lib/jdk/test/whitebox/WhiteBox.java#L729-L743
CDS regression tests make WhiteBox extensively. There are 175 files that references "WhiteBox" under test/hotspot/jtreg/runtime/cds/.
However, WhiteBox is cumbersome to use. Many CDS tests end up not using WhiteBox, but use more brute-force method. For example: instead of calling WhiteBox::isSharedClass, many tests run with -Xlog:class+load and grep for "shared objects".
==================
Proposal:
Move the APIs to jdk.internal.test.cds.WhiteBox so these APIs are available inside java.base. This avoid the need for building WhiteBox.jar and appending it to -Xbootclasspath.
CDS tests cases can use a single line in their test description to indicate the need for this class:
@module java.base/jdk.internal.test.cds.WhiteBox
For Java processes launched by CDS (using jdk.test.lib.cds.CDSTestUtils, etc), when necessary we can add "--add-exports java.base/jdk.internal.test.cds=ALL-UNNAMED" to their command-line.
Note: this RFE replacesJDK-8352107
CDS regression tests make WhiteBox extensively. There are 175 files that references "WhiteBox" under test/hotspot/jtreg/runtime/cds/.
However, WhiteBox is cumbersome to use. Many CDS tests end up not using WhiteBox, but use more brute-force method. For example: instead of calling WhiteBox::isSharedClass, many tests run with -Xlog:class+load and grep for "shared objects".
==================
Proposal:
Move the APIs to jdk.internal.test.cds.WhiteBox so these APIs are available inside java.base. This avoid the need for building WhiteBox.jar and appending it to -Xbootclasspath.
CDS tests cases can use a single line in their test description to indicate the need for this class:
@module java.base/jdk.internal.test.cds.WhiteBox
For Java processes launched by CDS (using jdk.test.lib.cds.CDSTestUtils, etc), when necessary we can add "--add-exports java.base/jdk.internal.test.cds=ALL-UNNAMED" to their command-line.
Note: this RFE replaces
- relates to
-
CODETOOLS-7903975 Expose @requires properties to test cases
-
- Closed
-
-
JDK-8352107 Allow jtreg test cases to query test VM properties
-
- Closed
-