RFR: 7903044: Report `os.*` system properties in .jtr file
Christian Stein
cstein at openjdk.java.net
Tue Nov 9 07:24:48 UTC 2021
On Mon, 8 Nov 2021 18:45:26 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> https://bugs.openjdk.java.net/browse/CODETOOLS-7903044
>
> src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java line 141:
>
>> 139: for (String p: props) {
>> 140: testResult.putProperty(p, System.getProperty(p));
>> 141: }
>
> Nice and simple ... but probably too simple.
>
> This will report the properties for the JVM running `jtreg`, which is OK for `user.name`, but for the `os.*` properties we probably want the values for the test JVM. You can get the properties from `params.getTestJDK().getProperties()` ... or better still, use/report the values cached in `params.getTestOS()`.
> And, if we're going as far as using `params.getTestOS()` it might be worth printing out the full `OS.toString()`.
>
> So, suggest either
>
> * `testResult.putProperty(` _name_ `, os.` _field_ `)` for the three values, or else just
> * `testProperty.putProperty("testJDK_OS", os.toString())`
>
> (or both?)
Understood.
Does it make sense to also keep the additional information report for the JVM running `jtreg`? In summary, this would introduce 8 new lines, like:
(JVM running jtreg) JDK_OS = ...
(JVM running jtreg) os.arch = ...
(JVM running jtreg) os.name = ...
(JVM running jtreg) os.version = ...
(Test JVM) JDK_OS = ...
(Test JVM) os.arch = ...
(Test JVM) os.name = ...
(Test JVM) os.version = ...
Or are only the latter 4 interesting?
-------------
PR: https://git.openjdk.java.net/jtreg/pull/35
More information about the jtreg-dev
mailing list