RFR: 8357914: TestEmptyBootstrapMethodsAttr.java fails when run with TEST_THREAD_FACTORY=Virtual [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Thu Jun 5 04:43:48 UTC 2025
On Thu, 5 Jun 2025 03:50:29 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> @dholmes-ora @lmesnik are you okay with my suggestion above?
>
> As long as `command()` returns the information reliably (could it be set via an env-var instead?) then it seems reasonable to check the child process directly.
Yes, it’s the full command executed when running the child. If running with the main thread as virtual thread `-Dtest.thread.factory=Virtual` will be included in the command, as added by `ProcessTools.addTestThreadFactoryArgs`. In that case we run `ProcessTools.main` and pass the test name as argument. For this test `pb.command().toString()` would be something like:
[/home/xyz/open/build/linux-x64/images/jdk/bin/java, -cp, ..., -Duser.language=en, -Duser.country=US, -Dtest.thread.factory=Virtual, jdk.test.lib.process.ProcessTools, Virtual, emptynumbootstrapmethods1]
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25509#discussion_r2127933457
More information about the hotspot-runtime-dev
mailing list