RFR: 7903781: Report the process id of the agent or other VM that was used for a jtreg action [v2]
Jaikiran Pai
jpai at openjdk.org
Mon Aug 19 04:33:58 UTC 2024
On Thu, 15 Aug 2024 22:50:23 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> include a self test for verifying the process id in the generated report
>
> src/share/classes/com/sun/javatest/regtest/util/ProcessUtils.java line 38:
>
>> 36:
>> 37: private static final Method destroyForciblyMethod;
>> 38: private static final Method PID_METHOD;
>
> How much we we still need reflective access to these methods?
> If they are only invoked from the `jtreg` tool (and never from a test VM), then the minimum level of JDK required to run `jtreg` is currently 11, right? And, we no longer support running test-VM code on anything less than 8, right?
>
> So, at some level, it seems we may not need `ProcessUtils` any more -- unless maybe as a convenience wrapper.
Hello Jon,
> And, we no longer support running test-VM code on anything less than 8, right?
I think you are right. Although, the `Process.pid()` is only available in Java 9+, I think that call is only run on the `jtreg` tool's VM which as you note seems to require Java 11 (I will have to verify some JDK CI runs to be sure that's the case currently).
If it's OK, then I'll take up the usage and possible remove of this reflection code as a separate issue and verify things work fine without it.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/215#discussion_r1721200285
More information about the jtreg-dev
mailing list