Certain parts of the test code would like to use key/value pairs whose keys are pre-defined in the JDK testsuite and values are computed by a testsuite specific class, before jtreg launches the tests (i.e., the properties computed here: https://github.com/openjdk/jdk/blob/d68775d7118c926cacb7e9e4c02b85bdb0705521/test/hotspot/jtreg/TEST.ROOT#L41-L99 )
These set of key/value pairs are currently used by jtreg in the evaluation of the @requires tag of the test definition. The proposal is to make available that same key/value pairs to the test code itself (when the test is launched) so that they can do additional decisions based on those properties.
The key/value pairs are computed computed by https://github.com/openjdk/jtreg/blob/6a611a34bb735df082547e261d4d121267f564ac/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java#L41 . Since tests are not expected to rely on jtreg classes/types, the way to expose that detail would be by persisting the key/value pairs to a properties file ( https://docs.oracle.com/en/java/javase/23/docs//api/java.base/java/util/Properties.html#store(java.io.Writer,java.lang.String) ) whose path is then passed along to the test as a standard jtreg system property like the ones noted in https://openjdk.org/jtreg/tag-spec.html#testvars.
==========
Note: SeeJDK-8352107 for an example of how such properties can be used by test cases
These set of key/value pairs are currently used by jtreg in the evaluation of the @requires tag of the test definition. The proposal is to make available that same key/value pairs to the test code itself (when the test is launched) so that they can do additional decisions based on those properties.
The key/value pairs are computed computed by https://github.com/openjdk/jtreg/blob/6a611a34bb735df082547e261d4d121267f564ac/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java#L41 . Since tests are not expected to rely on jtreg classes/types, the way to expose that detail would be by persisting the key/value pairs to a properties file ( https://docs.oracle.com/en/java/javase/23/docs//api/java.base/java/util/Properties.html#store(java.io.Writer,java.lang.String) ) whose path is then passed along to the test as a standard jtreg system property like the ones noted in https://openjdk.org/jtreg/tag-spec.html#testvars.
==========
Note: See
- relates to
-
JDK-8352107 Allow jtreg test cases to query test VM properties
-
- Closed
-
-
JDK-8352528 Move CDS WhiteBox APIs to jdk.internal.test.cds.WhiteBox
-
- New
-