RFR: 8352107: Allow jtreg test cases to query test VM properties

Stefan Karlsson stefank at openjdk.org
Mon Mar 17 07:57:55 UTC 2025


On Sun, 16 Mar 2025 02:54:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> This is probably not the right thing to do.

I agree that this doesn't sound like the right thing to do. This breaks the jtreg -othervm mode.

I use the -othervm mode whenever I want to run reproduce a failure in jtreg. In -othervm mode the pwd is the same as the final destination of the log files, hs_err files, jars, etc. So, when the logs says "hs_err files is written to xyz" it actually is left in that directory. In -agentvm mode the JVM says that the hs_err files is in scratch/<0>, but you won't find a hs_err file there, because jtreg moved it. Even more annoying is that in -agentvm mode it moves the whitebox.jar file, so the printed "rerun" line is not usable. If you run in -othervm mode you can copy and past the rerun line and it actually works, even when you are using the whitebox APIs.

Is there a way to get this patch to also work in -othervm mode?

When I run the test above with -othervm -retain -concurrency:1 I get the log files here:

jtreg_open_test_hotspot_jtreg_runtime_cds_appcds_aotClassLinking_BulkLoaderTest_java/runtime/cds/appcds/aotClassLinking/BulkLoaderTest_aot


but the vm.properties file is located here:

jtreg_open_test_hotspot_jtreg_runtime_cds_appcds_aotClassLinking_BulkLoaderTest_java/vm.properties


So, I'm not sure what's the easiest way to fix that. Maybe walk the chain of parent directories until you find the vm.properties file?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24071#issuecomment-2728492700


More information about the core-libs-dev mailing list